2define(
'MIOLO_VERSION_NUMBER', 2.0);
3define(
'MIOLO_VERSION',
'Miolo 2.0 RC1');
4define(
'MIOLO_AUTHOR',
'Miolo Team');
6define(
'OP_INS',
'INS');
7define(
'OP_UPD',
'UPD');
8define(
'OP_DEL',
'DEL');
10require_once
'utils/msimplexml.class';
11require_once
'utils/mcontext.class';
12require_once
'utils/mconfigloader.class';
13require_once
'utils/mrc4crypt.class';
24 static private $instance = NULL;
118 private $cacheSQL =
false;
136 if (self::$instance == NULL)
138 self::$instance =
new Miolo;
141 return self::$instance;
146 global $REQUISICAO_PELA_API;
147 $REQUISICAO_PELA_API =
true;
149 require_once
'support.inc';
152 $this->conf->LoadConf();
158 require_once __DIR__ .
'/../modules/basic/classes/sAutoload.class';
159 $sAutoLoad =
new sAutoLoad();
160 $sAutoLoad->definePaths();
164 $msg = $e->getMessage();
165 $msg =
"Fatal Error: [$msg]";
167 if ( $this->
getConf(
'options.message.error') && $e->getCode() === 0 )
169 $msg = $this->
getConf(
'options.message.error');
179 $this->conf->LoadConf();
180 $scramble = $this->
getConf(
'options.scramble');
181 $urlStyle = $this->
getConf(
'options.url.style');
182 $this->context = $this->
GetContext(
'',$urlStyle,$scramble);
184 if ($this->context->isFile)
186 if ($this->context->isRoot)
188 $path = $this->
getConf(
'home.' . $this->context->fileArea);
192 $path = $this->
getConf(
'home.modules') .
'/' . $this->context->module . $this->
getConf(
'home.module.' . $this->context->fileArea);
195 $fileName = $path . $this->context->fileName;
196 $pathinfo = pathinfo($fileName);
198 if ($pathinfo[
'extension'] ==
'tpl')
200 include (
'utils/template.class');
202 $this->
SendText($tpl->text, $tpl->mimeType, $fileName);
204 elseif ($pathinfo[
'extension'] ==
'php')
206 echo include($fileName);
215 require_once
'support.inc';
225 $msg = $e->getMessage();
226 $msg =
"Fatal Error: [$msg]";
228 if ( $this->
getConf(
'options.message.error') && $e->getCode() === 0 )
230 $msg = $this->
getConf(
'options.message.error');
242 include (
'utils/mdownload.class');
244 $d->setFileName($fileName);
245 $d->SendText($string, $type);
251 if (!empty($fileName) && file_exists($fileName))
253 include_once (
'utils/mdownload.class');
255 $d->setFileName($fileName);
257 if ( strlen($fileNameDown) > 0 )
259 $d->setFileNameDown($fileNameDown);
268 if (!empty($fileName) && file_exists($fileName))
270 include_once (
'utils/mdownload.class');
272 $d->setFileNameDown($fileName);
277 public function Import($namespace, $class =
'')
279 $m = MIOLO::GetInstance();
280 $m->profileEnter(
'MIOLO::import');
282 if (!array_key_exists($namespace, $m->import))
284 $path = $m->getConf(
'home.miolo');
286 $tokens = explode(
'::', $namespace);
288 foreach ($tokens as $token)
290 $ns .= (($ns !=
'') ?
'.' :
'') . $token;
292 if ($ss = $m->getConf(
'namespace.' . $ns))
296 elseif ($ss = $m->getConf(
'namespace.' . $token))
302 $path .=
'/' . $token;
308 $pathinfo = pathinfo($path);
309 $path .= (empty($pathinfo[
'extension']) ?
'.class' :
'');
310 if ( $result = file_exists($path) )
312 $class = ($class !=
'') ? $class : $last;
313 $m->Trace(
"[IMPORT] $namespace - $class - $path");
314 $m->autoload->setFile($class, $path);
315 $m->import[$namespace] = $class;
319 $m->profileExit(
'MIOLO::import');
323 function Init( $home = NULL, $logname =
'miolo' )
327 include_once (
'services/mservice.class' );
328 include_once (
'flow/mexception.class' );
329 include_once (
'utils/mxmltree.class' );
330 include_once (
'utils/mautoload.class' );
332 $this->handlers = array();
333 $this->
uses = array();
334 $this->
import = array();
335 $this->autoload = $autoload =
new MAutoLoad();
336 $this->log =
new MLog();
343 $this->session->start( $this->
_REQUEST(
'sid') );
345 $this->LogMessage(
'[RESET_LOG_MESSAGES]');
346 $this->
Trace(
"Constructing main class", __FILE__, __LINE__);
347 if (!is_null($this->context->module))
349 $this->conf->LoadConf($this->context->module);
353 if ($this->
getConf(
'home.url') == NULL)
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");
362 $this->dispatch = $this->
getConf(
'home.url') .
'/' . $this->
getConf(
'options.dispatch');
365 $this->startup = $this->
getConf(
'options.startup') != NULL ? $this->
getConf(
'options.startup') :
'admin';
367 if ($this->startup != $this->context->module)
369 $this->conf->LoadConf($this->startup);
373 $this->dumpping = $this->
getConf(
'options.dump');
376 $this->mad = $this->
getConf(
'mad.module');
383 $this->SetLog($logname);
385 require_once $this->
getConf(
'home.modules') .
'/modules.inc';
387 $this->auth = $this->
GetAuth();
388 $this->perms = $this->getPerms();
390 $this->persistence->setConfigLoader(
'XML');
400 $this->context->setStyle($this->
getConf(
'options.url.style'));
401 $this->history =
new MHistory($this);
402 $this->page =
new MPage();
406 if($this->
getConf(
'logs.handler') ==
'screen')
408 $this->page->AddScript(
'm_error_handler.js');
411 $this->session->CheckTimeout();
413 if ( isset($_REQUEST[
"__GENERATEHEADERFIRST"]) )
415 if( $_REQUEST[
"__GENERATEHEADERFIRST"] ===
"yes" )
418 if( is_null(
MIOLO::_REQUEST(
"cpaint_function")) && !stristr($_REQUEST[
'__EVENTTARGETVALUE'],
'exportGridAs'))
420 $this->page->GenerateHeader();
431 if($_SESSION[
'isCentral'] ==
true && !SAGU::isAllowedAction())
437 if(
$action ==
'main:document:generateReport')
439 $filters =
new stdClass();
441 $reportInfo =
new BasUploadReportInfo();
442 $report = $reportInfo->search($filters);
444 if($report->authenticationRequired == DB_FALSE)
446 $this->
error(
'Acesso negado.');
451 $allowedAction = explode(
',', SAGU::getParameter(
'BASIC',
'TRANSACTIONS_PERMITED_WITH_DATEANDCPF_LOGIN'));
455 $filters =
new stdClass();
457 $transactions = AdmMioloTransaction::search($filters);
461 foreach ($transactions as $key => $transaction)
463 if(in_array($transaction->idTransaction, $allowedAction))
469 if($block ==
true || count($transactions) == 0)
471 $this->
error(
'Acesso negado.');
477 $this->
InvokeHandler($this->context->module, $a=$this->context->shiftAction());
480 $uri = $_SERVER[
'SCRIPT_NAME'];
482 if ( !isset($_REQUEST[
'webservice']) && !isset($_REQUEST[
'WSDL']) && strpos($uri,
'wsdl.php') === FALSE )
484 $this->page->Generate();
488 $this->history->Close();
491 if( $this->
getConf(
'logs.handler') ==
'screen' && $this->log->content )
493 echo
"<script language=\"javascript\">".
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();
510 $this->
Trace(
"InvokeHandler: $module::$action");
512 if ($return = (
$action != NULL))
514 $handler = $this->GetHandler($module);
515 $return = $handler->dispatch(
$action);
523 $this->
trace(
"getHandler: $module" );
525 $class =
'Handler' . ucfirst( strtolower( $module ) );
527 if ( isset($this->handlers[$class]) )
529 $handler = $this->handlers[$class];
533 $this->
uses(
'handlers/handler.class', $module );
534 $handler = $this->handlers[$class] =
new $class( $this, $module );
545 $this->session->freeze();
550 return $this->conf->getConf($key);
555 $this->conf->setConf($key, $value);
558 function Assert($cond, $msg =
'', $goto =
'')
562 $this->LogMessage(
'[ERROR]' . $msg);
563 $this->Error($msg, $goto, _M(
'Fatal Error!'));
569 $pwd = $this->
getConf(
'scramble.password');
571 $crypto = base64_encode($rc4->rc4($pwd,$text));
572 $result = urlencode($crypto);
579 $pwd = $this->
getConf(
'scramble.password');
581 $crypto = urldecode($text);
582 $result = $rc4->rc4($pwd,base64_decode($crypto));
589 $this->dispatch =
$url;
602 if (is_null($this->context))
622 if (is_null($this->auth))
624 $class = strtolower($this->
getConf(
'login.class'));
629 if ( ! $this->
import(
'classes::security::' . $class) )
634 $this->auth =
new $class();
646 if (is_null($this->perms))
648 $class = strtolower($this->
getConf(
'login.perms'));
653 if ( ! $this->
import(
'classes::security::' . $class) )
658 $this->perms =
new $class();
669 return MUtil::NVL($this->auth->GetLogin(), isset($GLOBALS[
'login']) ? $GLOBALS[
'login'] :
null);
677 if (empty($this->page))
679 $this->page =
new MPage();
687 if (empty($this->history))
689 $this->history =
new MHistory($this);
692 return $this->history;
695 function uses($name, $module = NULL)
702 $unique = ( $module != NULL ? $module :
'classes' ) .
'::' . $name;
704 if (!array_key_exists($unique, $this->
uses))
708 $path = $this->getModulePath($module, $name);
712 $path = $this->getAbsolutePath(
'classes/' . $name);
715 if (!file_exists($path))
717 $path = str_replace(
"/miolo20/",
"/miolo26/", $path);
720 if (!file_exists($path))
722 $path = str_replace(
'/miolo20/',
'/miolo26/', $path);
725 if (!file_exists($path))
730 $this->
uses[$unique] = array($name, filesize($path));
733 if (isset($GLOBALS[
'REQUISICAO_PELA_API']))
735 if (!in_array($name, array(
'classes/sform.class')))
737 include_once ($path);
743 include_once ($path);
759 $class =
'Business' .
760 strtoupper(substr($module,0,1)) . substr($module,1) .
761 strtoupper(substr($name,0,1)) . substr($name,1);
763 if (!isset($this->usesBusiness[$class]))
769 if ( ! ( $this->
Import(
'modules::' . $module .
'::db::'. $name, $class) ||
770 $this->
Import(
'modules::' . $module .
'::classes::'. $name, $class) )
773 throw new EUsesException($this->
getConf(
'home.modules') .
'/' . $module .
"/db/$name.class ", _M(
'Error in UsesBusiness: Class not Found! <BR>Class name: ') );
776 $class = strtolower($class);
777 $this->usesBusiness[$class][
'module'] = $module;
778 $this->usesBusiness[$class][
'name'] = $name;
816 function GetActionURL($module =
'',
$action =
'NONE', $item =
'', $args = NULL, $dispatch = NULL, $scramble =
false)
821 if ( is_object( $module ) )
823 $obj = clone( $module );
827 $dispatch = $obj->dispatch;
828 $scramble = $obj->scramble;
830 $module = $obj->module;
833 if (is_null($dispatch))
835 $dispatch = $this->dispatch;
844 foreach ($args as $key => $value)
846 if (!($value instanceof stdClass) )
848 $qs .= $amp .
"$key=".$value;
872 $genericReports = (preg_match(
'/main:document:genericReports/',
$url) || preg_match(
'/main:report:genericReports/',
$url));
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) ||
878 (preg_match(
'/main:report/',
$url) && !preg_match(
'/\?module=(portal)&/',
$url))
881 $url = str_replace(
'/miolo26/',
'/miolo20/',
$url);
883 else if ( preg_match(
'/\?module=(portal)&/',
$url) &&
884 !preg_match(
'/main:document:generateReport/',
$url) &&
887 $url = str_replace(
'/miolo20/',
'/miolo26/',
$url);
891 if ( preg_match(
'/action=main:avaliacaoInstitucional/',
$url) )
893 $url = str_replace(
"main:avaliacaoInstitucional",
"main",
$url);
907 $path = $this->
getConf(
'home.miolo');
912 if (substr($rel, 0, 1) !=
'/')
937 $url = $this->
getConf(
'home.url') .
'/modules/' . $module;
946 if (substr($rel, 0, 1) !=
'/')
959 function GetThemeURL($rel, $name = NULL, $default = NULL, $module = NULL)
963 if (substr($rel, 0, 1) ==
'/')
970 $name = $this->theme->getId();
975 if (($module = $this->theme->GetModule()) == NULL)
981 $themesPath = $this->
getConf(
'options.themespath');
984 $url = $this->
getConf(
'home.url') .
"/themes/$name/$rel";
986 else if ( strlen($themesPath) > 0 )
988 $url = $this->
getConf(
'home.url') .
'/' . $themesPath .
'/' . $name .
'/' . $rel;
1014 $path = $this->
getConf(
'home.modules') .
'/' . $module;
1016 if (substr($file, 0, 1) !=
'/')
1034 if ( $server = $_SERVER[
'HTTP_HOST'])
1036 $url = str_replace(
'&',$amp,
'//' . $_SERVER[
'HTTP_HOST'] . $_SERVER[
'REQUEST_URI']);
1074 $module =
$MIOLO->getConf(
'options.common');
1109 public static function _REQUEST( $vars, $from =
'ALL' )
1111 if ( is_array($vars) )
1113 foreach ( $vars as $v )
1123 $vars = str_replace(
'.',
'_', $vars);
1125 if ( $from ==
'GET' )
1127 if ( isset($_GET[$vars]) )
1129 $value = $_GET[$vars];
1133 $value = isset($_GET[strtolower($vars)]) ? $_GET[strtolower($vars)] :
null;
1136 elseif ( $from ==
'POST' )
1138 if ( isset($_POST[$vars]) )
1140 $value = $_POST[$vars];
1144 $value = isset($_POST[strtolower($vars)]) ? $_POST[strtolower($vars)] :
null;
1147 elseif ( $from ==
'SESSION' )
1149 if ( isset($_SESSION[$vars]) )
1151 $value = $_SESSION[$vars];
1155 $value = isset($_SESSION[strtolower($vars)]) ? $_SESSION[strtolower($vars)] :
null;
1160 if ( isset($_REQUEST[$vars]) )
1162 $value = $_REQUEST[$vars];
1166 $value = isset($_REQUEST[strtolower($vars)]) ? $_REQUEST[strtolower($vars)] :
null;
1172 if ( ( ! isset($value) ) && ( ( strpos($vars,
'[') ) ===
false) )
1174 if ( isset($_GLOBALS[$vars]) )
1176 $value = $_GLOBALS[$vars];
1180 $value = isset($_GLOBALS[strtolower($vars)]) ? $_GLOBALS[strtolower($vars)] :
null;
1187 if ( ! isset($value) )
1189 if ( isset($_SESSION[$vars]) )
1191 $value = $_SESSION[$vars];
1195 $value = isset($_SESSION[strtolower($vars)]) ? $_SESSION[strtolower($vars)] :
null;
1199 if(isset($_COOKIE[$vars]) && !isset($value))
1201 $value = $_COOKIE[$vars];
1210 return date(
'd/m/Y H:i:s');
1215 return $this->auth->CheckLogin();
1218 function CheckAccess($trans, $access, $deny =
false, $group=
false, $login =
false)
1220 return $this->perms->CheckAccess($trans, $access, $deny, $group, $login);
1227 $REMOTE_ADDR = $_SERVER[
'REMOTE_ADDR'];
1228 $ReturnValue =
false;
1230 foreach ($MIOLOCONF[
'hosts'][
'allow'] as $h)
1232 if ($REMOTE_ADDR == $h)
1234 $ReturnValue =
true;
1239 '-') > 0) && (substr($h, 0,
1240 strrpos($h,
'.')) == substr($REMOTE_ADDR, 0, strrpos($REMOTE_ADDR,
'.'))))
1242 list($FirstIP, $LastIP) = explode(
'-', $h);
1243 $LastIP = substr($FirstIP, 0, strrpos($FirstIP,
'.') + 1) . $LastIP;
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));
1249 if (($StartIP < $RemoteIP) && ($EndIP > $RemoteIP))
1251 $ReturnValue =
true;
1256 foreach ($MIOLOCONF[
'hosts'][
'deny'] as $h)
1258 if ($REMOTE_ADDR == $h)
1260 $ReturnValue =
false;
1264 return $ReturnValue;
1286 if (isset($this->dbconf[
$conf]))
1300 if ( !($this->
getConf(
"db.$conf.user")) && isset($this->dbconf[
'basic']) )
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");
1314 if ($this->
getConf(
'login.shared'))
1316 $db_user = $this->
getConf(
"db.$conf.user");
1317 $db_pass = $this->
getConf(
"db.$conf.password");
1319 if (!(isset($db_user) && isset($db_pass)))
1331 $db_pass =
$pass ?
$pass : $this->login->password;
1336 $db_user = $this->login->id;
1339 $db =
new MDatabase(
$conf, $db_system, $db_host, $db_name, $db_user, $db_pass, $parameters, $db_port);
1342 catch( Exception $e )
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.
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.
1369 # class BusinessFooGuestbook extends Business
1371 # function AddVisitor($data)
1379 # $guestbook = MIOLO::getInstance()->getBusiness( 'foo', 'guestbook' );
1380 # $data = $form->GetData();
1381 # result = $guestbook->AddVisitor( $data );
1385 # @see miolo/miolo.class#MIOLO::GetDatabase,
1386 # miolo/ui/form.class#Form::GetData
1387 #---------------------------------------------------------------------
1399 $path = $this->getModulePath($module,
'types.class');
1401 if(file_exists($path))
1403 $this->Uses(
'types.class', $module);
1408 $class =
'Business' .
1409 strtoupper(substr($module,0,1)) . substr($module,1) .
1410 strtoupper(substr($name,0,1)) . substr($name,1);
1416 if ( ! ( $this->
Import(
'modules::' . $module .
'::db::'. $name, $class) ||
1417 $this->
Import(
'modules::' . $module .
'::classes::'. $name, $class) )
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 ");
1424 $business =
new $class($data);
1426 $business->_bmodule = $module;
1427 $business->_bclass = $name;
1435 $class = $this->
getConf(
'mad.classes.' . $name);
1440 return $this->
GetBusiness($this->mad, $class, $data);
1445 $this->conf->loadConf( $this->mad );
1450 $this->
uses(
"/classes/$name.class", $module);
1473 if ( $themeId ==
'' )
1475 $themeId = $this->
getConf(
'theme.main');
1478 if ( is_object( $this->theme ) )
1480 if ( $this->theme->getId() == $themeId )
1486 $themeTitle = $this->
getConf(
'theme.title');
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);
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();
1510 if ( is_null($this->painter) )
1527 function error($msg =
'', $goto =
'', $caption =
'', $event =
'', $halt =
true)
1532 function alert($msg =
'', $goto =
'', $caption =
'', $event =
'', $halt =
true)
1542 function confirmation($msg, $gotoOK =
'', $gotoCancel =
'', $eventOk =
'', $eventCancel =
'', $halt =
true)
1547 function question($msg, $gotoYes =
'', $gotoNo =
'', $eventYes =
'', $eventNo =
'', $halt =
true)
1554 $this->
trace(
'MIOLO::prompt');
1557 if ($GLOBALS[
'REQUISICAO_PELA_API'])
1559 throw new Exception($prompt->message);
1563 $this->theme->insertContent($spacer);
1564 $this->theme->insertContent($prompt);
1565 $this->theme->setHalted($halt);
1569 $this->page->generate();
1579 $this->log->setLog($logname);
1592 $this->log->logSQL($sql, $force,
$conf);
1610 return $this->profile->profileTime();
1615 $this->profile->profileEnter($name);
1620 $this->profile->profileExit($name);
1625 return $this->profile->profileDump();
1630 return $this->profile->GetProfileDump();
1635 return $this->
dump->usesDump();
1638 function dump($var, $file =
false, $line =
false, $info =
false)
1640 return $this->
dump->dump($var, $file, $line, $info);
1645 return $this->log->isLogging();
1650 return $this->log->logMessage($msg);
1658 function trace($msg, $file =
false, $line = 0)
1660 $this->
trace->trace($msg, $file, $line);
1665 return $this->
trace->traceDump();
1673 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1674 # Returns a array with the existing themes
1675 #---------------------------------------------------------------------
1694 $thisdir = dir($dir);
1696 while ($entry = $thisdir->read())
1698 if (($entry !=
'.') && ($entry !=
'..') && (substr($entry, 0, 1) !=
'.'))
1702 $result[$entry] = $entry;
1706 $isFile = is_file(
"$dir$entry");
1707 $isDir = is_dir(
"$dir$entry");
1709 if (($type ==
'f') && ($isFile))
1711 $result[$entry] = $entry;
1715 if (($type ==
"d") && ($isDir))
1717 $result[$entry] = $entry;
1732 function SaveFile($module =
'', $filename, $dir =
'html/files/')
1734 if (empty($filename))
1740 $this->
Trace(
">>ENTERING: MIOLO::SaveFile($module,$filename)");
1771 public static function vd($variable, $forceType=
null)
1773 include_once(
'contrib/dbug.class');
1775 if ( $forceType !=
null )
1777 new dBug($variable);
1781 new dBug($variable,
"$forceType");
1792 public static function var_dump($variable, $forceType=
null)
1802 echo
'<SCRIPT LANGUAGE="javascript">';
1803 echo
'document.getElementById("loading").innerHTML = "'.$value.
'"';
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');
1816 $styleURL = $this->getAbsoluteURL(
'scripts/datepicker/css/calendar-win2k-1.css');
1817 $this->page->addStyleURL($styleURL);
1828 return $MIOLO->getConf(
'options.debugmode') ==
true;
1838 if ( isset($this->dbconf[$module]) )
1840 $conn = $this->dbconf[$module];
1847 unset($this->dbconf[$module]);
1861 return $this->cacheSQL;
1866 $this->cacheSQL = $cacheSQL;
SaveFile($module='', $filename, $dir='html/files/')
GetActionURL($module='', $action='NONE', $item='', $args=NULL, $dispatch=NULL, $scramble=false)
dump($var, $file=false, $line=false, $info=false)
Init( $home=NULL, $logname='miolo')
confirmation($msg, $gotoOK='', $gotoCancel='', $eventOk='', $eventCancel='', $halt=true)
static updateLoading($value)
prompt($prompt, $halt=true)
information($msg, $goto='', $event='', $halt=true)
GetBusinessMAD($name='main', $data=NULL)
question($msg, $gotoYes='', $gotoNo='', $eventYes='', $eventNo='', $halt=true)
error($msg='', $goto='', $caption='', $event='', $halt=true)
uses($name, $module=NULL)
ListFiles($dir, $type='d')
GetAbsolutePath($rel=NULL)
GetContext($url='', $style=0, $scramble=false)
getTheme($themeId='', $layout='default')
logError($error, $conf='miolo')
GetAbsoluteURL($rel, $module=NULL)
GetDatabase($conf=NULL, $user=NULL, $pass=NULL)
SendFile($fileName, $fileNameDown=null)
static getCurrentModule()
static _REQUEST( $vars, $from='ALL')
InvokeHandler($module, $action)
alert($msg='', $goto='', $caption='', $event='', $halt=true)
GetThemeURL($rel, $name=NULL, $default=NULL, $module=NULL)
UsesBusiness($module, $name='main')
static var_dump($variable, $forceType=null)
logSQL($sql, $force=false, $conf='?')
GetModulePath($module, $file)
GetBusiness($module, $name='main', $data=NULL)
Import($namespace, $class='')
static getCurrentAction()
static vd($variable, $forceType=null)
CheckAccess($trans, $access, $deny=false, $group=false, $login=false)
SendText($string, $type, $fileName)
trace($msg, $file=false, $line=0)
Assert($cond, $msg='', $goto='')
static Error($msg='', $goto='', $caption='', $event='')
static Question($msg, $gotoYes='', $gotoNo='', $eventYes='', $eventNo='')
static Information($msg, $goto='', $event='')
static Confirmation($msg, $gotoOK='', $gotoCancel='', $eventOk='', $eventCancel='')
static Alert($msg, $goto='', $event='')
static NVL($value1, $value2)
static getBooleanValue($value)
const MIOLO_VERSION_NUMBER