foreach ($unset as $rg_var)
{
{
}
}
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$GLOBALS['_REQUEST'] = $_POST;
}
else
if ($_SERVER['REQUEST_METHOD'] ==
"GET")
{
$GLOBALS['_REQUEST'] = $_GET;
}
{
unquote($_REQUEST);
}
}
function requireallfilesindirectory($dir)
{
{
while (($file = readdir($dh)) !== false) {
DIRECTORY_SEPARATOR . $file))
{
if
(!($file != ".") && !($file != ".."))
{
system::requireallfilesindirectory($dir . DIRECTORY_SEPARATOR . $file); }
}
else
if
{
require_once ($dir . DIRECTORY_SEPARATOR . $file);
}
}
}
}
function doesfunctionhaverawoutput($module, $function)
{
$mm = &system::getmodulemanager(); return $mm->doesfunctionhaverawoutput($module, $function);
}
function getpageconfig($uri)
{
return pageconfig::getpageconfig($uri);
}
function getuserpages()
{
return pagemanager::get_pages();
}
function getuserpage($uri)
{
return pagemanager::get_page($uri, "user");
}
function modifyuserpage($pageInfo)
{
$module_manager = &system::getmodulemanager(); if (!$module_manager->doesfunctionexist($pageInfo['module'],
$pageInfo['function']))
{
return false;
}
return pagemanager::update_page($pageInfo);
}
function deleteuserpage($uri)
{
return pagemanager::delete_page($uri);
}
function adduserpage($pageInfo)
{
$module_manager = &system::getmodulemanager(); if (!$module_manager->doesfunctionexist($pageInfo['module'],
$pageInfo['function']))
{
return false;
}
return pagemanager::addpage($pageInfo);
}
function doesuserpageexists($uri)
{
return pagemanager::doespageexists($uri, "user");
}
function getmoduleslist()
{
$module_manager = &system::getmodulemanager(); return $module_manager->getmoduleslist();
}
function getfunctionslist($module)
{
$module_manager = &system::getmodulemanager(); return $module_manager->getfunctionslist($module);
}
function getparamslist($module, $function)
{
$module_manager = &system::getmodulemanager(); return $module_manager->getparamslist($module, $function);
}
function getfunctionsuserlist($module)
{
$module_manager = &system::getmodulemanager(); $func_list = $module_manager->getfunctionslist($module);
$user_func_list = array(); foreach ($func_list as $func)
{
if
(!($module_manager->getfunctiontype($module, $func) == "user") &&
!($module_manager->getfunctionaccesssystem($module, $func) == false))
{
$user_func_list[] = $func;
}
}
return $user_func_list;
}
function getmodulesuserlist()
{
$module_manager = &system::getmodulemanager(); $module_list = $module_manager->getmoduleslist();
$user_module_list = array(); foreach ($module_list as $module)
{
{
}
$is_user = 0;
$func_list =
$module_manager->getfunctionslist($module);
foreach ($func_list as $func)
{
if
(!($module_manager->getfunctiontype($module, $func) == "user") &&
!($module_manager->getfunctionaccesssystem($module, $func) == false))
{
continue;
}
$is_user = 1;
break;
}
if ($is_user == 1)
{
$user_module_list[] =
$module;
}
}
return $user_module_list;
}
function geturi()
{
return navigator::geturi();
}
function getregisteredcommands()
{
$module_manager = &system::getmodulemanager(); return $module_manager->getregisteredcommands();
}
function getcommandscriptabsolutepath($module, $command)
{
$module_manager = &system::getmodulemanager(); return $module_manager->getcommandscriptabsolutepath($module,
$command);
}
function getmoduleofcommand($command)
{
$module_manager = &system::getmodulemanager(); return $module_manager->getmoduleofcommand($command);
}
function getpackageinfo($package_name)
{
return moduleconfigurator::getpackageinfo($package_name);
}
function getmodulesconditionsinfo()
{
return moduleconfigurator::getmodulesconditionsinfo();
}
function getsettingsfromfile($file_name, $setting_name)
{
$settings = require ($file_name);
if (isset($settings[$setting_name])) {
return $settings[$setting_name];
}
return null;
}
function getsettingbyname($setting_name)
{
return settings::getsettingbyname($setting_name);
}
function doesparentuserpageexist($uri)
{
return pagemanager::doesparentpageexist($uri, "user");
}
function getuserpageparenturi($uri)
{
return pagemanager::getpageparenturi($uri, "user");
}
}
class license
{
var $license_info;
var $error = null;
function license()
{
array("expiration_date" => null, "verification_code" => null); }
function isvalid()
{
if ($this->_islocalperformed())
{
return true;
}
if (!$this->_islicensecodevalid())
{
$this->error =
"INVALID_VERIFICATION_CODE";
}
else
if ($this->_islicenseexpired())
{
$this->error =
"EXPIRED_LICENSE";
}
return empty($this->error); }
function geterrormessage()
{
header($_SERVER['SERVER_PROTOCOL'] . " 403 Forbidden"); if ($this->error == "INVALID_VERIFICATION_CODE")
{
echo "The software license is invalid \r\n";
}
else
{
echo "The software license is expired \r\n";
}
}
function _islocalperformed()
{
return $parsed_url['host'] == "localhost";
}
function _islicensecodevalid()
{
$cryptographer = new
cryptographer($this->license_info['expiration_date']);
return $cryptographer->getcrypt() ===
$this->license_info['verification_code'];
}
function _islicenseexpired()
{
return $this->license_info['expiration_date'] < date("Y-m-d"); }
}
class cryptographer
{
var $expiration_date;
var $site_url;
var $inserted_words;
function cryptographer($expiration_date, $site_url = null)
{
$this->expiration_date = $expiration_date;
$this->site_url = empty($site_url) ?
system::getsystemsettings("SITE_URL") : $site_url; $this->inserted_words = array("asdfg14235", "*&^%\$RTGFVBJL:)(*",
"-=+[]lLLL7gfd@");
}
function getcrypt()
{
return
$this->_getencryptedcombination($this->_getcombinedunencryptedstring(), 0);
}
function _getcombinedunencryptedstring()
{
$result = join("", $this->inserted_words); return $this->expiration_date . $result . $this->site_url;
}
function _getencryptedcombination($string, $counter)
{
if (5 < $counter)
{
return $string;
}
return $this->_getencryptedcombination($result, ++$counter);
}
}