vale el codigo completo de system.php es este:
Código php:
Ver original<?php
{
function boot()
{
$path_to_system_core = system::getsystemsettings("CLASSES_DIR");
system::requireallfilesindirectory($path_to_system_core); function loadsystemsettings($file_name)
{
if (!isset($system_settings) {
$GLOBALS['system_settings'] = array(); }
$settings = require_once ($file_name);
{
$GLOBALS['system_settings'] = array_merge($system_settings, $settings); }
}
else
{
exit("index.php" . (" File " . $file_name . " isn't
readable Cannot read config file"));
}
}
function getsystemsettings($setting_name)
{
if (isset($system_settings[$setting_name])) {
return $system_settings[$setting_name];
}
return null;
}
function getglobaltemplatevariables()
{
return $TEMPLATE_VARIABLES;
}
function getglobaltemplatevariable($variable_name)
{
if (isset($TEMPLATE_VARIABLES[$variable_name])) {
return
$TEMPLATE_VARIABLES[$variable_name];
}
return null;
}
function setglobaltemplatevariable($name, $value, $in_global_array = true)
{
if ($in_global_array)
{
$GLOBALS['TEMPLATE_VARIABLES']['GLOBALS'][$name] = $value;
}
else
{
$GLOBALS['TEMPLATE_VARIABLES'][$name] = $value;
}
}
function &getmodulemanager()
{
return $GLOBALS['System']['MODULE_MANAGER'];
}
function &gettemplateprocessor()
{
$module_manager = &system::getmodulemanager(); list($module) = $module_manager->getcurrentmoduleandfunction(); if ($module != null)
{
$template_processor = &new
templateprocessor(new templatesupplier($module));
return $template_processor;
}
return null;
}
function setpagetitle($page_title)
{
system::setglobaltemplatevariable("TITLE", $page_title, false); }
function setcurrentuserinfo($current_user_info)
{
system::setglobaltemplatevariable("current_user", $current_user_info); }
function getpagetitle()
{
return system::getglobaltemplatevariable("TITLE"); }
function setpagekeywords($page_keywords)
{
system::setglobaltemplatevariable("KEYWORDS", $page_keywords,
false);
}
function getpagekeywords()
{
return system::getglobaltemplatevariable("KEYWORDS"); }
function setpagedescription($page_description)
{
system::setglobaltemplatevariable("DESCRIPTION", $page_description,
false);
}
function getpagedescription()
{
return system::getglobaltemplatevariable("DESCRIPTION"); }
function executefunction
($module, $setting, $parameters = array()) {
$module_manager = &system::getmodulemanager(); return $module_manager->executefunction($module, $setting,
$parameters);
}
function getusersettings($module_name, $setting_name)
{
return usersettings::getsetting($module_name, $setting_name);
}
function setusersettings($module_name, $setting_name, $value)
{
return usersettings::setsetting($module_name, $setting_name, $value);
}
function init()
{
db
::init(system::getsystemsettings("DBHOST"),
system::getsystemsettings("DBUSER"), system::getsystemsettings("DBPASSWORD"),
system::getsystemsettings("DBNAME")); session
::init(system::getsystemsettings("SITE_URL")); system::prepareglobalarrays(); system::setglobaltemplatevariable("site_url",
system::getsystemsettings("SITE_URL")); system::setglobaltemplatevariable("radius_search_unit",
system::getsettingbyname("radius_search_unit")); system::setglobaltemplatevariable("custom_settings",
customsettings::getsettingstoregister());
$GLOBALS['System']['MODULE_MANAGER'] = new
modulemanager();
$System['MODULE_MANAGER']->executemodulesstartupfunctions();
$GLOBALS['uri'] = navigator::geturi();
}
function getpage($page_config)
{
$license = &new license();
if ($license->isvalid())
{
return system::_getpage
($page_config); }
return $license->geterrormessage();
}
function _getpage($page_config)
{
return pageconstructor::getpage($page_config);
}
function getsystemurlbymoduleandfunction($module, $function, $parameters)
{
$parameters_str = "";
foreach ($parameters as $parameter_name => $parameter_value)
{
}
$parameters_str = join("&", $params); $site_url = system::getsystemsettings("SITE_URL"); $system_url_base =
system::getsystemsettings("SYSTEM_URL_BASE"); $url = $site_url . "/" . $system_url_base . "/" . $module . "/" . $function .
"?" . $parameters_str;
return $url;
}
function getmoduleandfunctionbysystemurl($url)
{
list(, , $module, $function) = split("/", $uri); return array("module" => $module, "function" => $function); }
function getfunctioninfo($module, $function)
{
$module_manager = &system::getmodulemanager(); if ($module_manager->doesmoduleexists($module))
{
$module_info =
$module_manager->getmoduleinfo($module);
if (isset($module_info['functions'][$function])) {
return
$module_info['functions'][$function];
}
}
}
function getsystemdefaulttemplate()
{
return system::getsystemsettings("SYSTEM_DEFAULT_TEMPLATE"); }
function isfunctionaccessible($module, $function)
{
$module_manager = &system::getmodulemanager(); return $module_manager->isfunctionaccessible($module, $function);
}
function prepareglobalarrays()
{
{
+ $_COOKIE + $_SERVER + $_SESSION);