MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
miolo.class
Ir para a documentação deste ficheiro.
1<?php
2define('MIOLO_VERSION_NUMBER', 2.0);
3define('MIOLO_VERSION','Miolo 2.0 RC1');
4define('MIOLO_AUTHOR','Miolo Team');
5
6define('OP_INS', 'INS');
7define('OP_UPD', 'UPD');
8define('OP_DEL', 'DEL');
9
10require_once 'utils/msimplexml.class';
11require_once 'utils/mcontext.class';
12require_once 'utils/mconfigloader.class';
13require_once 'utils/mrc4crypt.class';
14
15
16class MIOLO
17{
18 public $_version;
19 public $_author;
20
24 static private $instance = NULL;
25
30
34 public $db;
35 public $user;
36 public $pass;
37 public $sqllog;
38 public $errlog;
39
43 public $theme;
44
49
54 public $profile;
55
56 public $uses;
57
61 public $trace;
62
63 public $error;
64
68 public $page;
69
73 public $context;
74
78 public $auth;
79
83 public $perms;
84
88 public $session;
89
93 public $state;
94
95 public $logdb;
96 public $dbconf = array();
97 public $halted = false;
98 public $painter;
99 public $mad;
100
105 public $conf;
106
111 public $log;
112
118 private $cacheSQL = false;
119
124 public function __construct()
125 {
126 }
127
134 public static function getInstance()
135 {
136 if (self::$instance == NULL)
137 {
138 self::$instance = new Miolo;
139 }
140
141 return self::$instance;
142 }
143
145 {
146 global $REQUISICAO_PELA_API;
147 $REQUISICAO_PELA_API = true;
148
149 require_once 'support.inc';
150
151 $this->conf = new MConfigLoader();
152 $this->conf->LoadConf();
153
154 try
155 {
156 $this->Init();
157
158 require_once __DIR__ . '/../modules/basic/classes/sAutoload.class';
159 $sAutoLoad = new sAutoLoad();
160 $sAutoLoad->definePaths();
161 }
162 catch( EMioloException $e )
163 {
164 $msg = $e->getMessage();
165 $msg = "Fatal Error: [$msg]";
166
167 if ( $this->getConf('options.message.error') && $e->getCode() === 0 )
168 {
169 $msg = $this->getConf('options.message.error');
170 }
171
172 echo $msg;
173 }
174 }
175
176 function HandlerRequest()
177 {
178 $this->conf = new MConfigLoader();
179 $this->conf->LoadConf();
180 $scramble = $this->getConf('options.scramble');
181 $urlStyle = $this->getConf('options.url.style');
182 $this->context = $this->GetContext('',$urlStyle,$scramble);
183
184 if ($this->context->isFile)
185 {
186 if ($this->context->isRoot)
187 {
188 $path = $this->getConf('home.' . $this->context->fileArea);
189 }
190 else
191 {
192 $path = $this->getConf('home.modules') . '/' . $this->context->module . $this->getConf('home.module.' . $this->context->fileArea);
193 }
194
195 $fileName = $path . $this->context->fileName;
196 $pathinfo = pathinfo($fileName);
197
198 if ($pathinfo['extension'] == 'tpl')
199 {
200 include ('utils/template.class');
201 $tpl = new MTemplate($fileName);
202 $this->SendText($tpl->text, $tpl->mimeType, $fileName);
203 }
204 elseif ($pathinfo['extension'] == 'php')
205 {
206 echo include($fileName);
207 }
208 else
209 {
210 $this->SendFile($fileName);
211 }
212 }
213 else
214 {
215 require_once 'support.inc';
216
217 try
218 {
219 $this->Init();
220 $this->Handler();
221 $this->Terminate();
222 }
223 catch( EMioloException $e )
224 {
225 $msg = $e->getMessage();
226 $msg = "Fatal Error: [$msg]";
227
228 if ( $this->getConf('options.message.error') && $e->getCode() === 0 )
229 {
230 $msg = $this->getConf('options.message.error');
231 }
232
233 echo $msg;
234 }
235 }
236 }
237
238 function SendText($string, $type, $fileName)
239 {
240 if (!empty($string))
241 {
242 include ('utils/mdownload.class');
243 $d = new MDownload();
244 $d->setFileName($fileName);
245 $d->SendText($string, $type);
246 }
247 }
248
249 function SendFile($fileName, $fileNameDown = null)
250 {
251 if (!empty($fileName) && file_exists($fileName))
252 {
253 include_once ('utils/mdownload.class');
254 $d = new MDownload();
255 $d->setFileName($fileName);
256
257 if ( strlen($fileNameDown) > 0 )
258 {
259 $d->setFileNameDown($fileNameDown);
260 }
261
262 $d->Send();
263 }
264 }
265
266 function DownloadFile($fileName)
267 {
268 if (!empty($fileName) && file_exists($fileName))
269 {
270 include_once ('utils/mdownload.class');
271 $d = new MDownload();
272 $d->setFileNameDown($fileName);
273 $d->Send();
274 }
275 }
276
277 public function Import($namespace, $class = '')
278 {
279 $m = MIOLO::GetInstance();
280 $m->profileEnter('MIOLO::import');
281 $result = TRUE;
282 if (!array_key_exists($namespace, $m->import))
283 {
284 $path = $m->getConf('home.miolo');
285 $ns = '';
286 $tokens = explode('::', $namespace);
287
288 foreach ($tokens as $token)
289 {
290 $ns .= (($ns != '') ? '.' : '') . $token;
291
292 if ($ss = $m->getConf('namespace.' . $ns))
293 {
294 $path .= $ss;
295 }
296 elseif ($ss = $m->getConf('namespace.' . $token))
297 {
298 $path .= $ss;
299 }
300 else
301 {
302 $path .= '/' . $token;
303 }
304
305 $last = $token;
306 }
307
308 $pathinfo = pathinfo($path);
309 $path .= (empty($pathinfo['extension']) ? '.class' : '');
310 if ( $result = file_exists($path) )
311 {
312 $class = ($class != '') ? $class : $last;
313 $m->Trace("[IMPORT] $namespace - $class - $path");
314 $m->autoload->setFile($class, $path);
315 $m->import[$namespace] = $class;
316 $result = $path;
317 }
318 }
319 $m->profileExit('MIOLO::import');
320 return $result;
321 }
322
323 function Init( $home = NULL, $logname = 'miolo' )
324 {
325 global $autoload;
326
327 include_once ( 'services/mservice.class' );
328 include_once ( 'flow/mexception.class' );
329 include_once ( 'utils/mxmltree.class' );
330 include_once ( 'utils/mautoload.class' );
331
332 $this->handlers = array();
333 $this->uses = array();
334 $this->import = array();
335 $this->autoload = $autoload = new MAutoLoad();
336 $this->log = new MLog();
337 $this->profile = new MProfile();
338 $this->dump = new MDump();
339 $this->trace = new MTrace();
340
341 $this->profileEnter('MIOLO::Init');
342 $this->session = new MSession();
343 $this->session->start( $this->_REQUEST('sid') );
344
345 $this->LogMessage('[RESET_LOG_MESSAGES]');
346 $this->Trace("Constructing main class", __FILE__, __LINE__);
347 if (!is_null($this->context->module))
348 {
349 $this->conf->LoadConf($this->context->module);
350 }
351
352 // Auto detectar URL caso nao esteja no miolo.conf
353 if ($this->getConf('home.url') == NULL)
354 {
355// $this->SetConf('home.url', "http://{$_SERVER['HTTP_HOST']}");
356
357 $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
358 $scriptName = substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],'/'));
359 $this->SetConf('home.url', "$protocol://{$_SERVER['HTTP_HOST']}$scriptName");
360 }
361
362 $this->dispatch = $this->getConf('home.url') . '/' . $this->getConf('options.dispatch');
363
364 // base module/handler
365 $this->startup = $this->getConf('options.startup') != NULL ? $this->getConf('options.startup') : 'admin';
366
367 if ($this->startup != $this->context->module)
368 {
369 $this->conf->LoadConf($this->startup);
370 }
371
372 // wether to dump internal information or not
373 $this->dumpping = $this->getConf('options.dump');
374
375 // what is the MAD module?
376 $this->mad = $this->getConf('mad.module');
377
378 if ($home)
379 {
380 $this->home = $home;
381 }
382
383 $this->SetLog($logname);
384
385 require_once $this->getConf('home.modules') . '/modules.inc';
386
387 $this->auth = $this->GetAuth();
388 $this->perms = $this->getPerms();
389 $this->persistence = new PersistentManagerFactory();
390 $this->persistence->setConfigLoader('XML');
391 $this->profileExit('MIOLO::Init');
392
393 }
394
395 function Handler()
396 {
397 try
398 {
399 $this->profileEnter('MIOLO::Handler');
400 $this->context->setStyle($this->getConf('options.url.style'));
401 $this->history = new MHistory($this);
402 $this->page = new MPage();
403 $this->GetTheme();
404 $this->GetPainter();
405
406 if($this->getConf('logs.handler') == 'screen')
407 {
408 $this->page->AddScript('m_error_handler.js');
409 }
410
411 $this->session->CheckTimeout();
412
413 if ( isset($_REQUEST["__GENERATEHEADERFIRST"]) )
414 {
415 if( $_REQUEST["__GENERATEHEADERFIRST"] === "yes" )
416 {
417 // Se não for uma chamada ajax
418 if( is_null(MIOLO::_REQUEST("cpaint_function")) && !stristr($_REQUEST['__EVENTTARGETVALUE'], 'exportGridAs'))
419 {
420 $this->page->GenerateHeader();
421
422 }
423
424 }
425 }
426
427 if($this->CheckLogin())
428 {
429 //$this->InvokeHandler($this->startup, 'main');
430
431 if($_SESSION['isCentral'] == true && !SAGU::isAllowedAction())
432 {
434 if($action != 'logout')
435 {
436 //se a action for de geração de relatórios, verifica se o report permite geração sem login
437 if($action == 'main:document:generateReport')
438 {
439 $filters = new stdClass();
440 $filters->report = self::_REQUEST('report');
441 $reportInfo = new BasUploadReportInfo();
442 $report = $reportInfo->search($filters);
443
444 if($report->authenticationRequired == DB_FALSE)
445 {
446 $this->error('Acesso negado.');
447 }
448 }
449 else
450 {
451 $allowedAction = explode(',', SAGU::getParameter('BASIC', 'TRANSACTIONS_PERMITED_WITH_DATEANDCPF_LOGIN'));
452
453 if(strlen($action) > 0)
454 {
455 $filters = new stdClass();
456 $filters->action = $action;
457 $transactions = AdmMioloTransaction::search($filters);
458 }
459
460 $block = true;
461 foreach ($transactions as $key => $transaction)
462 {
463 if(in_array($transaction->idTransaction, $allowedAction))
464 {
465 $block = false;
466 }
467 }
468
469 if($block == true || count($transactions) == 0)
470 {
471 $this->error('Acesso negado.');
472 }
473 }
474 }
475 }
476
477 $this->InvokeHandler($this->context->module, $a=$this->context->shiftAction());
478 }
479
480 $uri = $_SERVER['SCRIPT_NAME'];
481 // utilizado para chamadas de webservice nao renderizarem html
482 if ( !isset($_REQUEST['webservice']) && !isset($_REQUEST['WSDL']) && strpos($uri, 'wsdl.php') === FALSE )
483 {
484 $this->page->Generate();
485
486 }
487
488 $this->history->Close();
489 $this->profileExit('MIOLO::Handler');
490
491 if( $this->getConf('logs.handler') == 'screen' && $this->log->content )
492 {
493 echo "<script language=\"javascript\">".
494 $this->log->content.
495 "</script>";
496 }
497 }
498 catch( EMioloException $e )
499 {
500 $msg = $e->getMessage();
501 $this->LogMessage('[ERROR]' . $msg);
502 $goTo = !empty($_SERVER['HTTPS']) ? 'https:' . $e->goTo : 'http:' . $e->goTo;
503 $this->Error($msg, $goTo, 'Fatal Error');
504 $this->page->Generate();
505 }
506 }
507
508 function InvokeHandler($module, $action)
509 {
510 $this->Trace("InvokeHandler: $module::$action");
511
512 if ($return = ($action != NULL))
513 {
514 $handler = $this->GetHandler($module);
515 $return = $handler->dispatch($action);
516 }
517
518 return $return;
519 }
520
521 function getHandler( $module )
522 {
523 $this->trace( "getHandler: $module" );
524 $this->profileEnter( 'MIOLO::getHandler' );
525 $class = 'Handler' . ucfirst( strtolower( $module ) );
526
527 if ( isset($this->handlers[$class]) )
528 {
529 $handler = $this->handlers[$class];
530 }
531 else
532 {
533 $this->uses( 'handlers/handler.class', $module );
534 $handler = $this->handlers[$class] = new $class( $this, $module );
535 $handler->init();
536 }
537
538 $this->profileExit('MIOLO::getHandler');
539
540 return $handler;
541 }
542
543 function Terminate()
544 {
545 $this->session->freeze();
546 }
547
548 function getConf($key)
549 {
550 return $this->conf->getConf($key);
551 }
552
553 function SetConf($key, $value)
554 {
555 $this->conf->setConf($key, $value);
556 }
557
558 function Assert($cond, $msg = '', $goto = '')
559 {
560 if ($cond == false)
561 {
562 $this->LogMessage('[ERROR]' . $msg);
563 $this->Error($msg, $goto, _M('Fatal Error!'));
564 }
565 }
566
567 function Scramble($text)
568 {
569 $pwd = $this->getConf('scramble.password');
570 $rc4 = new MRC4Crypt;
571 $crypto = base64_encode($rc4->rc4($pwd,$text));
572 $result = urlencode($crypto);
573
574 return $result;
575 }
576
577 function UnScramble($text)
578 {
579 $pwd = $this->getConf('scramble.password');
580 $rc4 = new MRC4Crypt;
581 $crypto = urldecode($text);
582 $result = $rc4->rc4($pwd,base64_decode($crypto));
583
584 return $result;
585 }
586
588 {
589 $this->dispatch = $url;
590 }
591
600 function GetContext($url = '', $style = 0, $scramble = false)
601 {
602 if (is_null($this->context))
603 {
604 $this->context = new MContext($url,$style,$scramble);
605 }
606 return $this->context;
607 }
608
612 function GetSession()
613 {
614 return $this->session;
615 }
616
620 function GetAuth()
621 {
622 if (is_null($this->auth))
623 {
624 $class = strtolower($this->getConf('login.class'));
625 if ($class == NULL)
626 {
627 $class = "mauthdb";
628 }
629 if ( ! $this->import('classes::security::' . $class) )
630 {
631 $module = $this->getCurrentModule( ) ? $this->getCurrentModule( ) : $this->getConf('login.module');
632 $this->getClass( $module, $class );
633 }
634 $this->auth = new $class();
635 }
636 return $this->auth;
637 }
638
644 function GetPerms()
645 {
646 if (is_null($this->perms))
647 {
648 $class = strtolower($this->getConf('login.perms'));
649 if ($class == NULL)
650 {
651 $class = "mperms";
652 }
653 if ( ! $this->import('classes::security::' . $class) )
654 {
655 $module = $this->getCurrentModule( ) ? $this->getCurrentModule( ) : $this->getConf('login.module');
656 $this->getClass( $module, $class );
657 }
658 $this->perms = new $class();
659 }
660
661 return $this->perms;
662 }
663
667 function GetLogin()
668 {
669 return MUtil::NVL($this->auth->GetLogin(), isset($GLOBALS['login']) ? $GLOBALS['login'] : null);
670 }
671
675 function GetPage()
676 {
677 if (empty($this->page))
678 {
679 $this->page = new MPage();
680 }
681
682 return $this->page;
683 }
684
685 public function GetHistory()
686 {
687 if (empty($this->history))
688 {
689 $this->history = new MHistory($this);
690 }
691
692 return $this->history;
693 }
694
695 function uses($name, $module = NULL)
696 {
697 global $MIOLO;
698
699 $this->profileEnter( 'MIOLO::Uses' );
700
701 // fazer nomes unicos por modulo
702 $unique = ( $module != NULL ? $module : 'classes' ) . '::' . $name;
703
704 if (!array_key_exists($unique, $this->uses))
705 {
706 if ($module)
707 {
708 $path = $this->getModulePath($module, $name);
709 }
710 else
711 {
712 $path = $this->getAbsolutePath('classes/' . $name);
713 }
714
715 if (!file_exists($path))
716 {
717 $path = str_replace("/miolo20/", "/miolo26/", $path);
718 }
719
720 if (!file_exists($path))
721 {
722 $path = str_replace('/miolo20/', '/miolo26/', $path);
723 }
724
725 if (!file_exists($path))
726 {
727 throw new EUsesException($path);
728 }
729
730 $this->uses[$unique] = array($name, filesize($path));
731
732 //Se a requisição for feita pela API não faz require de classes de interfaces
733 if (isset($GLOBALS['REQUISICAO_PELA_API']))
734 {
735 if (!in_array($name, array('classes/sform.class')))
736 {
737 include_once ($path);
738 $this->logMessage('[USES] file:' . $path);
739 }
740 }
741 else
742 {
743 include_once ($path);
744 $this->logMessage('[USES] file:' . $path);
745 }
746 }
747
748 $this->profileExit('MIOLO::Uses');
749
750 return true;
751 }
752
753 function UsesBusiness($module, $name = 'main')
754 {
755 $this->profileEnter('MIOLO::UsesBusiness');
756
757 // compose the name of the class, wich must be defined in the file
758 // ../modules/$module/db/$name.class
759 $class = 'Business' .
760 strtoupper(substr($module,0,1)) . substr($module,1) .
761 strtoupper(substr($name,0,1)) . substr($name,1);
762
763 if (!isset($this->usesBusiness[$class]))
764 {
765 // try to open the file in the ../modules/$module/db dir (default) or
766 // ../modules/$module/classes (only for compatibility purpose *don't use it*)
767 // if the file doesn't exist raise exception, otherwise we'll
768 // receive an eval error
769 if ( ! ( $this->Import('modules::' . $module . '::db::'. $name, $class) ||
770 $this->Import('modules::' . $module . '::classes::'. $name, $class) )
771 )
772 {
773 throw new EUsesException($this->getConf('home.modules') . '/' . $module . "/db/$name.class ", _M('Error in UsesBusiness: Class not Found! <BR>Class name: ') );
774 }
775
776 $class = strtolower($class);
777 $this->usesBusiness[$class]['module'] = $module;
778 $this->usesBusiness[$class]['name'] = $name;
779 }
780 }
781
816 function GetActionURL($module = '', $action = 'NONE', $item = '', $args = NULL, $dispatch = NULL, $scramble = false)
817 {
818 global $context;
819
820 $qs = '';
821 if ( is_object( $module ) )
822 {
823 $obj = clone( $module );
824 $action = $obj->action;
825 $item = $obj->item;
826 $args = $obj->args;
827 $dispatch = $obj->dispatch;
828 $scramble = $obj->scramble;
829
830 $module = $obj->module;
831 }
832
833 if (is_null($dispatch))
834 {
835 $dispatch = $this->dispatch;
836 }
837 $amp = '&amp;';
838 if ($item)
839 {
840 $qs = "item=$item";
841 }
842 if (is_array($args))
843 {
844 foreach ($args as $key => $value)
845 {
846 if (!($value instanceof stdClass) )
847 {
848 $qs .= $amp . "$key=".$value;
849 }
850 }
851 }
852
853 $url = "";
854 if ( !empty($context) )
855 {
856 $url = $context->ComposeURL($dispatch,$module,$action, $qs,$scramble);
857
858 // SAGU compatibility
859 $url = $this->saguCompatibility($url);
860 }
861
862 return $url;
863 }
864
870 public function saguCompatibility($url)
871 {
872 $genericReports = (preg_match('/main:document:genericReports/', $url) || preg_match('/main:report:genericReports/', $url));
873
874 if (
875 preg_match('/\?module=(admin|basic|academic|finance|services|selectiveProcess|accountancy|contaspagar|controlCopies|training|relcliente|institutional|protocol|research|residency|humanResources)&/', $url) ||
876 preg_match('/main:report:generateReport&report=/', $url) || // Redireciona relatorios genericos para o SAGU MIOLO 2.0
877 $genericReports ||
878 (preg_match('/main:report/', $url) && !preg_match('/\?module=(portal)&/', $url))
879 )
880 {
881 $url = str_replace('/miolo26/', '/miolo20/', $url);
882 }
883 else if ( preg_match('/\?module=(portal)&/', $url) &&
884 !preg_match('/main:document:generateReport/', $url) &&
885 !$genericReports )
886 {
887 $url = str_replace('/miolo20/', '/miolo26/', $url);
888 }
889
890 // Ajusta action da configuração da avaliação institucional,
891 if ( preg_match('/action=main:avaliacaoInstitucional/', $url) )
892 {
893 $url = str_replace("main:avaliacaoInstitucional", "main", $url);
894 }
895
896 return $url;
897 }
898
905 function GetAbsolutePath($rel = NULL)
906 {
907 $path = $this->getConf('home.miolo');
908
909 if ($rel)
910 {
911 // prepend path separator if necessary
912 if (substr($rel, 0, 1) != '/')
913 {
914 $path .= '/';
915 }
916
917 $path .= $rel;
918 }
919
920 return $path;
921 }
922
931 function GetAbsoluteURL($rel, $module = NULL)
932 {
933 global $MIOLOCONF;
934
935 if ($module)
936 {
937 $url = $this->getConf('home.url') . '/modules/' . $module;
938 }
939 else
940 {
941 // $url = $MIOLOCONF['home']['url'] . '/miolo';
942 $url = $this->getConf('home.url');
943 }
944
945 // prepend path separator if necessary
946 if (substr($rel, 0, 1) != '/')
947 {
948 $url .= '/';
949 }
950
951 $url .= $rel;
952
953 return $url;
954 }
955
959 function GetThemeURL($rel, $name = NULL, $default = NULL, $module = NULL)
960 {
961 global $MIOLOCONF;
962
963 if (substr($rel, 0, 1) == '/')
964 {
965 return $rel;
966 }
967
968 if (!$name)
969 {
970 $name = $this->theme->getId();
971 }
972
973 if (!$module)
974 {
975 if (($module = $this->theme->GetModule()) == NULL)
976 $module = 'miolo';
977 }
978
979 // $url = $this->getConf('home.url_themes') . '/' . $name . '/' . $rel;
980
981 $themesPath = $this->getConf('options.themespath');
982 if ( MUtil::getBooleanValue( $this->getConf('options.performance.uri_images') ) == true )
983 {
984 $url = $this->getConf('home.url') . "/themes/$name/$rel";
985 }
986 else if ( strlen($themesPath) > 0 )
987 {
988 $url = $this->getConf('home.url') . '/' . $themesPath . '/' . $name . '/' . $rel;
989 }
990 else
991 {
992 $url = $this->GetActionURL($module, 'themes:' . $name . ':' . $rel);
993 }
994
995 /*
996 if ( $default )
997 {
998 $path = $this->getConf('themes') . '/' . $name . '/' . $rel;
999
1000 if ( ! file_exists($path) )
1001 {
1002 $url = $default;
1003 }
1004 }
1005 */
1006 return $url;
1007 }
1008
1012 function GetModulePath($module, $file)
1013 {
1014 $path = $this->getConf('home.modules') . '/' . $module;
1015
1016 if (substr($file, 0, 1) != '/')
1017 {
1018 $path .= '/';
1019 }
1020
1021 $path .= $file;
1022 return $path;
1023 }
1024
1031 public static function getCurrentURL()
1032 {
1033 $amp = '&amp;';
1034 if ( $server = $_SERVER['HTTP_HOST'])
1035 {
1036 $url = str_replace('&',$amp,'//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
1037 }
1038 else
1039 {
1040 $url = $this->getConf('home.url') . '/' . $this->getConf('options.dispatch');
1041 }
1042 return $url;
1043 }
1044
1051 public static function getPreviousURL()
1052 {
1054 $context = $MIOLO->getContext();
1055 $url = $context->composeUrl('','',$context->getPreviousAction());
1056 return $url;
1057 }
1058
1059
1066 public static function getCurrentModule()
1067 {
1068 $module = self::_REQUEST('module');
1069
1070 // If module is not defined, get it from options.common configuration
1071 if ( !$module )
1072 {
1074 $module = $MIOLO->getConf('options.common');
1075 }
1076
1077 return $module;
1078 }
1079
1086 public static function getCurrentAction()
1087 {
1088 return self::_REQUEST('action');
1089 }
1090
1109 public static function _REQUEST( $vars, $from = 'ALL' )
1110 {
1111 if ( is_array($vars) )
1112 {
1113 foreach ( $vars as $v )
1114 {
1115 $values[$v] = $this->_REQUEST($v);
1116 }
1117
1118 return $values;
1119 }
1120 else
1121 {
1122 //
1123 $vars = str_replace('.', '_', $vars);
1124
1125 if ( $from == 'GET' )
1126 {
1127 if ( isset($_GET[$vars]) )
1128 {
1129 $value = $_GET[$vars];
1130 }
1131 else
1132 {
1133 $value = isset($_GET[strtolower($vars)]) ? $_GET[strtolower($vars)] : null;
1134 }
1135 }
1136 elseif ( $from == 'POST' )
1137 {
1138 if ( isset($_POST[$vars]) )
1139 {
1140 $value = $_POST[$vars];
1141 }
1142 else
1143 {
1144 $value = isset($_POST[strtolower($vars)]) ? $_POST[strtolower($vars)] : null;
1145 }
1146 }
1147 elseif ( $from == 'SESSION' )
1148 {
1149 if ( isset($_SESSION[$vars]) )
1150 {
1151 $value = $_SESSION[$vars];
1152 }
1153 else
1154 {
1155 $value = isset($_SESSION[strtolower($vars)]) ? $_SESSION[strtolower($vars)] : null;
1156 }
1157 }
1158 else
1159 {
1160 if ( isset($_REQUEST[$vars]) )
1161 {
1162 $value = $_REQUEST[$vars];
1163 }
1164 else
1165 {
1166 $value = isset($_REQUEST[strtolower($vars)]) ? $_REQUEST[strtolower($vars)] : null;
1167 }
1168 }
1169
1170 // If we still didn't has the value
1171 // let's try in the global scope
1172 if ( ( ! isset($value) ) && ( ( strpos($vars, '[') ) === false) )
1173 {
1174 if ( isset($_GLOBALS[$vars]) )
1175 {
1176 $value = $_GLOBALS[$vars];
1177 }
1178 else
1179 {
1180 $value = isset($_GLOBALS[strtolower($vars)]) ? $_GLOBALS[strtolower($vars)] : null;
1181 }
1182 }
1183
1184 // If we still didn't has the value
1185 // let's try in the session scope
1186
1187 if ( ! isset($value) )
1188 {
1189 if ( isset($_SESSION[$vars]) )
1190 {
1191 $value = $_SESSION[$vars];
1192 }
1193 else
1194 {
1195 $value = isset($_SESSION[strtolower($vars)]) ? $_SESSION[strtolower($vars)] : null;
1196 }
1197 }
1198
1199 if(isset($_COOKIE[$vars]) && !isset($value))
1200 {
1201 $value = $_COOKIE[$vars];
1202 }
1203
1204 return $value;
1205 }
1206 }
1207
1208 function GetSysTime()
1209 {
1210 return date('d/m/Y H:i:s');
1211 }
1212
1213 function CheckLogin()
1214 {
1215 return $this->auth->CheckLogin();
1216 }
1217
1218 function CheckAccess($trans, $access, $deny = false, $group=false, $login = false)
1219 {
1220 return $this->perms->CheckAccess($trans, $access, $deny, $group, $login);
1221 }
1222
1223 function IsHostAllowed()
1224 {
1225 global $MIOLOCONF;
1226
1227 $REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
1228 $ReturnValue = false;
1229
1230 foreach ($MIOLOCONF['hosts']['allow'] as $h)
1231 {
1232 if ($REMOTE_ADDR == $h)
1233 {
1234 $ReturnValue = true;
1235 }
1236
1237 // Is it a interval of IP's?
1238 if ((strpos($h,
1239 '-') > 0) && (substr($h, 0,
1240 strrpos($h, '.')) == substr($REMOTE_ADDR, 0, strrpos($REMOTE_ADDR, '.'))))
1241 {
1242 list($FirstIP, $LastIP) = explode('-', $h);
1243 $LastIP = substr($FirstIP, 0, strrpos($FirstIP, '.') + 1) . $LastIP;
1244
1245 $RemoteIP = substr($REMOTE_ADDR, strrpos($REMOTE_ADDR, '.') + 1, strlen($REMOTE_ADDR));
1246 $StartIP = substr($FirstIP, strrpos($FirstIP, '.') + 1, strlen($FirstIP));
1247 $EndIP = substr($LastIP, strrpos($LastIP, '.') + 1, strlen($LastIP));
1248
1249 if (($StartIP < $RemoteIP) && ($EndIP > $RemoteIP))
1250 {
1251 $ReturnValue = true;
1252 }
1253 }
1254 }
1255
1256 foreach ($MIOLOCONF['hosts']['deny'] as $h)
1257 {
1258 if ($REMOTE_ADDR == $h)
1259 {
1260 $ReturnValue = false;
1261 }
1262 }
1263
1264 return $ReturnValue;
1265 }
1266
1279 function GetDatabase($conf = NULL, $user = NULL, $pass = NULL)
1280 {
1281 global $MIOLOCONF;
1282 $parameters = null;
1283
1284 $this->profileEnter('MIOLO::GetDatabase');
1285
1286 if (isset($this->dbconf[$conf]))
1287 {
1288 $db = $this->dbconf[$conf];
1289 }
1290 else
1291 {
1292 try
1293 {
1294 if (!$conf)
1295 {
1296 $conf = $this->db;
1297 }
1298
1299 // evita erros causados no SAGU em modulos novos
1300 if ( !($this->getConf("db.$conf.user")) && isset($this->dbconf['basic']) )
1301 {
1302 $conf = 'basic';
1303 }
1304
1305 // $this->Assert($conf, 'GetDataBase() ' . _M('Error') . ": $conf - " . _M("Database configuration missing in miolo.conf!"));
1306 if (!$conf)
1307 throw new EDatabaseException($conf,"Database configuration missing in miolo.conf!");
1308
1309 $db_host = $this->getConf("db.$conf.host");
1310 $db_name = $this->getConf("db.$conf.name");
1311 $db_system = $this->getConf("db.$conf.system");
1312 $db_port = $this->getConf("db.$conf.port");
1313
1314 if ($this->getConf('login.shared'))
1315 {
1316 $db_user = $this->getConf("db.$conf.user");
1317 $db_pass = $this->getConf("db.$conf.password");
1318
1319 if (!(isset($db_user) && isset($db_pass)))
1320 throw new EDatabaseException($conf,"Configuration in miolo.conf is missing login for this database!");
1321
1322 // $this->Assert(isset($db_user)&&isset($db_pass),
1323 // 'GetDataBase() ' .
1324 // _M('Error') .
1325 // ": $conf - " .
1326 // _M("Configuration in miolo.conf is missing login for this database!"));
1327 }
1328 else
1329 {
1330 $db_user = $user ? $user : $this->login->id;
1331 $db_pass = $pass ? $pass : $this->login->password;
1332 }
1333
1334 if ( MUtil::getBooleanValue($this->getConf('login.dbuser')) && strlen($this->login->id) )
1335 {
1336 $db_user = $this->login->id;
1337 }
1338
1339 $db = new MDatabase($conf, $db_system, $db_host, $db_name, $db_user, $db_pass, $parameters, $db_port);
1340 $this->dbconf[$conf] = &$db;
1341 }
1342 catch( Exception $e )
1343 {
1344 throw $e;
1345 }
1346 }
1347
1348 // $this->Dump(array($db_host,$db_name,$db_user,$db_pass,$this->login),__FILE__,__LINE__);
1349 $this->profileExit('MIOLO::GetDatabase');
1350 return $db;
1351 }
1352
1353 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1354 # Como o MIOLO é capaz de abrigar módulos diferentes, era preciso
1355 # adotar um esquema para evitar possíveis colisões de nomes de classes.
1356 # Teoricamente dois modulos poderiam definir uma classe, por exemplo,
1357 # 'Guestbook' que, utilizada simultaneamente, causaria problemas.
1358 # <br><br>
1359 # O MIOLO espera que classes do tipo 'Business' tenham o seu nome composto
1360 # de 'Business' + 'nome do module' + 'nome da classe'. Mas para evitar
1361 # redundâncias adotou-se o padrão de somente usar o nome básico da classe
1362 # para definir o nome do arquivo, já que o mesmo se encontra dentro da estrutura
1363 # de diretórios do módulo em questão.
1364 #
1365 # @example
1366 # <i>/* in file: ../modules/foo/db/guestbook.class */</i>
1367 # &lt;?
1368 #
1369 # class BusinessFooGuestbook extends Business
1370 # {
1371 # function AddVisitor($data)
1372 # {
1373 # ...
1374 # ?&gt;
1375 # <hr>
1376 # <i>/* in file: ../modules/foo/handlers/register.inc */</i>
1377 # &lt;?
1378 # ...
1379 # $guestbook = MIOLO::getInstance()->getBusiness( 'foo', 'guestbook' );
1380 # $data = $form->GetData();
1381 # result = $guestbook->AddVisitor( $data );
1382 # ...
1383 # ?&gt;
1384 #
1385 # @see miolo/miolo.class#MIOLO::GetDatabase,
1386 # miolo/ui/form.class#Form::GetData
1387 #---------------------------------------------------------------------
1396 function GetBusiness($module, $name = 'main', $data = NULL)
1397 {
1398 $this->profileEnter('MIOLO::GetBusiness');
1399 $path = $this->getModulePath($module, 'types.class');
1400
1401 if(file_exists($path))
1402 {
1403 $this->Uses('types.class', $module);
1404 }
1405
1406 // compose the name of the class, wich must be defined in the file
1407 // ../modules/$module/db/$name.class
1408 $class = 'Business' .
1409 strtoupper(substr($module,0,1)) . substr($module,1) .
1410 strtoupper(substr($name,0,1)) . substr($name,1);
1411
1412 // try to open the file in the ../modules/$module/db dir (default) or
1413 // ../modules/$module/classes (only for compatibility purpose *don't use it*)
1414 // if the file doesn't exist raise exception, otherwise we'll
1415 // receive an eval error
1416 if ( ! ( $this->Import('modules::' . $module . '::db::'. $name, $class) ||
1417 $this->Import('modules::' . $module . '::classes::'. $name, $class) )
1418 )
1419 {
1420 throw new EBusinessException( _M('Error in GetBusiness: Class not Found! <BR>Class name: ') . $class . '<BR><BR>This class should exist in file ' . $this->getConf('home.modules') . '/' . $module . "/db/$name.class ");
1421 }
1422
1423 // instanciate a new class
1424 $business = new $class($data);
1425 $business instanceof MBusiness;
1426 $business->_bmodule = $module;
1427 $business->_bclass = $name;
1428 $business->OnCreate($data);
1429 $this->profileExit('MIOLO::GetBusiness');
1430 return $business;
1431 }
1432
1433 function GetBusinessMAD($name = 'main', $data = NULL)
1434 {
1435 $class = $this->getConf('mad.classes.' . $name);
1436
1437 // get access to the mad module cnofiguration
1438 $this->loadMADConf();
1439
1440 return $this->GetBusiness($this->mad, $class, $data);
1441 }
1442
1443 public function loadMADConf()
1444 {
1445 $this->conf->loadConf( $this->mad );
1446 }
1447
1448 function getClass($module,$name)
1449 {
1450 $this->uses("/classes/$name.class", $module);
1451 }
1452
1456 function getUI()
1457 {
1458 return new MUI();
1459 }
1460
1469 function getTheme($themeId = '', $layout = 'default')
1470 {
1471 $this->profileEnter('MIOLO::getTheme');
1472
1473 if ( $themeId == '' )
1474 {
1475 $themeId = $this->getConf('theme.main');
1476 }
1477
1478 if ( is_object( $this->theme ) )
1479 {
1480 if ( $this->theme->getId() == $themeId )
1481 {
1482 return $this->theme;
1483 }
1484 }
1485
1486 $themeTitle = $this->getConf('theme.title');
1487 $class = 'Theme';
1488 $module = $this->getConf('theme.module');
1489 $namespace = ( $module != '' ) && ( $module != 'miolo' )
1490 ? 'modules::' . $module . '::themes::' . $themeId . '::theme'
1491 : 'core::themes::' . $themeId . '::theme';
1492 $path = $this->Import($namespace, $class);
1493
1494 $this->theme = new $class;
1495 $this->theme->setLayout($layout);
1496 $this->theme->setModule($module);
1497 $this->theme->setPath(dirname($path));
1498 $this->theme->init();
1499
1500 $this->profileExit('MIOLO::getTheme');
1501
1502 return $this->theme;
1503 }
1504
1508 function getPainter()
1509 {
1510 if ( is_null($this->painter) )
1511 {
1512 $this->painter = new MHtmlPainter();
1513 }
1514
1515 return $this->painter;
1516 }
1517
1518 //
1519 // Dialogs and Error Handling
1520 // Error
1521 // Information
1522 // Confirmation
1523 // Question
1524 // Prompt
1525 //
1526
1527 function error($msg = '', $goto = '', $caption = '', $event = '', $halt = true)
1528 {
1529 $this->prompt( Prompt::Error($msg, $goto, $caption, $event), $halt );
1530 }
1531
1532 function alert($msg = '', $goto = '', $caption = '', $event = '', $halt = true)
1533 {
1534 $this->prompt( Prompt::Alert($msg, $goto, $event), $halt );
1535 }
1536
1537 function information($msg, $goto = '', $event = '', $halt = true)
1538 {
1539 $this->prompt( Prompt::Information($msg, $goto, $event), $halt );
1540 }
1541
1542 function confirmation($msg, $gotoOK = '', $gotoCancel = '', $eventOk = '', $eventCancel = '', $halt = true)
1543 {
1544 $this->prompt( Prompt::Confirmation($msg, $gotoOK, $gotoCancel, $eventOk, $eventCancel), $halt );
1545 }
1546
1547 function question($msg, $gotoYes = '', $gotoNo = '', $eventYes = '', $eventNo = '', $halt = true)
1548 {
1549 $this->prompt( Prompt::Question($msg, $gotoYes, $gotoNo, $eventYes, $eventNo), $halt );
1550 }
1551
1552 function prompt($prompt, $halt = true)
1553 {
1554 $this->trace('MIOLO::prompt');
1555
1556 //Se a requisição for feita pela API não renderiza o erro
1557 if ($GLOBALS['REQUISICAO_PELA_API'])
1558 {
1559 throw new Exception($prompt->message);
1560 }
1561
1562 $spacer = new MSpacer();
1563 $this->theme->insertContent($spacer);
1564 $this->theme->insertContent($prompt);
1565 $this->theme->setHalted($halt);
1566
1567 if( $halt )
1568 {
1569 $this->page->generate();
1570 exit;
1571 }
1572 }
1573
1574 //
1575 // Log, Trace, Dum, Profile
1576 //
1577 function setLog($logname)
1578 {
1579 $this->log->setLog($logname);
1580 }
1581
1585 public function getLogObject()
1586 {
1587 return $this->log;
1588 }
1589
1590 function logSQL($sql, $force = false, $conf = '?')
1591 {
1592 $this->log->logSQL($sql, $force, $conf);
1593 }
1594
1595 function logError($error, $conf = 'miolo')
1596 {
1597 $this->log->logError($error, $conf);
1598 }
1599
1603 public function getLog()
1604 {
1605 return $this->log;
1606 }
1607
1608 function profileTime()
1609 {
1610 return $this->profile->profileTime();
1611 }
1612
1613 function profileEnter($name)
1614 {
1615 $this->profile->profileEnter($name);
1616 }
1617
1618 function profileExit($name)
1619 {
1620 $this->profile->profileExit($name);
1621 }
1622
1623 function profileDump()
1624 {
1625 return $this->profile->profileDump();
1626 }
1627
1629 {
1630 return $this->profile->GetProfileDump();
1631 }
1632
1633 function usesDump()
1634 {
1635 return $this->dump->usesDump();
1636 }
1637
1638 function dump($var, $file = false, $line = false, $info = false)
1639 {
1640 return $this->dump->dump($var, $file, $line, $info);
1641 }
1642
1643 function iLogging()
1644 {
1645 return $this->log->isLogging();
1646 }
1647
1648 function logMessage($msg)
1649 {
1650 return $this->log->logMessage($msg);
1651 }
1652
1653 function deprecate($msg)
1654 {
1655 $this->logMessage('[DEPRECATED]' . $msg);
1656 }
1657
1658 function trace($msg, $file = false, $line = 0)
1659 {
1660 $this->trace->trace($msg, $file, $line);
1661 }
1662
1663 function traceDump()
1664 {
1665 return $this->trace->traceDump();
1666 }
1667
1668 //
1669 // Files methods
1670 // GetThemes
1671 // ListFiles
1672 //
1673 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1674 # Returns a array with the existing themes
1675 #---------------------------------------------------------------------
1676 function GetThemes()
1677 {
1678 global $MIOLOCONF;
1679
1680 $themes = MIOLO::ListFiles($MIOLOCONF['home']['themes'] . "/");
1681
1682 ksort ($themes);
1683 reset ($themes);
1684
1685 return ($themes);
1686 }
1687
1688 function ListFiles($dir, $type = 'd')
1689 {
1690 $result = '';
1691
1692 if (is_dir($dir))
1693 {
1694 $thisdir = dir($dir);
1695
1696 while ($entry = $thisdir->read())
1697 {
1698 if (($entry != '.') && ($entry != '..') && (substr($entry, 0, 1) != '.'))
1699 {
1700 if ($type == 'a')
1701 {
1702 $result[$entry] = $entry;
1703 next;
1704 }
1705
1706 $isFile = is_file("$dir$entry");
1707 $isDir = is_dir("$dir$entry");
1708
1709 if (($type == 'f') && ($isFile))
1710 {
1711 $result[$entry] = $entry;
1712 next;
1713 }
1714
1715 if (($type == "d") && ($isDir))
1716 {
1717 $result[$entry] = $entry;
1718 next;
1719 }
1720 }
1721 }
1722 }
1723
1724 return $result;
1725 }
1726
1732 function SaveFile($module = '', $filename, $dir = 'html/files/')
1733 {
1734 if (empty($filename))
1735 {
1736 return false;
1737 }
1738
1739 $this->profileEnter('MIOLO::SaveFile');
1740 $this->Trace(">>ENTERING: MIOLO::SaveFile($module,$filename)");
1741 $path = $this->GetModulePath($module, $dir);
1742 $this->DownloadFile($path . $filename);
1743 $this->profileExit('MIOLO::SaveFile');
1744 }
1745
1771 public static function vd($variable, $forceType=null)
1772 {
1773 include_once('contrib/dbug.class');
1774
1775 if ( $forceType != null )
1776 {
1777 new dBug($variable);
1778 }
1779 else
1780 {
1781 new dBug($variable, "$forceType");
1782 }
1783
1784 }
1785
1792 public static function var_dump($variable, $forceType=null)
1793 {
1794 self::vd($variable, $forceType);
1795 }
1796
1797 public static function updateLoading($value)
1798 {
1799 // temporarily not available
1800 return;
1801
1802 echo '<SCRIPT LANGUAGE="javascript">';
1803 echo 'document.getElementById("loading").innerHTML = "'.$value.'"';
1804 echo '</SCRIPT>';
1805 flush();
1806 }
1807
1808 public function getRequiredJS4Ajax()
1809 {
1810 $this->page->addScript('x/x_core.js');
1811 $this->page->addScript('cpaint/cpaint.inc.js');
1812 $this->page->addScript('datepicker/calendar.js');
1813 $this->page->addScript('datepicker/lang/calendar-pt-br.js');
1814 $this->page->addScript('datepicker/calendar-setup.js');
1815
1816 $styleURL = $this->getAbsoluteURL('scripts/datepicker/css/calendar-win2k-1.css');
1817 $this->page->addStyleURL($styleURL);
1818 }
1819
1825 public static function isDebugMode()
1826 {
1828 return $MIOLO->getConf('options.debugmode') == true;
1829 }
1830
1836 public function clearDbConf($module)
1837 {
1838 if ( isset($this->dbconf[$module]) )
1839 {
1840 $conn = $this->dbconf[$module];
1841
1842 if ( $conn instanceof MConnection )
1843 {
1844 $conn->_close();
1845 }
1846
1847 unset($this->dbconf[$module]);
1848 }
1849 }
1850
1851 public static function getVersion()
1852 {
1853 return MIOLO_VERSION_NUMBER;
1854 }
1855
1859 public function getCacheSQL()
1860 {
1861 return $this->cacheSQL;
1862 }
1863
1864 public function setCacheSQL($cacheSQL)
1865 {
1866 $this->cacheSQL = $cacheSQL;
1867 }
1868}
1869?>
OnCreate($data=NULL)
Definição mbusiness.class:21
Definição mdump.class:7
getCacheSQL()
Definição miolo.class:1859
$_version
Definição miolo.class:18
getUI()
Definição miolo.class:1456
SaveFile($module='', $filename, $dir='html/files/')
Definição miolo.class:1732
Scramble($text)
Definição miolo.class:567
IsHostAllowed()
Definição miolo.class:1223
static getPreviousURL()
Definição miolo.class:1051
GetActionURL($module='', $action='NONE', $item='', $args=NULL, $dispatch=NULL, $scramble=false)
Definição miolo.class:816
__construct()
Definição miolo.class:124
loadMADConf()
Definição miolo.class:1443
GetPage()
Definição miolo.class:675
$page
Definição miolo.class:68
dump($var, $file=false, $line=false, $info=false)
Definição miolo.class:1638
GetSession()
Definição miolo.class:612
$pass
Definição miolo.class:36
DownloadFile($fileName)
Definição miolo.class:266
SetConf($key, $value)
Definição miolo.class:553
getRequiredJS4Ajax()
Definição miolo.class:1808
static getVersion()
Definição miolo.class:1851
$theme
Definição miolo.class:43
profileTime()
Definição miolo.class:1608
Init( $home=NULL, $logname='miolo')
Definição miolo.class:323
GetSysTime()
Definição miolo.class:1208
confirmation($msg, $gotoOK='', $gotoCancel='', $eventOk='', $eventCancel='', $halt=true)
Definição miolo.class:1542
saguCompatibility($url)
Definição miolo.class:870
profileExit($name)
Definição miolo.class:1618
$auth
Definição miolo.class:78
getHandler( $module)
Definição miolo.class:521
static updateLoading($value)
Definição miolo.class:1797
prompt($prompt, $halt=true)
Definição miolo.class:1552
information($msg, $goto='', $event='', $halt=true)
Definição miolo.class:1537
setLog($logname)
Definição miolo.class:1577
$mad
Definição miolo.class:99
HandlerRequestApi()
Definição miolo.class:144
GetBusinessMAD($name='main', $data=NULL)
Definição miolo.class:1433
question($msg, $gotoYes='', $gotoNo='', $eventYes='', $eventNo='', $halt=true)
Definição miolo.class:1547
error($msg='', $goto='', $caption='', $event='', $halt=true)
Definição miolo.class:1527
getConf($key)
Definição miolo.class:548
static isDebugMode()
Definição miolo.class:1825
Handler()
Definição miolo.class:395
CheckLogin()
Definição miolo.class:1213
uses($name, $module=NULL)
Definição miolo.class:695
ListFiles($dir, $type='d')
Definição miolo.class:1688
profileDump()
Definição miolo.class:1623
deprecate($msg)
Definição miolo.class:1653
$user
Definição miolo.class:35
GetAbsolutePath($rel=NULL)
Definição miolo.class:905
GetAuth()
Definição miolo.class:620
$trace
Definição miolo.class:61
$pagepainter
Definição miolo.class:48
GetContext($url='', $style=0, $scramble=false)
Definição miolo.class:600
getTheme($themeId='', $layout='default')
Definição miolo.class:1469
logError($error, $conf='miolo')
Definição miolo.class:1595
SetDispatcher($url)
Definição miolo.class:587
GetAbsoluteURL($rel, $module=NULL)
Definição miolo.class:931
GetDatabase($conf=NULL, $user=NULL, $pass=NULL)
Definição miolo.class:1279
logMessage($msg)
Definição miolo.class:1648
SendFile($fileName, $fileNameDown=null)
Definição miolo.class:249
static getCurrentModule()
Definição miolo.class:1066
static _REQUEST( $vars, $from='ALL')
Definição miolo.class:1109
InvokeHandler($module, $action)
Definição miolo.class:508
$sqllog
Definição miolo.class:37
$controlpainter
Definição miolo.class:47
alert($msg='', $goto='', $caption='', $event='', $halt=true)
Definição miolo.class:1532
GetThemeURL($rel, $name=NULL, $default=NULL, $module=NULL)
Definição miolo.class:959
UsesBusiness($module, $name='main')
Definição miolo.class:753
HandlerRequest()
Definição miolo.class:176
profileEnter($name)
Definição miolo.class:1613
$halted
Definição miolo.class:97
clearDbConf($module)
Definição miolo.class:1836
static var_dump($variable, $forceType=null)
Definição miolo.class:1792
GetLogin()
Definição miolo.class:667
$_author
Definição miolo.class:19
logSQL($sql, $force=false, $conf='?')
Definição miolo.class:1590
GetModulePath($module, $file)
Definição miolo.class:1012
iLogging()
Definição miolo.class:1643
Terminate()
Definição miolo.class:543
$themepainter
Definição miolo.class:45
$perms
Definição miolo.class:83
GetThemes()
Definição miolo.class:1676
getProfileDump()
Definição miolo.class:1628
GetBusiness($module, $name='main', $data=NULL)
Definição miolo.class:1396
traceDump()
Definição miolo.class:1663
Import($namespace, $class='')
Definição miolo.class:277
$profile
Definição miolo.class:54
$logdb
Definição miolo.class:95
static getCurrentAction()
Definição miolo.class:1086
static vd($variable, $forceType=null)
Definição miolo.class:1771
getPainter()
Definição miolo.class:1508
$painter
Definição miolo.class:98
setCacheSQL($cacheSQL)
Definição miolo.class:1864
$session
Definição miolo.class:88
$errlog
Definição miolo.class:38
$dbconf
Definição miolo.class:96
CheckAccess($trans, $access, $deny=false, $group=false, $login=false)
Definição miolo.class:1218
static getCurrentURL()
Definição miolo.class:1031
UnScramble($text)
Definição miolo.class:577
static getInstance()
Definição miolo.class:134
SendText($string, $type, $fileName)
Definição miolo.class:238
usesDump()
Definição miolo.class:1633
$trace_socket
Definição miolo.class:29
trace($msg, $file=false, $line=0)
Definição miolo.class:1658
$context
Definição miolo.class:73
$state
Definição miolo.class:93
$themelayout
Definição miolo.class:46
$error
Definição miolo.class:63
$uses
Definição miolo.class:56
GetPerms()
Definição miolo.class:644
getClass($module, $name)
Definição miolo.class:1448
Assert($cond, $msg='', $goto='')
Definição miolo.class:558
getLog()
Definição miolo.class:1603
GetHistory()
Definição miolo.class:685
getLogObject()
Definição miolo.class:1585
Definição mlog.class:10
Definição mpage.class:6
static Error($msg='', $goto='', $caption='', $event='')
Definição mprompt.class:90
static Question($msg, $gotoYes='', $gotoNo='', $eventYes='', $eventNo='')
Definição mprompt.class:150
static Information($msg, $goto='', $event='')
Definição mprompt.class:108
static Confirmation($msg, $gotoOK='', $gotoCancel='', $eventOk='', $eventCancel='')
Definição mprompt.class:138
static Alert($msg, $goto='', $event='')
Definição mprompt.class:123
Definição mui.class:4
static NVL($value1, $value2)
Definição mutil.class:38
static getBooleanValue($value)
Definição mutil.class:100
Definição dbug.class:129
const MIOLO_VERSION_NUMBER
Definição miolo.class:2
$action
Definição base.php:4
$url
Definição base.php:2