84 'XOOPS' => array(),
'www' => array(),
'var' => array(),
'lib' => array(),
'modules' => array(),
85 'themes' => array(),
'media' => array()
129 $this->paths[
'www'] = array(
$root,
$url);
130 $this->paths[
'var'] = array(
$var, null);
131 $this->paths[
'lib'] = array($lib,
$url .
'/browse.php');
132 $this->paths[
'XOOPS'] = array($lib,
$url .
'/browse.php');
135 $this->paths[
'images'] = array(
$root .
'/images',
$url .
'/images');
136 $this->paths[
'install'] = array(
$root .
'/install',
$url .
'/install');
137 $this->paths[
'language'] = array(
$root .
'/language',
$url .
'/language');
138 $this->paths[
'locale'] = array(
$root .
'/locale',
$url .
'/locale');
140 $this->paths[
'modules'] = array(
$root .
'/modules',
$url .
'/modules');
163 if (!isset($instance)) {
165 $instance =
new $class();
177 return \Xoops\Core\Database\Factory::getConnection();
187 public function cache($cacheName =
'default')
189 static $cacheManager;
191 if (!isset($cacheManager)) {
192 $cacheManager = new \Xoops\Core\Cache\CacheManager();
195 return $cacheManager->getCache($cacheName);
205 return \Xoops\Core\Logger::getInstance();
216 return \Xoops\Core\Events::getInstance();
237 if (!isset($instance)) {
238 $instance = new \Xoops\Core\Assets;
253 if (!isset($instance)) {
254 $instance = \Xoops\Core\Service\Manager::getInstance();
256 return $instance->locate($service);
267 if (!isset($instance)) {
268 $instance = new \Xoops\Core\Registry();
281 if (!isset($instance)) {
282 $instance = new \Xoops\Core\Security();
316 if (!isset($this->
theme)) {
319 $this->tpl_name = $tpl_info[
'tpl_name'];
321 $tpl_name =
'module:system/system_dummy.tpl';
323 $this->tpl_name = $tpl_info[
'tpl_name'];
326 $xoopsThemeFactory = null;
328 $xoopsThemeFactory->allowedThemes = $this->
getConfig(
'theme_set_allowed');
329 $xoopsThemeFactory->defaultTheme = $this->
getConfig(
'theme_set');
330 $this->
setTheme($xoopsThemeFactory->createInstance(array(
'contentTemplate' => $this->tpl_name)));
333 $this->
setTheme($adminThemeFactory->createInstance(array(
334 'folderName' =>
'default',
'themesPath' =>
'modules/system/themes',
335 'contentTemplate' => $this->tpl_name
338 list($cssAssets, $jsAssets) = $this->
theme()->getLocalizationAssets(
'admin');
339 if (!empty($cssAssets)) {
340 $this->
theme()->addBaseStylesheetAssets($cssAssets);
342 if (!empty($jsAssets)) {
343 $this->
theme()->addBaseScriptAssets($jsAssets);
349 $this->tpl_name = $tpl_info[
'tpl_name'];
381 if (0 === strpos(
$url, $rootPath)) {
382 $url = substr(
$url, strlen($rootPath));
385 $parts = explode(
'/',
$url, 2);
386 $root = isset($parts[0]) ? $parts[0] :
'';
387 $path = isset($parts[1]) ? $parts[1] :
'';
388 if (!isset($this->paths[
$root])) {
396 return !isset($this->paths[$root][1]) ?
'' : ($this->paths[
$root][1] .
'/' .
$path);
408 return str_replace(
'\\',
'/',
$path);
436 $split = explode(
'?',
$url);
437 if (count($split) > 1) {
440 $params = array_merge(
$query, $params);
442 if (!empty($params)) {
443 foreach ($params as $k => $v) {
444 $params[$k] = $k .
'=' . rawurlencode($v);
446 $url .=
'?' . implode(
'&', $params);
467 array(
$path, $error_type)
485 if (empty(
$_SERVER[
'SERVER_NAME']) || substr(PHP_SAPI, 0, 3) ==
'cli') {
489 if ($this->
getConfig(
'gzip_compression') == 1 && extension_loaded(
'zlib') && !ini_get(
'zlib.output_compression')) {
490 if (@ini_get(
'zlib.output_compression_level') < 0) {
491 ini_set(
'zlib.output_compression_level', 6);
493 ob_start(
'ob_gzhandler');
508 if (!isset(
$_SERVER[
'PATH_TRANSLATED']) && isset(
$_SERVER[
'SCRIPT_FILENAME'])) {
511 if (isset(
$_SERVER[
'PATH_TRANSLATED']) && !isset(
$_SERVER[
'SCRIPT_FILENAME'])) {
518 if (empty(
$_SERVER[
'REQUEST_URI'])) {
523 if (isset(
$_SERVER[
'QUERY_STRING'])) {
536 $xoopsThemeSelect = Request::getString(
'xoops_theme_select',
'',
'POST');
537 if (!empty($xoopsThemeSelect) && in_array($xoopsThemeSelect, $this->
getConfig(
'theme_set_allowed'))) {
538 $this->
setConfig(
'theme_set', $xoopsThemeSelect);
539 $_SESSION[
'xoopsUserTheme'] = $xoopsThemeSelect;
559 $matched = preg_match(
'#(\w+):(\w+)/(.*)$#',
$tpl_name, $parts);
561 $names = array(
'tpl_name',
'type',
'module',
'file');
564 $ret[$names[
$i]] = $parts[
$i];
568 $this->
events()->triggerEvent(
'debug.log',
"Sloppy template: " .
$tpl_name);
570 $ret[
'type'] = $this->
isAdminSide ?
'admin' :
'module';
572 if (count(
$info) == 2) {
573 $ret[
'type'] =
$info[0];
577 if ($ret[
'type'] ==
'db') {
579 $ret[
'type'] = $this->
isAdminSide ?
'admin' :
'module';
583 if (count(
$info) == 2) {
584 $ret[
'module'] =
$info[0];
585 $ret[
'file'] =
$info[1];
587 $ret[
'module'] =
'system';
590 $ret[
'module'] = $this->
module->getVar(
'dirname',
'n');
593 $ret[
'tpl_name'] = $ret[
'type'] .
':' . $ret[
'module'] .
'/' . $ret[
'file'];
608 static $included =
false;
614 $this->
events()->triggerEvent(
'core.header.start');
619 $this->
deprecated(
'XoopsOption \'template_main\' is deprecated, please use $xoops->header(\'templatename.tpl\') instead');
622 $this->
tpl()->assign(
'xoops', $this);
625 $this->
events()->triggerEvent(
'system.class.gui.header');
626 include_once $this->
path(
'modules/system/themes/default/default.php');
630 $this->
events()->triggerEvent(
'core.header.addmeta');
632 if (defined(
"XOOPS_STARTPAGE_REDIRECTED")) {
633 $smarty = $repeat = null;
635 ->headContent(null,
"<base href='" . \
XoopsBaseConfig::get(
'url') .
'/modules/' . $this->
getConfig(
'startpage') .
"/' />", $smarty, $repeat);
638 if (@is_object($this->
theme()->plugins[
'XoopsThemeBlocksPlugin'])) {
639 $aggreg = $this->
theme()->plugins[
'XoopsThemeBlocksPlugin'];
641 $this->
tpl()->assignByRef(
'xoops_lblocks', $aggreg->blocks[
'canvas_left']);
642 $this->
tpl()->assignByRef(
'xoops_rblocks', $aggreg->blocks[
'canvas_right']);
643 $this->
tpl()->assignByRef(
'xoops_ccblocks', $aggreg->blocks[
'page_topcenter']);
644 $this->
tpl()->assignByRef(
'xoops_clblocks', $aggreg->blocks[
'page_topleft']);
645 $this->
tpl()->assignByRef(
'xoops_crblocks', $aggreg->blocks[
'page_topright']);
646 $this->
tpl()->assign(
'xoops_showlblock', !empty($aggreg->blocks[
'canvas_left']));
647 $this->
tpl()->assign(
'xoops_showrblock', !empty($aggreg->blocks[
'canvas_right']));
649 ->assign(
'xoops_showcblock', !empty($aggreg->blocks[
'page_topcenter']) || !empty($aggreg->blocks[
'page_topleft']) || !empty($aggreg->blocks[
'page_topright']));
654 $cache_times = $this->
getConfig(
'module_cache');
655 $this->
theme()->contentCacheLifetime = isset($cache_times[$this->
module->getVar(
'mid')]) ? $cache_times[$this->
module->getVar(
'mid')] : 0;
658 if ($this->tpl_name ==
'module:system/system_homepage.tpl') {
662 $this->
events()->triggerEvent(
'core.header.checkcache');
663 if ($this->
theme()->checkCache()) {
668 if (!isset($this->tpl_name) && $this->
isModule()) {
672 $this->
events()->triggerEvent(
'core.header.end');
683 static $included =
false;
689 $this->
events()->triggerEvent(
'core.footer.start');
691 if (!headers_sent()) {
693 header(
'Expires: Mon, 26 Jul 1997 05:00:00 GMT');
694 header(
'Cache-Control: private, no-cache');
695 header(
'Pragma: no-cache');
698 if (isset($this->
option[
'template_main']) && $this->
option[
'template_main'] != $this->
theme()->contentTemplate) {
699 trigger_error(
"xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING);
702 $this->
theme()->render();
703 $this->
events()->triggerEvent(
'core.footer.end');
724 return $this->user instanceof
XoopsUser ?
true :
false;
758 return $this->
getHandler(
'blockmodulelink', $optional);
770 return $this->
getHandler(
'config', $optional);
782 return $this->
getHandler(
'configitem', $optional);
794 return $this->
getHandler(
'configoption', $optional);
818 return $this->
getHandler(
'groupperm', $optional);
830 return $this->
getHandler(
'member', $optional);
842 return $this->
getHandler(
'membership', $optional);
854 return $this->
getHandler(
'module', $optional);
866 return $this->
getHandler(
'online', $optional);
878 return $this->
getHandler(
'privmessage', $optional);
900 if ($this->sessionManager === null) {
901 $this->sessionManager = new \Xoops\Core\Session\Manager();
915 return $this->
getHandler(
'tplfile', $optional);
927 return $this->
getHandler(
'tplset', $optional);
954 if (!isset($this->kernelHandlers[
$name])) {
955 $class =
'Xoops' . ucfirst($name) .
'Handler';
956 if (class_exists($class)) {
957 $this->kernelHandlers[
$name] =
new $class($this->
db());
960 if (!isset($this->kernelHandlers[$name])) {
963 'Class <strong>' . $class .
'</strong> does not exist<br />Handler Name: ' . $name
966 return $this->kernelHandlers[
$name];
983 if (!isset($module_dir)) {
986 $module_dir = $this->
module->getVar(
'dirname',
'n');
988 trigger_error(
'No Module is loaded', E_USER_ERROR);
991 $module_dir = trim($module_dir);
994 if (!isset($this->moduleHandlers[$module_dir][
$name])) {
996 include_once $hnd_file;
998 $class = ucfirst(strtolower($module_dir)) . ucfirst($name) .
'Handler';
999 if (class_exists($class)) {
1000 $this->moduleHandlers[$module_dir][
$name] =
new $class($this->
db());
1003 if (!isset($this->moduleHandlers[$module_dir][$name])) {
1004 trigger_error(
'Handler does not exist<br />Module: ' . $module_dir .
'<br />Name: ' . $name, $optional ? E_USER_WARNING : E_USER_ERROR);
1006 if (isset($this->moduleHandlers[$module_dir][$name])) {
1007 return $this->moduleHandlers[$module_dir][
$name];
1026 if (empty($module_dir)) {
1028 $module_dir = $this->
module->getVar(
'dirname',
'n');
1034 include_once $hnd_file;
1035 $class = ucfirst(strtolower($module_dir)) . ucfirst(
$name) .
'Form';
1036 if (class_exists($class)) {
1037 $instance =
new $class($obj);
1038 if ($instance instanceof \
Xoops\Form\Form) {
1055 return \Xoops\Module\Helper::getHelper(
$dirname);
1078 if ((empty($domain) ||
'global' == $domain)) {
1081 $path = (is_array($domain)) ? array_shift($domain) .
'/' :
"modules/{$domain}/";
1083 $path .=
'language';
1090 $ret = include_once
$file;
1102 public static function loadLocale($domain =
'xoops', $locale = null)
1127 if (is_array($this->activeModules)) {
1132 if (!$this->activeModules = $this->
cache()->read(
'system/modules/active')) {
1135 }
catch (\Exception $e) {
1136 $this->activeModules = array();
1180 $key =
"system/module/dirname/{$dirname}";
1197 $key =
"system/module/id/{$id}";
1214 $this->
events()->triggerEvent(
'core.header.start');
1216 $xoopsConfigMetaFooter = $this->
getConfigs();
1219 if (!headers_sent()) {
1221 header(
'Expires: Mon, 26 Jul 1997 05:00:00 GMT');
1222 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
1223 header(
'Cache-Control: no-store, no-cache, max-age=1, s-maxage=1, must-revalidate, post-check=0, pre-check=0');
1224 header(
"Pragma: no-cache");
1227 echo
"<!DOCTYPE html>\n";
1232 <meta name="robots" content="' . htmlspecialchars($xoopsConfigMetaFooter[
'meta_robots']) .
'" />
1233 <meta name="keywords" content="' . htmlspecialchars($xoopsConfigMetaFooter[
'meta_keywords']) .
'" />
1234 <meta name="description" content="' . htmlspecialchars($xoopsConfigMetaFooter[
'meta_description']) .
'" />
1235 <meta name="rating" content="' . htmlspecialchars($xoopsConfigMetaFooter[
'meta_rating']) .
'" />
1236 <meta name="author" content="' . htmlspecialchars($xoopsConfigMetaFooter[
'meta_author']) .
'" />
1237 <meta name="generator" content="XOOPS" />
1238 <title>' . htmlspecialchars($this->
getConfig(
'sitename')) .
'</title>
1239 <script type="text/javascript" src="' .
$xoops_url .
'/include/xoops.js"></script>
1240 <script type="text/javascript" src="' .
$xoops_url .
'/media/jquery/jquery.js"></script>
1241 <script type="text/javascript" src="' .
$xoops_url .
'/media/bootstrap/js/bootstrap.min.js"></script>';
1243 echo
'<link rel="stylesheet" type="text/css" media="all" href="' .
$xoops_url .
'/xoops.css" />';
1246 echo
'<link rel="stylesheet" type="text/css" media="all" href="' .
$xoops_url .
'/locale/' . $locale .
'/style.css" />';
1249 echo
'<link rel="stylesheet" type="text/css" media="all" href="' . $themecss .
'" />';
1251 echo
'<link rel="stylesheet" type="text/css" media="screen" href="' . $this->
url(
'themes/' . $this->
getConfig(
'theme_set') .
'/media/bootstrap/css/xoops.bootstrap.css') .
'" />';
1254 echo
'</head><body>';
1265 $this->
events()->triggerEvent(
'core.header.footer');
1266 echo
'</body></html>';
1280 $tpl = new \XoopsTpl();
1285 $tpl->assign(
'alert_type',
'alert-info');
1286 if ($title ==
'/') {
1292 $tpl->assign(
'alert_type',
'alert-error');
1293 if ($title ==
'/') {
1299 $tpl->assign(
'alert_type',
'alert-success');
1300 if ($title ==
'/') {
1306 $tpl->assign(
'alert_type',
'');
1307 if ($title ==
'/') {
1314 $tpl->assign(
'alert_title', $title);
1316 if (!is_scalar(
$msg) && !is_array(
$msg)) {
1319 if (is_array(
$msg)) {
1321 $alert_msg = @implode(
"<br />",
$msg);
1325 if ($alert_msg ==
'') {
1328 $tpl->assign(
'alert_msg', $alert_msg);
1329 $ret =
$tpl->fetch(
'module:system/system_alert.tpl');
1347 $tpl = new \XoopsTpl();
1351 $tpl->assign(
'submit', $submit);
1353 foreach ($hiddens as
$name => $value) {
1354 if (is_array($value)) {
1355 foreach ($value as $caption => $newvalue) {
1356 $str_hiddens .=
'<input type="radio" name="' .
$name .
'" value="' . htmlspecialchars($newvalue) .
'" > ' . $caption . NWLINE;
1358 $str_hiddens .=
'<br />' . NWLINE;
1360 $str_hiddens .=
'<input type="hidden" name="' .
$name .
'" value="' . htmlspecialchars($value) .
'" />' . NWLINE;
1363 if ($addtoken !=
false) {
1364 $tpl->assign(
'token', $this->
security()->getTokenHTML());
1366 $tpl->assign(
'hiddens', $str_hiddens);
1367 return $tpl->fetch(
'module:system/system_confirm.tpl');
1380 if ($timeoffset ==
'') {
1382 $timeoffset = $this->user->getVar(
'timezone_offset');
1384 $timeoffset = $this->
getConfig(
'default_TZ');
1387 $usertimestamp = intval($time) + (floatval($timeoffset) - $this->
getConfig(
'server_TZ')) * 3600;
1388 return (
int)$usertimestamp;
1401 if (!isset($userTZ)) {
1402 $userTZ = $this->
getConfig(
'default_TZ');
1404 $timestamp = $timestamp - (($userTZ - $this->
getConfig(
'server_TZ')) * 3600);
1405 return (
int)$timestamp;
1413 $groups = $this->
isUser() ? $this->user->getGroups() : array(FixedGroups::ANONYMOUS);
1425 'er',
'in',
'tia',
'wol',
'fe',
'pre',
'vet',
'jo',
'nes',
'al',
'len',
'son',
'cha',
'ir',
'ler',
'bo',
1426 'ok',
'tio',
'nar',
'sim',
'ple',
'bla',
'ten',
'toe',
'cho',
'co',
'lat',
'spe',
'ak',
'er',
'po',
'co',
1427 'lor',
'pen',
'cil',
'li',
'ght',
'wh',
'at',
'the',
'he',
'ck',
'is',
'mam',
'bo',
'no',
'fi',
've',
'any',
1428 'way',
'pol',
'iti',
'cs',
'ra',
'dio',
'sou',
'rce',
'sea',
'rch',
'pa',
'per',
'com',
'bo',
'sp',
'eak',
1429 'st',
'fi',
'rst',
'gr',
'oup',
'boy',
'ea',
'gle',
'tr',
'ail',
'bi',
'ble',
'brb',
'pri',
'dee',
'kay',
1433 if (1 == rand() % 10) {
1434 $makepass .= sprintf(
'%0.0f', (rand() % 50) + 1);
1436 $makepass .= sprintf(
'%s', $syllables[rand() % 62]);
1452 if (!filter_var(
$email, FILTER_VALIDATE_EMAIL)) {
1473 if (!preg_match(
'/^(https?|ftps?|ed2k)\:\/\//i',
$url)) {
1488 $this->
events()->triggerEvent(
'core.banner.display', array(&
$options));
1503 public function redirect(
$url, $time = 3, $message =
'', $addredirect =
true, $allowExternalLink =
false)
1505 $this->
events()->triggerEvent(
'core.include.functions.redirectheader.start', array(
1506 $url, $time, $message, $addredirect, $allowExternalLink
1510 $this->
events()->triggerEvent(
'core.include.functions.redirectheader', array(
1511 $url, $time, $message, $addredirect, $allowExternalLink
1516 if (preg_match(
"/[\\0-\\31]|about:|script:/i",
$url)) {
1517 if (!preg_match(
'/^\b(java)?script:([\s]*)history\.go\(-[0-9]*\)([\s]*[;]*[\s]*)$/si',
$url)) {
1521 if (!$allowExternalLink && $pos = strpos(
$url,
'://')) {
1523 if (strcasecmp(substr(
$url, $pos + 3, strlen($xoopsLocation)), $xoopsLocation)) {
1527 if (!defined(
'XOOPS_CPFUNC_LOADED')) {
1533 $xoopsThemeFactory = null;
1535 $xoopsThemeFactory->allowedThemes = $this->
getConfig(
'theme_set_allowed');
1536 $xoopsThemeFactory->defaultTheme =
$theme;
1537 $this->
setTheme($xoopsThemeFactory->createInstance(array(
1538 "plugins" => array(),
"renderBanner" =>
false
1541 $this->
tpl()->assign(array(
1544 'xoops_requesturi' => htmlspecialchars(
$_SERVER[
'REQUEST_URI'], ENT_QUOTES),
1545 'xoops_sitename' => htmlspecialchars($this->
getConfig(
'sitename'), ENT_QUOTES),
1546 'xoops_slogan' => htmlspecialchars($this->
getConfig(
'slogan'), ENT_QUOTES),
1547 'xoops_dirname' => $this->
isModule() ? $this->
module->getVar(
'dirname') :
'system',
1548 'xoops_pagetitle' => $this->
isModule() ? $this->
module->getVar(
'name') : htmlspecialchars($this->
getConfig(
'slogan'), ENT_QUOTES)
1551 $this->
tpl()->assign(
'time', intval($time));
1552 if (!empty(
$_SERVER[
'REQUEST_URI']) && $addredirect && strstr(
$url,
'user.php')) {
1553 $joiner = (
false===strpos(
$url,
'?')) ?
'?' :
'&';
1554 $url .= $joiner .
'xoops_redirect=' . urlencode(
$_SERVER[
'REQUEST_URI']);
1556 $url = preg_replace(
"/&/i",
'&', htmlspecialchars(
$url, ENT_QUOTES));
1557 $this->
tpl()->assign(
'url',
$url);
1559 $this->
tpl()->assign(
'message', $message);
1562 $this->
events()->triggerEvent(
'core.include.functions.redirectheader.end');
1563 $this->
tpl()->display(
'module:system/system_redirect.tpl');
1581 if (array_key_exists($key, $_ENV) && isset($_ENV[$key])) {
1600 $uagent = $this->
getEnv(
'HTTP_USER_AGENT');
1601 if (stristr($uagent,
'mac')) {
1602 $str_css =
'styleMAC.css';
1603 } elseif (preg_match(
"/MSIE ([0-9]\.[0-9]{1,2})/i", $uagent)) {
1604 $str_css =
'style.css';
1606 $str_css =
'styleNN.css';
1610 if (is_dir($xoops_theme_path .
'/' .
$theme)) {
1612 return $xoops_theme_url .
'/' . $theme .
'/' . $str_css;
1614 return $xoops_theme_url .
'/' . $theme .
'/style.css';
1617 if (is_dir($xoops_theme_path .
'/' . $theme .
'/css')) {
1619 return $xoops_theme_url .
'/' . $theme .
'/css/' . $str_css;
1621 return $xoops_theme_url .
'/' . $theme .
'/css/style.css';
1635 if (is_object($mailer)) {
1639 if (class_exists(
'XoopsMailerLocale')) {
1658 $rank_id = intval($rank_id);
1659 $posts = intval($posts);
1661 $sql = $db->createXoopsQueryBuilder()
1662 ->select(
'r.rank_title AS title')
1663 ->addSelect(
'r.rank_image AS image')
1664 ->fromPrefix(
'ranks',
'r');
1666 if ($rank_id != 0) {
1667 $sql->where($eb->eq(
'r.rank_id',
':rank'))
1668 ->setParameter(
':rank', $rank_id, \PDO::PARAM_INT);
1670 $sql->where($eb->lte(
'r.rank_min',
':posts'))
1671 ->andWhere($eb->gte(
'r.rank_max',
':posts'))
1672 ->andWhere($eb->eq(
'r.rank_special', 0))
1673 ->setParameter(
':posts', $posts, \PDO::PARAM_INT);
1676 $rank = $db->fetchAssoc(
$sql->getSql(),
$sql->getParameters());
1678 $rank[
'title'] =
$myts->htmlspecialchars($rank[
'title']);
1679 $rank[
'id'] = $rank_id;
1694 if (isset($this->
option[$key])) {
1695 $ret = $this->
option[$key];
1710 if (!is_null($value)) {
1711 $this->
option[$key] = $value;
1767 if (!is_null($value)) {
1772 $this->moduleConfigs[
$dirname][$key] =& $value;
1792 if ($appendWithKey) {
1793 foreach ($values as $key2 => $value) {
1794 if (!isset($this->moduleConfigs[
$dirname][$key]) || !is_array($this->moduleConfigs[
$dirname][$key])) {
1795 $this->moduleConfigs[
$dirname][$key] = array();
1797 $this->moduleConfigs[
$dirname][$key][$key2] =& $value;
1800 $this->moduleConfigs[
$dirname][$key][] =& $values;
1819 if (isset($this->moduleConfigs[
$dirname][$key])) {
1820 return $this->moduleConfigs[
$dirname][$key];
1825 if (!isset($this->moduleConfigs[
$dirname][$key])) {
1826 $this->moduleConfigs[
$dirname][$key] =
'';
1828 return $this->moduleConfigs[
$dirname][$key];
1844 if (isset($this->moduleConfigs[
$dirname])) {
1845 return $this->moduleConfigs[
$dirname];
1847 $this->moduleConfigs[
$dirname] = array();
1848 $key =
"system/module/configs/{$dirname}";
1862 $this->moduleConfig =& $this->moduleConfigs[$this->
module->getVar(
'dirname')];
1864 if ($dirname ==
'system') {
1865 $this->
config =& $this->moduleConfigs[
'system'];
1867 return $this->moduleConfigs[
$dirname];
1898 $pslManager = new \Pdp\PublicSuffixListManager();
1899 $parser = new \Pdp\Parser($pslManager->getList());
1901 $url=mb_strtolower($url,
'UTF-8');
1905 $pdp = $parser->parseUrl($url);
1906 $host = $pdp->host->host;
1907 }
catch (\Exception $e) {
1908 $this->
events()->triggerEvent(
'core.exception', $e);
1912 if (!empty($host)) {
1914 if ($host==
'localhost') {
1915 return $returnObject ? $pdp->host : $host;
1919 if (substr($host, 0, 1)==
'[' && substr($host, -1)==
']') {
1920 $host = substr($host, 1, (strlen($host)-2));
1923 if (filter_var($host, FILTER_VALIDATE_IP)) {
1924 return $returnObject ? new \Pdp\Uri\Url\Host(null, null, null, $host) : $host;
1928 $host = $pdp->host->registerableDomain;
1929 if (!empty($host) && $includeSubdomain) {
1930 $host = $pdp->host->host;
1932 return $returnObject ? $pdp->host : $host;
1946 if (is_object($tplfile)) {
1947 $file = $tplfile->getVar(
'tpl_file',
'n');
1948 $module = $tplfile->getVar(
'tpl_module',
'n');
1949 $type = $tplfile->getVar(
'tpl_type',
'n');
1979 $message = $this->
logger()->sanitizePath($message);
1980 $this->
events()->triggerEvent(
'core.deprecated', array($message));
1991 $this->
events()->triggerEvent(
'core.disableerrorreporting');
getHandlerConfigitem($optional=false)
getHandlerBlockmodulelink($optional=false)
static getLegacyLanguage()
getHandlerGroupperm($optional=false)
$_SESSION['RF']["verify"]
getModuleHandler($name=null, $module_dir=null, $optional=false)
getHandlerModule($optional=false)
setConfig($key, $value=null, $dirname= 'system')
getModuleConfig($key, $dirname= '')
getHandlerPrivmessage($optional=false)
templateClearModuleCache($mid)
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
loadLanguage($name, $domain= '', $language=null)
static loadLocale($domain= 'xoops', $locale=null)
getHandlerTplfile($optional=false)
getHandlerMembership($optional=false)
redirect($url, $time=3, $message= '', $addredirect=true, $allowExternalLink=false)
setTheme(XoopsTheme $theme)
buildUrl($url, $params=array())
getHandlerGroup($optional=false)
confirm($hiddens, $action, $msg, $submit= '', $addtoken=true)
getBaseDomain($url, $includeSubdomain=false, $returnObject=false)
getHandlerRanks($optional=false)
setOption($key, $value=null)
appendConfig($key, array $values, $appendWithKey=false, $dirname= 'system')
getModuleHelper($dirname)
translate($key, $dirname= 'xoops')
getHandlerMember($optional=false)
if(isset($_POST['name'])) $info
getHandlerConfig($optional=false)
cache($cacheName= 'default')
static loadMailerLocale()
simpleHeader($closehead=true)
userTimeToServerTime($timestamp, $userTZ=null)
static translate($key, $dirname= 'xoops')
getHandlerUser($optional=false)
pathExists($path, $error_type)
addConfigs($configs, $dirname= 'system')
if(!is_object($module)||!$module->getVar('isactive')) $msg
path($url, $virtual =false)
getModuleForm($obj, $name, $module_dir=null)
getModuleConfigs($dirname= '')
checkEmail($email, $antispam=false)
const F_IF_PAGE_NOT_RELOAD_CLICK_HERE
getHandlerConfigoption($optional=false)
alert($type, $msg, $title= '/')
getRank($rank_id=0, $posts=0)
static loadLocale($domain= 'xoops')
getUserTimestamp($time, $timeoffset= '')
getHandler($name, $optional=false)
getModuleByDirname($dirname)
getHandlerTplset($optional=false)
getHandlerBlock($optional=false)
getHandlerOnline($optional=false)