| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
| 3 |
* @version $Id: index.php,v 1.47 2005/08/26 08:10:43 mambofoundation Exp $ |
* @package Mambo Open Source |
| 4 |
* @package Mambo |
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
|
* @copyright (C) 2000 - 2005 Miro International Pty Ltd |
|
| 5 |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 6 |
|
* |
| 7 |
|
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
| 8 |
|
* that Mambo remained free Open Source software owned and managed by the community. |
| 9 |
* Mambo is Free Software |
* Mambo is Free Software |
| 10 |
*/ |
*/ |
| 11 |
|
|
| 51 |
} |
} |
| 52 |
|
|
| 53 |
function sefRelToAbs ($string) { |
function sefRelToAbs ($string) { |
| 54 |
$sef = mosSEF::getInstance(); |
$sef =& mosSEF::getInstance(); |
| 55 |
return $sef->sefRelToAbs($string); |
return $sef->sefRelToAbs($string); |
| 56 |
} |
} |
| 57 |
|
|
| 62 |
var $subdirectory; |
var $subdirectory; |
| 63 |
var $current_user = null; |
var $current_user = null; |
| 64 |
var $do_gzip_compress = false; |
var $do_gzip_compress = false; |
| 65 |
|
var $init_errorlevel = 0; |
| 66 |
|
|
| 67 |
function mamboCore () { |
function mamboCore () { |
| 68 |
global $adminside; |
global $adminside; |
| 69 |
$this->rootPath = dirname(__FILE__); |
$this->init_errorlevel = error_reporting(0); |
| 70 |
|
$this->rootPath = str_replace('\\', '/', dirname(__FILE__)); |
| 71 |
$this->checkConfig(); |
$this->checkConfig(); |
| 72 |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
| 73 |
$this->getConfig(); |
$this->getConfig(); |
| 74 |
$this->fixLanguage(); |
$this->fixLanguage(); |
|
$this->secure(); |
|
| 75 |
@set_magic_quotes_runtime( 0 ); |
@set_magic_quotes_runtime( 0 ); |
| 76 |
if (@$this->mosConfig_error_reporting === 0) error_reporting(0); |
if (@$this->mosConfig_error_reporting > 0 OR @$this->mosConfig_error_reporting ===0) error_reporting($this->mosConfig_error_reporting); |
| 77 |
elseif (@$this->mosConfig_error_reporting > 0) error_reporting($this->mosConfig_error_reporting); |
else error_reporting($this->init_errorlevel); |
|
|
|
| 78 |
} |
} |
| 79 |
|
|
| 80 |
function &getMamboCore () { |
function &getMamboCore () { |
| 120 |
} |
} |
| 121 |
|
|
| 122 |
function getConfig () { |
function getConfig () { |
| 123 |
|
global $adminside; |
| 124 |
$code = ''; |
$code = ''; |
| 125 |
$f = @fopen($this->rootPath.'/configuration.php','rb'); |
$f = @fopen($this->rootPath.'/configuration.php','rb'); |
| 126 |
if ($f) { |
if ($f) { |
| 136 |
} |
} |
| 137 |
fclose($f); |
fclose($f); |
| 138 |
eval($code); |
eval($code); |
| 139 |
$subdir = substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT'])); |
if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) $docroot = $_SERVER['DOCUMENT_ROOT']; |
| 140 |
$this->subdirectory = str_replace('\\', '/', $subdir); |
else { |
| 141 |
$this->mosConfig_live_site = 'http://'.$_SERVER['SERVER_NAME'].$this->subdirectory; |
// Find information about where execution started |
| 142 |
|
$origin = array_pop(debug_backtrace()); |
| 143 |
|
// Find the PHP script at the start, with a fix for Windows slashes |
| 144 |
|
$absolutepath = str_replace('\\', '/', $origin['file']); |
| 145 |
|
$localpath = $_SERVER['PHP_SELF']; |
| 146 |
|
$docroot = substr($absolutepath,0,strpos($absolutepath,$localpath)); |
| 147 |
|
} |
| 148 |
|
$mamboroot = str_replace('\\', '/', dirname(__FILE__)); |
| 149 |
|
$this->subdirectory = substr($mamboroot, strlen($docroot)); |
| 150 |
|
$scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); |
| 151 |
|
if (isset($_SERVER['HTTP_HOST'])) { |
| 152 |
|
$withport = explode(':', $_SERVER['HTTP_HOST']); |
| 153 |
|
$servername = $withport[0]; |
| 154 |
|
if (isset($withport[1])) $port = ':'.$withport[1]; |
| 155 |
|
} |
| 156 |
|
elseif (isset($_SERVER['SERVER_NAME'])) $servername = $_SERVER['SERVER_NAME']; |
| 157 |
|
else trigger_error(T_('Impossible to determine the name of this server'), E_USER_ERROR); |
| 158 |
|
if (!isset($port) AND !empty($_SERVER['SERVER_PORT'])) $port = ':'.$_SERVER['SERVER_PORT']; |
| 159 |
|
if (isset($port)) { |
| 160 |
|
if (($scheme == 'http' AND $port == ':80') OR ($scheme == 'https' AND $port == ':443')) $port = ''; |
| 161 |
|
} |
| 162 |
|
else $port = ''; |
| 163 |
|
$afterscheme = '://'.$servername.$port.$this->subdirectory; |
| 164 |
|
$this->mosConfig_live_site = $this->mosConfig_secure_site = $scheme.$afterscheme; |
| 165 |
|
$this->mosConfig_unsecure_site = 'http'.$afterscheme; |
| 166 |
$this->mosConfig_absolute_path = $this->rootPath; |
$this->mosConfig_absolute_path = $this->rootPath; |
| 167 |
preg_match_all('/\$this\-\>([A-Za-z_][A-Za-z0-9_]*)/', $code, $matches); |
preg_match_all('/\$this\-\>([A-Za-z_][A-Za-z0-9_]*)/', $code, $matches); |
| 168 |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
| 180 |
} |
} |
| 181 |
|
|
| 182 |
function offlineCheck (&$user, &$database) { |
function offlineCheck (&$user, &$database) { |
| 183 |
if ($this->mosConfig_offline) { |
if ($this->mosConfig_offline OR file_exists($this->rootPath.'/installation/index.php')) { |
| 184 |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
| 185 |
session_name(md5($this->mosConfig_live_site)); |
session_name(md5($this->mosConfig_live_site)); |
| 186 |
session_start(); |
session_start(); |
| 187 |
if ($user =& checkAdminSession($database)) return; |
$session =& mosSession::getCurrent(); |
| 188 |
|
$my =& new mosUser(); |
| 189 |
|
$my->getSessionData(); |
| 190 |
|
if (mosSession::validate($my)) return; |
| 191 |
include("$this->mosConfig_absolute_path/offline.php"); |
include("$this->mosConfig_absolute_path/offline.php"); |
| 192 |
exit(); |
exit(); |
| 193 |
} |
} |
| 194 |
} |
} |
| 195 |
|
|
| 196 |
function fixLanguage () { |
function fixLanguage () { |
|
|
|
|
|
|
|
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/error.php'); |
|
| 197 |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
| 198 |
|
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/error.php'); |
| 199 |
|
require_once($this->mosConfig_absolute_path.'/includes/mambofunc.php'); |
| 200 |
|
require_once($this->mosConfig_absolute_path.'/includes/mambolanguage.class.php'); |
| 201 |
|
error_reporting(E_ALL) ; |
| 202 |
########## DEPRECATED ############ |
########## DEPRECATED ############ |
| 203 |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
| 204 |
else $this->set('mosConfig_lang', 'english'); |
else $this->set('mosConfig_lang', 'english'); |
| 206 |
if (file_exists($language_file)) require_once ($language_file); |
if (file_exists($language_file)) require_once ($language_file); |
| 207 |
################################### |
################################### |
| 208 |
|
|
|
//set_error_handler('error_handler'); |
|
|
$lang = $this->mosConfig_lang; |
|
| 209 |
|
|
| 210 |
|
$this->mosConfig_lang = mosGetParam($_POST, 'setLanguage', $this->mosConfig_lang); |
| 211 |
|
|
|
$langfile = $this->rootPath.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR.$lang.'.xml'; |
|
|
$p = xml_parser_create(); |
|
|
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); |
|
|
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); |
|
|
xml_parse_into_struct($p, implode("", file($langfile)), $values); |
|
|
xml_parser_free($p); |
|
|
foreach($values as $key => $value) |
|
|
{ |
|
|
if ($value['tag'] == 'param') { |
|
|
$name = $value['attributes']['name']; |
|
|
$this->language[$name] = $value['attributes']['default']; |
|
|
} |
|
|
} |
|
| 212 |
|
|
| 213 |
if (!defined('_ISO')) DEFINE('_ISO','charset='.$this->language['encoding']); |
$language =& mamboLanguage::getInstance($this->mosConfig_lang, $this->rootPath.'/language/'); |
| 214 |
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $this->language['dateformat']); //Uses PHP's strftime Command Format |
$languages = $language->getLanguages(); |
| 215 |
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $this->language['dateformat']." %H:%M"); |
$charset = $language->get('charset'); |
| 216 |
|
$dateformat = $language->get('dateformat'); |
| 217 |
|
$this->current_language = $language; |
| 218 |
|
if (!defined('_ISO')) DEFINE('_ISO','charset='.$charset); |
| 219 |
|
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $dateformat); //Uses PHP's strftime Command Format |
| 220 |
|
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $dateformat); |
| 221 |
|
|
|
//header('Content-Type: text/html; charset=utf-8'); |
|
|
$domain = $this->mosConfig_lang; |
|
|
$textdomain = $this->rootPath.'/language'; |
|
| 222 |
$gettext =& phpgettext(); |
$gettext =& phpgettext(); |
| 223 |
$gettext->debug = 0; |
$gettext->debug = $this->mosConfig_locale_debug; |
| 224 |
$gettext->has_gettext = 0; |
$gettext->has_gettext = $this->mosConfig_locale_use_gettext; |
| 225 |
$gettext->setlocale($name); |
$gettext->setlocale($this->mosConfig_lang); |
|
setlocale(LC_ALL, $this->language['locale']); |
|
|
setlocale(LC_CTYPE, $this->language['encoding']); |
|
|
$gettext->bindtextdomain($domain, $textdomain); |
|
|
$gettext->bind_textdomain_codeset($domain, $this->language['encoding']); |
|
|
$gettext->textdomain($domain); |
|
|
/**/ |
|
|
|
|
|
} |
|
|
|
|
|
function secure () { |
|
|
$this->mosConfig_unsecure_site = $this->mosConfig_live_site; |
|
|
if ($_SERVER['SERVER_PORT'] == 443) { |
|
|
if (!isset($this->mosConfig_secure_site)) $this->mosConfig_secure_site = str_replace('http://', 'https://', $this->mosConfig_live_site); |
|
|
$this->mosConfig_live_site = $this->mosConfig_secure_site; |
|
|
} |
|
| 226 |
} |
} |
| 227 |
|
|
| 228 |
function handleGlobals () { |
function handleGlobals () { |
| 249 |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
| 250 |
if ($option = strtolower(mosGetParam($_REQUEST, 'option'))); |
if ($option = strtolower(mosGetParam($_REQUEST, 'option'))); |
| 251 |
else { |
else { |
| 252 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 253 |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
| 254 |
$this->Itemid = $menus[0]->id; |
$this->Itemid = $menus[0]->id; |
| 255 |
$_REQUEST['Itemid'] = $this->Itemid; |
$_REQUEST['Itemid'] = $this->Itemid; |
| 268 |
if ($this->Itemid === 0) { |
if ($this->Itemid === 0) { |
| 269 |
if ( $option == 'com_content') { |
if ( $option == 'com_content') { |
| 270 |
require_once($this->rootPath().'/components/com_content/content.class.php'); |
require_once($this->rootPath().'/components/com_content/content.class.php'); |
| 271 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 272 |
$this->Itemid = $handler->getItemid(mosGetParam($_REQUEST, 'id', 0 )); |
$this->Itemid = $handler->getItemid(mosGetParam($_REQUEST, 'id', 0 )); |
| 273 |
$_REQUEST['Itemid'] = $this->Itemid; |
$_REQUEST['Itemid'] = $this->Itemid; |
| 274 |
} |
} |
| 275 |
else { |
else { |
| 276 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 277 |
$this->Itemid = $menuhandler->getIdLikeLink("index.php?option=$option"); |
$this->Itemid = $menuhandler->getIdLikeLink("index.php?option=$option"); |
| 278 |
if ($this->Itemid === 0) { |
if ($this->Itemid === 0) { |
| 279 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 280 |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
| 281 |
} |
} |
| 282 |
} |
} |
| 325 |
|
|
| 326 |
function handleLogin () { |
function handleLogin () { |
| 327 |
require_once($this->rootPath().'/includes/authenticator.php'); |
require_once($this->rootPath().'/includes/authenticator.php'); |
| 328 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 329 |
$loggedin = $authenticator->loginUser(); |
$loggedin = $authenticator->loginUser(); |
| 330 |
if ($loggedin) $this->logMessage(_LOGIN_SUCCESS); |
if ($loggedin) $this->logMessage(_LOGIN_SUCCESS); |
| 331 |
else mamboCore::redirect('index.php'); |
else mamboCore::redirect('index.php'); |
| 333 |
|
|
| 334 |
function handleLogout () { |
function handleLogout () { |
| 335 |
require_once($this->rootPath().'/includes/authenticator.php'); |
require_once($this->rootPath().'/includes/authenticator.php'); |
| 336 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 337 |
$authenticator->logoutUser(); |
$authenticator->logoutUser(); |
| 338 |
$this->logMessage(_LOGOUT_SUCCESS); |
$this->logMessage(_LOGOUT_SUCCESS); |
| 339 |
} |
} |
| 344 |
header( 'Cache-Control: no-store, no-cache, must-revalidate' ); |
header( 'Cache-Control: no-store, no-cache, must-revalidate' ); |
| 345 |
header( 'Cache-Control: post-check=0, pre-check=0', false ); |
header( 'Cache-Control: post-check=0, pre-check=0', false ); |
| 346 |
header( 'Pragma: no-cache' ); |
header( 'Pragma: no-cache' ); |
| 347 |
$mambothandler = mosMambotHandler::getInstance(); |
$mambothandler =& mosMambotHandler::getInstance(); |
| 348 |
$mambothandler->loadBotGroup('system'); |
$mambothandler->loadBotGroup('system'); |
| 349 |
$mambothandler->trigger('onHeaders', array($this)); |
$mambothandler->trigger('onHeaders', array($this)); |
| 350 |
} |
} |
| 353 |
$this->do_gzip_compress = FALSE; |
$this->do_gzip_compress = FALSE; |
| 354 |
//zlib.output_compression and ob_gzhandler don't get along well so we'll check to make |
//zlib.output_compression and ob_gzhandler don't get along well so we'll check to make |
| 355 |
//that zlib.output_compression is not enable in the php.ini before turning on ob_gzhandler |
//that zlib.output_compression is not enable in the php.ini before turning on ob_gzhandler |
| 356 |
if ( $this->mosConfig_gzip == 1 && (int)ini_get('zlib.output_compression') != 1 ) { |
if ( $this->mosConfig_gzip == 1 AND (int)ini_get('zlib.output_compression') != 1 ) { |
| 357 |
$phpver = phpversion(); |
$phpver = phpversion(); |
| 358 |
$useragent = mosGetParam( $_SERVER, 'HTTP_USER_AGENT', '' ); |
$useragent = mosGetParam( $_SERVER, 'HTTP_USER_AGENT', '' ); |
| 359 |
$canZip = mosGetParam( $_SERVER, 'HTTP_ACCEPT_ENCODING', '' ); |
$canZip = mosGetParam( $_SERVER, 'HTTP_ACCEPT_ENCODING', '' ); |
| 360 |
|
|
| 361 |
if ( $phpver >= '4.0.4pl1' && |
if ( $phpver >= '4.0.4pl1' AND |
| 362 |
( strpos($useragent,'compatible') !== false || |
( strpos($useragent,'compatible') !== false || |
| 363 |
strpos($useragent,'Gecko') !== false |
strpos($useragent,'Gecko') !== false |
| 364 |
) |
) |
| 421 |
|
|
| 422 |
} |
} |
| 423 |
|
|
| 424 |
|
/* This is the new error handler to store errors in the database |
| 425 |
|
class mosErrorHandler { |
| 426 |
|
var $types = array ( |
| 427 |
|
E_STRICT => 'Strict check', |
| 428 |
|
E_USER_WARNING => 'User Warning', |
| 429 |
|
E_USER_NOTICE => 'User Notice', |
| 430 |
|
E_WARNING => 'Warning', |
| 431 |
|
E_NOTICE => 'Notice', |
| 432 |
|
E_CORE_WARNING => 'Core Warning', |
| 433 |
|
E_COMPILE_WARNING => 'Compile Warning', |
| 434 |
|
E_USER_ERROR => 'User Error', |
| 435 |
|
E_ERROR => 'Error', |
| 436 |
|
E_PARSE => 'Parse error', |
| 437 |
|
E_CORE_ERROR => 'Core Error', |
| 438 |
|
E_COMPILE_ERROR => 'Compile Error' |
| 439 |
|
); |
| 440 |
|
|
| 441 |
|
function mosErrorHandler () { |
| 442 |
|
set_error_handler(array(&$this, 'handler')); |
| 443 |
|
} |
| 444 |
|
|
| 445 |
|
function handler ($errno, $errstr, $errfile, $errline, $errcontext) { |
| 446 |
|
if ($errno = E_STRICT) return; |
| 447 |
|
$string = $this->types[$errno].': '.$errstr.' in '.$errfile.' at '.$errline; |
| 448 |
|
$database = mamboDatabase::getInstance(); |
| 449 |
|
if (eregi('^(sql)$', $errstr)) { |
| 450 |
|
$extra = $database->getErrorMsg(); |
| 451 |
|
} |
| 452 |
|
if (function_exists('debug_backtrace')) { |
| 453 |
|
foreach(debug_backtrace() as $back) { |
| 454 |
|
if (@$back['file']) { |
| 455 |
|
$extra .= "\n".$back['file'].':'.$back['line']; |
| 456 |
|
} |
| 457 |
|
} |
| 458 |
|
} |
| 459 |
|
$database->setQuery("DELETE FROM #__errors WHERE file=$errfile AND line=$errline AND number=$errno"); |
| 460 |
|
$database->query(); |
| 461 |
|
$database->setQuery("INSERT INTO #__errors VALUES (0, $errno, '$errfile', $errline, '$string', '$extra')"); |
| 462 |
|
$database->query(); |
| 463 |
|
} |
| 464 |
|
} |
| 465 |
|
*/ |
| 466 |
|
|
| 467 |
if (!isset($adminside)) $adminside = 0; |
if (!isset($adminside)) $adminside = 0; |
| 468 |
if (!isset($indextype)) $indextype = 1; |
if (!isset($indextype)) $indextype = 1; |
| 469 |
|
|
| 471 |
$configuration->handleGlobals(); |
$configuration->handleGlobals(); |
| 472 |
|
|
| 473 |
require_once ($configuration->rootPath().'/includes/database.php'); |
require_once ($configuration->rootPath().'/includes/database.php'); |
| 474 |
|
//new mosErrorHandler(); |
| 475 |
|
|
| 476 |
/** |
/** |
| 477 |
* Mambo basic error object |
* Mambo basic error object |
| 569 |
* Constructor |
* Constructor |
| 570 |
*/ |
*/ |
| 571 |
function mosPathway () { |
function mosPathway () { |
| 572 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 573 |
$menus =& $menuhandler->getByParentOrder(0,'mainmenu'); |
$menus =& $menuhandler->getByParentOrder(0,'mainmenu'); |
| 574 |
$home = $menus[0]; |
$home = $menus[0]; |
| 575 |
$this->_names[] = $home->name; |
$this->_names[] = $home->name; |
| 610 |
function makePathway () { |
function makePathway () { |
| 611 |
$last = count($this->_names) - 1; |
$last = count($this->_names) - 1; |
| 612 |
if ($last == 0) return ''; |
if ($last == 0) return ''; |
| 613 |
$mainframe = mosMainFrame::getInstance(); |
$mainframe =& mosMainFrame::getInstance(); |
| 614 |
$result = "<span class='pathway'>"; |
$result = "<span class='pathway'>"; |
| 615 |
$config = mamboCore::getMamboCore(); |
$config =& mamboCore::getMamboCore(); |
| 616 |
$rootpath = $config->rootPath(); |
$rootpath = $config->rootPath(); |
| 617 |
$imgPath = 'templates/'.$mainframe->getTemplate().'/images/arrow.png'; |
$imgPath = 'templates/'.$mainframe->getTemplate().'/images/arrow.png'; |
| 618 |
if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='$config->mosConfig_live_site/$imgPath' border='0' alt='arrow' />"; |
if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='$config->mosConfig_live_site/$imgPath' border='0' alt='arrow' />"; |
| 681 |
/** |
/** |
| 682 |
* @param database A database connector object |
* @param database A database connector object |
| 683 |
*/ |
*/ |
| 684 |
function mosMenu( $dummy ) { |
function mosMenu() { |
| 685 |
$db = mamboDatabase::getInstance(); |
$db =& mamboDatabase::getInstance(); |
| 686 |
$this->mosDBTable( '#__menu', 'id', $db ); |
$this->mosDBTable( '#__menu', 'id', $db ); |
| 687 |
} |
} |
| 688 |
/** |
/** |
| 694 |
$k = $this->_tbl_key; |
$k = $this->_tbl_key; |
| 695 |
if ($oid !== null) $this->$k = $oid; |
if ($oid !== null) $this->$k = $oid; |
| 696 |
if ($this->$k === null) return false; |
if ($this->$k === null) return false; |
| 697 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 698 |
$menu = $menuhandler->getMenuById($this->$k); |
$menu =& $menuhandler->getMenuById($this->$k); |
| 699 |
if ($menu) { |
if ($menu) { |
| 700 |
foreach (get_object_vars($menu) as $key=>$data) $this->$key = $data; |
foreach (get_object_vars($menu) as $key=>$data) $this->$key = $data; |
| 701 |
return true; |
return true; |
| 740 |
} |
} |
| 741 |
|
|
| 742 |
function createDirectory ($dir) { |
function createDirectory ($dir) { |
| 743 |
|
if (file_exists($dir)) { |
| 744 |
if (is_dir($dir)) return true; |
if (is_dir($dir)) return true; |
| 745 |
|
else return false; |
| 746 |
|
} |
| 747 |
list($upDirectory, $count) = $this->containingDirectory($dir); |
list($upDirectory, $count) = $this->containingDirectory($dir); |
| 748 |
if ($count > 1 AND !is_dir($upDirectory)) if (!$this->createDirectory($upDirectory)) return false; |
if ($count > 1 AND !file_exists($upDirectory)) if (!$this->createDirectory($upDirectory)) return false; |
| 749 |
|
if (!is_dir($upDirectory)) return false; |
| 750 |
$dirperms = mamboCore::get('mosConfig_dirperms'); |
$dirperms = mamboCore::get('mosConfig_dirperms'); |
| 751 |
if ($dirperms) { |
if ($dirperms) { |
| 752 |
$origmask = @umask(0); |
$origmask = @umask(0); |
| 753 |
$mode = octdec($dirperms); |
$mode = octdec($dirperms); |
| 754 |
} |
} |
| 755 |
else $mode = 0777; |
else $mode = 0755; |
| 756 |
if (!@mkdir($dir, $mode )) $result = false; |
if (!@mkdir($dir, $mode )) $result = false; |
| 757 |
else { |
else { |
| 758 |
$result = true; |
$result = true; |
| 844 |
$ret = true; |
$ret = true; |
| 845 |
if (is_dir($path)) { |
if (is_dir($path)) { |
| 846 |
$topdir =& new mosDirectory($path); |
$topdir =& new mosDirectory($path); |
| 847 |
$files = $topdir->listFiles ('', 'file', true); |
$files =& $topdir->listFiles ('', 'file', true, true); |
| 848 |
$dirs = $topdir->listFiles ('', 'dir', true); |
$dirs =& $topdir->listFiles ('', 'dir', true, true); |
| 849 |
} |
} |
| 850 |
else { |
else { |
| 851 |
$files = array($path); |
$files = array($path); |
| 913 |
$subdirectory->deleteAll(); |
$subdirectory->deleteAll(); |
| 914 |
unset($subdirectory); |
unset($subdirectory); |
| 915 |
} |
} |
| 916 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 917 |
$files =& $this->listAll ('file', false, true); |
$files =& $this->listAll ('file', false, true); |
| 918 |
foreach ($files as $file) $filemanager->deleteFile($file); |
foreach ($files as $file) $filemanager->deleteFile($file); |
| 919 |
$filemanager->deleteDirectory($this->path); |
$filemanager->deleteDirectory($this->path); |
| 921 |
|
|
| 922 |
function createFresh () { |
function createFresh () { |
| 923 |
$this->deleteAll(); |
$this->deleteAll(); |
| 924 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 925 |
$filemanager->createDirectory($this->path); |
$filemanager->createDirectory($this->path); |
| 926 |
return true; |
return true; |
| 927 |
} |
} |
| 928 |
|
|
| 929 |
function createIfNeeded () { |
function createIfNeeded () { |
| 930 |
if (!file_exists($this->path)) { |
if (!file_exists($this->path)) { |
| 931 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 932 |
$filemanager->createDirectory($this->path); |
$filemanager->createDirectory($this->path); |
| 933 |
} |
} |
| 934 |
} |
} |
| 946 |
|
|
| 947 |
function getSize () { |
function getSize () { |
| 948 |
$totalsize = 0; |
$totalsize = 0; |
| 949 |
$files = $this->listFiles(); |
$files =& $this->listFiles(); |
| 950 |
foreach ($files as $file) $totalsize += filesize($this->path.$file); |
foreach ($files as $file) $totalsize += filesize($this->path.$file); |
| 951 |
return $totalsize; |
return $totalsize; |
| 952 |
} |
} |
| 971 |
* Constructor |
* Constructor |
| 972 |
*/ |
*/ |
| 973 |
function mosMenuHandler() { |
function mosMenuHandler() { |
| 974 |
global $my; |
$database =& mamboDatabase::getInstance(); |
|
$database = mamboDatabase::getInstance(); |
|
| 975 |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
| 976 |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
| 977 |
if (!$this->_menus) $this->_menus = array(); |
if (!$this->_menus) $this->_menus = array(); |
| 998 |
function &getMenuByID ($id) { |
function &getMenuByID ($id) { |
| 999 |
if (isset($this->_idlinks[$id])) { |
if (isset($this->_idlinks[$id])) { |
| 1000 |
$key = $this->_idlinks[$id]; |
$key = $this->_idlinks[$id]; |
| 1001 |
return $this->_menus[$key]; |
$result = $this->_menus[$key]; |
| 1002 |
} |
} |
| 1003 |
$result = null; |
else $result = null; |
| 1004 |
return $result; |
return $result; |
| 1005 |
} |
} |
| 1006 |
|
|
| 1018 |
return $result; |
return $result; |
| 1019 |
} |
} |
| 1020 |
|
|
| 1021 |
|
function &getMenuTypes () { |
| 1022 |
|
$types = array(); |
| 1023 |
|
foreach ($this->_menus as $menu) { |
| 1024 |
|
if (!isset($types[$menu->menutype])) $types[$menu->menutype] = 0; |
| 1025 |
|
$types[$menu->menutype]++; |
| 1026 |
|
} |
| 1027 |
|
return $types; |
| 1028 |
|
} |
| 1029 |
|
|
| 1030 |
function getIDByTypeLink ($type, $link) { |
function getIDByTypeLink ($type, $link) { |
| 1031 |
foreach ($this->_menus as $menu) { |
foreach ($this->_menus as $menu) { |
| 1032 |
if ($menu->published == 1 AND ($type == '*' OR $menu->type == $type) AND $menu->link == $link) return $menu->id; |
if ($menu->published == 1 AND ($type == '*' OR $menu->type == $type) AND $menu->link == $link) return $menu->id; |
| 1116 |
$menu = $this->_menus[$key]; |
$menu = $this->_menus[$key]; |
| 1117 |
if ($menutype AND $mtype != $menutype) continue; |
if ($menutype AND $mtype != $menutype) continue; |
| 1118 |
if ($Itemid AND $Itemid != $menu->id) continue; |
if ($Itemid AND $Itemid != $menu->id) continue; |
| 1119 |
if ($maxaccess AND $menu->access > $maxaccess) continue; |
if ($menu->access > $maxaccess) continue; |
| 1120 |
if ($noparent AND $parent != 0) continue; |
if ($noparent AND $parent != 0) continue; |
| 1121 |
$result[] = $this->_menus[$key]; |
$result[] = $this->_menus[$key]; |
| 1122 |
} |
} |
| 1128 |
|
|
| 1129 |
function setPathway ($Itemid) { |
function setPathway ($Itemid) { |
| 1130 |
if ($Itemid) { |
if ($Itemid) { |
| 1131 |
$menu = $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1132 |
if ($menu->parent) $this->setPathway($menu->parent); |
if ($menu->parent) $this->setPathway($menu->parent); |
| 1133 |
$pathway = mosPathway::getInstance(); |
$pathway =& mosPathway::getInstance(); |
| 1134 |
$pathway->addItem($menu->name, $menu->link."&Itemid=$Itemid"); |
$pathway->addItem($menu->name, $menu->link."&Itemid=$Itemid"); |
| 1135 |
} |
} |
| 1136 |
} |
} |
| 1144 |
* @return boolean True if the visitor's group at least equal to the menu access |
* @return boolean True if the visitor's group at least equal to the menu access |
| 1145 |
*/ |
*/ |
| 1146 |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
| 1147 |
$exceptions = array ('com_banner', 'com_poll', 'com_registration', 'com_rss'); |
// Construct a link to this component - if no menu for it, assume it is OK |
|
if (in_array($menu_option, $exceptions)) return true; |
|
| 1148 |
$dblink="index.php?option=$menu_option"; |
$dblink="index.php?option=$menu_option"; |
| 1149 |
|
if ($this->getIDLikeLink($dblink) == 0) return true; |
| 1150 |
if ($Itemid) { |
if ($Itemid) { |
| 1151 |
$menu = $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1152 |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
| 1153 |
} |
} |
| 1154 |
if (!isset($access)) { |
if (!isset($access)) { |
| 1155 |
if ($task!='') $dblink .= "&task=$task"; |
if ($task!='') $dblink .= "&task=$task"; |
| 1156 |
$menu = $this->maxAccessLink($dblink); |
$menu =& $this->maxAccessLink($dblink); |
| 1157 |
if (isset($menu)) { |
if (isset($menu)) { |
| 1158 |
$access = $menu->access; |
$access = $menu->access; |
| 1159 |
mamboCore::set('Itemid', $menu->id); |
mamboCore::set('Itemid', $menu->id); |
| 1173 |
$temp = split("&task=view&id=", $mitem->link); |
$temp = split("&task=view&id=", $mitem->link); |
| 1174 |
if (isset($temp[1])) { |
if (isset($temp[1])) { |
| 1175 |
require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php'); |
| 1176 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 1177 |
$mitem->link .= '&Itemid='.$handler->getItemid($temp[1]); |
$mitem->link .= '&Itemid='.$handler->getItemid($temp[1]); |
| 1178 |
} |
} |
| 1179 |
break; |
break; |
| 1235 |
*/ |
*/ |
| 1236 |
function mosShowVIMenu( &$params ) { |
function mosShowVIMenu( &$params ) { |
| 1237 |
global $my, $cur_template, $Itemid; |
global $my, $cur_template, $Itemid; |
|
|
|
| 1238 |
if (mamboCore::get('mosConfig_shownoauth')) $maxaccess = 0; |
if (mamboCore::get('mosConfig_shownoauth')) $maxaccess = 0; |
| 1239 |
else $maxaccess = $my->gid; |
else $maxaccess = $my->gid; |
| 1240 |
$rows =& $this->getByParentOrder(0, $params->get('menutype'), $maxaccess); |
$rows =& $this->getByParentOrder(0, $params->get('menutype'), $maxaccess); |
| 1372 |
$my = mamboCore::is_set('currentUser') ? mamboCore::get('currentUser') : null; |
$my = mamboCore::is_set('currentUser') ? mamboCore::get('currentUser') : null; |
| 1373 |
$gid = $my ? $my->gid : 0; |
$gid = $my ? $my->gid : 0; |
| 1374 |
$this->_events = array(); |
$this->_events = array(); |
| 1375 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 1376 |
$database->setQuery( "SELECT folder, element, published, params, CONCAT_WS('/',folder,element) AS lookup" |
$database->setQuery( "SELECT folder, element, published, params, CONCAT_WS('/',folder,element) AS lookup" |
| 1377 |
. "\nFROM #__mambots" |
. "\nFROM #__mambots" |
| 1378 |
. "\nWHERE published >= 1 AND access <= $gid" |
. "\nWHERE published >= 1 AND access <= $gid" |
| 1390 |
return $instance; |
return $instance; |
| 1391 |
} |
} |
| 1392 |
/** |
/** |
| 1393 |
|
* Register a class-type mambot, provided it has a perform method |
| 1394 |
|
* - can register for multiple events if desired |
| 1395 |
|
* @param object The mambot object |
| 1396 |
|
* @param mixed string or array of strings - the mambot events to be registered |
| 1397 |
|
* @param int the subscript for use in the main array of mambots |
| 1398 |
|
*/ |
| 1399 |
|
function _botRegister (&$botObject, &$selected, $i) { |
| 1400 |
|
$function = array(&$botObject, 'perform'); |
| 1401 |
|
if (!is_callable($function)) return; |
| 1402 |
|
if (is_array($selected)) foreach ($selected as $select) $this->_botRegister($botObject, $select); |
| 1403 |
|
$this->_events[$selected][] = array ($function, $i); |
| 1404 |
|
$this->_registered[$i] = true; |
| 1405 |
|
} |
| 1406 |
|
|
| 1407 |
|
/** |
| 1408 |
* Loads all the bot files for a particular group |
* Loads all the bot files for a particular group |
| 1409 |
* @param string The group name, relates to the sub-directory in the mambots directory |
* @param string The group name, relates to the sub-directory in the mambots directory |
| 1410 |
*/ |
*/ |
| 1421 |
require_once( $path ); |
require_once( $path ); |
| 1422 |
if (!isset($this->_registered[$i])) { |
if (!isset($this->_registered[$i])) { |
| 1423 |
$botclass = str_replace('.','_',$bot->element); |
$botclass = str_replace('.','_',$bot->element); |
| 1424 |
|
if (class_exists($botclass)) { |
| 1425 |
$newbot = new $botclass(); |
$newbot = new $botclass(); |
| 1426 |
$function = array ($newbot, 'perform'); |
if (is_callable(array(&$newbot, 'register'))) { |
| 1427 |
$selected = $newbot->register(); |
$selected = $newbot->register(); |
| 1428 |
if (is_array($selected)) foreach ($selected as $select) $this->_events[$select][] = array($function, $i); |
$this->_botRegister($newbot, $selected, $i); |
| 1429 |
else $this->_events[$selected][] = array ($function, $i); |
} |
| 1430 |
$this->_registered[$i] = true; |
} |
| 1431 |
} |
} |
| 1432 |
$total++; |
$total++; |
| 1433 |
} |
} |
| 1543 |
var $sendEmail=null; |
var $sendEmail=null; |
| 1544 |
/** @var int The group id number */ |
/** @var int The group id number */ |
| 1545 |
var $gid=null; |
var $gid=null; |
| 1546 |
|
/** @var int Group number from ACL */ |
| 1547 |
|
var $grp=null; |
| 1548 |
/** @var datetime */ |
/** @var datetime */ |
| 1549 |
var $registerDate=null; |
var $registerDate=null; |
| 1550 |
/** @var datetime */ |
/** @var datetime */ |
| 1557 |
/** |
/** |
| 1558 |
* @param database A database connector object |
* @param database A database connector object |
| 1559 |
*/ |
*/ |
| 1560 |
function mosUser( $dummy ) { |
function mosUser() { |
| 1561 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 1562 |
$this->mosDBTable( '#__users', 'id', $database ); |
$this->mosDBTable( '#__users', 'id', $database ); |
| 1563 |
} |
} |
| 1564 |
|
|
| 1565 |
/** |
/** |
| 1566 |
|
* Return true if this user is an administrator, false otherwise |
| 1567 |
|
*/ |
| 1568 |
|
function isAdmin() { |
| 1569 |
|
return ( strtolower( $this->usertype ) == 'superadministrator' OR strtolower( $this->usertype ) == 'super administrator' OR (isset($this->grp) AND $this->grp == 16) ) ? true : false; |
| 1570 |
|
} |
| 1571 |
|
|
| 1572 |
|
/** |
| 1573 |
* Fill a user object with information from the current session |
* Fill a user object with information from the current session |
| 1574 |
*/ |
*/ |
| 1575 |
function getSessionData() { |
function getSessionData() { |
| 1576 |
$session = mosSession::getCurrent(); |
$session =& mosSession::getCurrent(); |
| 1577 |
$this->id = intval( $session->userid ); |
$this->id = intval( $session->userid ); |
| 1578 |
$this->username = $session->username; |
$this->username = $session->username; |
| 1579 |
$this->usertype = $session->usertype; |
$this->usertype = $session->usertype; |
| 1580 |
$this->gid = intval( $session->gid ); |
$this->gid = intval( $session->gid ); |
| 1581 |
} |
} |
| 1582 |
|
|
| 1583 |
|
function getSession () { |
| 1584 |
|
$this->id = mosGetParam( $_SESSION, 'session_user_id', 0 ); |
| 1585 |
|
$this->username = mosGetParam( $_SESSION, 'session_username', '' ); |
| 1586 |
|
$this->usertype = mosGetParam( $_SESSION, 'session_usertype', '' ); |
| 1587 |
|
$this->gid = mosGetParam( $_SESSION, 'session_gid', 0 ); |
| 1588 |
|
$this->grp = mosGetParam( $_SESSION, 'session_grp', 0); |
| 1589 |
|
} |
| 1590 |
/** |
/** |
| 1591 |
* Validation and filtering |
* Validation and filtering |
| 1592 |
* @return boolean True is satisfactory |
* @return boolean True is satisfactory |
| 1644 |
} |
} |
| 1645 |
|
|
| 1646 |
function delete($oid=null) { |
function delete($oid=null) { |
| 1647 |
|
global $acl; |
| 1648 |
|
$k = $this->_tbl_key; |
| 1649 |
if ($oid) $this->id = intval( $oid ); |
if ($oid) $this->id = intval( $oid ); |
| 1650 |
$aro_id = $acl->get_object_id( 'users', $this->$k, 'ARO' ); |
$aro_id = $acl->get_object_id( 'users', $this->$k, 'ARO' ); |
| 1651 |
$acl->del_object( $aro_id, 'ARO', true ); |
$acl->del_object( $aro_id, 'ARO', true ); |
| 1749 |
*/ |
*/ |
| 1750 |
function logout() { |
function logout() { |
| 1751 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 1752 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 1753 |
$authenticator->logoutUser(); |
$authenticator->logoutUser(); |
| 1754 |
} |
} |
| 1755 |
/** |
/** |
| 1757 |
*/ |
*/ |
| 1758 |
function login ($username=null,$passwd=null) { |
function login ($username=null,$passwd=null) { |
| 1759 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 1760 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 1761 |
return $authenticator->loginUser($username, $passwd); |
return $authenticator->loginUser($username, $passwd); |
| 1762 |
} |
} |
| 1763 |
|
|
| 1826 |
* @param string The value of the content attibute to append to the existing |
* @param string The value of the content attibute to append to the existing |
| 1827 |
* Tags ordered in with Site Keywords and Description first |
* Tags ordered in with Site Keywords and Description first |
| 1828 |
*/ |
*/ |
| 1829 |
function appendMetaTag( $name, $content ) { |
function appendMetaTag( $name, $content, $ifEmpty=false ) { |
| 1830 |
list($name, $content) = $this->_tidyMetaData($name, $content); |
list($name, $content) = $this->_tidyMetaData($name, $content); |
| 1831 |
$tag = $this->_getMetaTag($name); |
$tag = $this->_getMetaTag($name); |
| 1832 |
|
if ($tag[0] AND $ifEmpty) return; |
| 1833 |
if ($tag[0] AND $content) $content .= ', '; |
if ($tag[0] AND $content) $content .= ', '; |
| 1834 |
$tag[0] = $content.$tag[0]; |
$tag[0] = $content.$tag[0]; |
| 1835 |
$this->_head['meta'][$name] = $tag; |
$this->_head['meta'][$name] = $tag; |
| 2078 |
*/ |
*/ |
| 2079 |
function getItemid ($id, $typed=1, $link=1, $bs=1, $bc=1, $gbs=1) { |
function getItemid ($id, $typed=1, $link=1, $bs=1, $bc=1, $gbs=1) { |
| 2080 |
require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php'); |
| 2081 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 2082 |
return $handler->getItemid($id, $typed, $link, $bs, $bc, $gbs); |
return $handler->getItemid($id, $typed, $link, $bs, $bc, $gbs); |
| 2083 |
} |
} |
| 2084 |
|
|
| 2085 |
function liveBookMark () { |
function liveBookMark () { |
| 2086 |
// support for Firefox Live Bookmarks ability for site syndication |
// support for Firefox Live Bookmarks ability for site syndication |
| 2087 |
$c_handler = mosComponentHandler::getInstance(); |
$c_handler =& mosComponentHandler::getInstance(); |
| 2088 |
$params = $c_handler->getParamsByName('Syndicate'); |
$params = $c_handler->getParamsByName('Syndicate'); |
| 2089 |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
| 2090 |
if ($live_bookmark) { |
if ($live_bookmark) { |
| 2113 |
function mosShowHead () { |
function mosShowHead () { |
| 2114 |
global $_VERSION; |
global $_VERSION; |
| 2115 |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 2116 |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc') ); |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc'), true ); |
| 2117 |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys') ); |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys'), true ); |
|
$this->addMetaTag( 'Generator', $_VERSION->PRODUCT . " - " . $_VERSION->COPYRIGHT); |
|
|
$this->addMetaTag( 'robots', 'index, follow' ); |
|
| 2118 |
echo $this->getHead(); |
echo $this->getHead(); |
| 2119 |
if (mamboCore::get('mosConfig_sef')) { |
if (mamboCore::get('mosConfig_sef')) { |
| 2120 |
echo "<base href=\"$mosConfig_live_site/\" />\r\n"; |
echo "<base href=\"$mosConfig_live_site/\" />\r\n"; |
| 2127 |
} |
} |
| 2128 |
$this->liveBookMark(); |
$this->liveBookMark(); |
| 2129 |
// outputs link tag for page |
// outputs link tag for page |
| 2130 |
$configuration = mamboCore::getMamboCore(); |
$configuration =& mamboCore::getMamboCore(); |
| 2131 |
?> |
?> |
| 2132 |
<link rel="shortcut icon" href="<?php echo $configuration->getFavIcon();?>" /> |
<link rel="shortcut icon" href="<?php echo $configuration->getFavIcon();?>" /> |
| 2133 |
<?php |
<?php |
| 2176 |
class mosSession extends mosDBTable { |
class mosSession extends mosDBTable { |
| 2177 |
/** @var int Primary key */ |
/** @var int Primary key */ |
| 2178 |
var $session_id=null; |
var $session_id=null; |
| 2179 |
/** @var string */ |
/** @var time */ |
| 2180 |
var $time=null; |
var $time=null; |
| 2181 |
/** @var string */ |
/** @var int User ID */ |
| 2182 |
var $userid=0; |
var $userid=0; |
| 2183 |
/** @var string */ |
/** @var string */ |
| 2184 |
var $usertype=null; |
var $usertype=null; |
| 2185 |
/** @var string */ |
/** @var string */ |
| 2186 |
var $username=''; |
var $username=''; |
| 2187 |
/** @var time */ |
/** @var int User group ID */ |
| 2188 |
var $gid=0; |
var $gid=0; |
| 2189 |
/** @var int */ |
/** @var int */ |
| 2190 |
var $guest=1; |
var $guest=1; |
| 2194 |
/** |
/** |
| 2195 |
* @param database A database connector object |
* @param database A database connector object |
| 2196 |
*/ |
*/ |
| 2197 |
function mosSession( &$db ) { |
function mosSession() { |
| 2198 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2199 |
$this->mosDBTable( '#__session', 'session_id', $database ); |
$this->mosDBTable( '#__session', 'session_id', $database ); |
| 2200 |
$this->time = time(); |
$this->time = time(); |
| 2201 |
} |
} |
| 2202 |
|
|
| 2203 |
|
function validate ($user) { |
| 2204 |
|
// check against db record of session |
| 2205 |
|
$session_id = mosGetParam( $_SESSION, 'session_id', '' ); |
| 2206 |
|
$logintime = mosGetParam( $_SESSION, 'session_logintime', '' ); |
| 2207 |
|
if ($session_id == md5( $user->id.$user->username.$user->usertype.$logintime )) { |
| 2208 |
|
$current_time = time(); |
| 2209 |
|
$database = mamboDatabase::getInstance(); |
| 2210 |
|
$database->setQuery ("UPDATE #__session" |
| 2211 |
|
. "\nSET time='$current_time', guest=-3-guest" |
| 2212 |
|
. "\nWHERE session_id='$session_id'" |
| 2213 |
|
. " AND username = '" . $database->getEscaped( $user->username ) . "'" |
| 2214 |
|
. " AND userid = " . intval( $user->id ) |
| 2215 |
|
); |
| 2216 |
|
if (!$result = $database->query()) echo $database->stderr(); |
| 2217 |
|
elseif ($database->getAffectedRows() == 1) return true; |
| 2218 |
|
} |
| 2219 |
|
return false; |
| 2220 |
|
} |
| 2221 |
|
|
| 2222 |
function &getCurrent () { |
function &getCurrent () { |
| 2223 |
static $currentSession; |
static $currentSession; |
| 2224 |
if (!is_object($currentSession)) { |
if (!is_object($currentSession)) { |
| 2225 |
$currentSession = new mosSession($dummy); |
$currentSession = new mosSession(); |
| 2226 |
$currentSession->purge(intval(mamboCore::get('mosConfig_lifetime'))); |
mosSession::purge(); |
| 2227 |
$sessionCookieName = md5('site'.mamboCore::get('mosConfig_live_site')); |
$sessionCookieName = md5('site'.mamboCore::get('mosConfig_live_site')); |
| 2228 |
$sessioncookie = mosGetParam($_COOKIE, $sessionCookieName, null); |
$sessioncookie = mosGetParam($_COOKIE, $sessionCookieName, null); |
| 2229 |
$usercookie = mosGetParam($_COOKIE, 'usercookie', null); |
$usercookie = mosGetParam($_COOKIE, 'usercookie', null); |
| 2241 |
if ($usercookie) { |
if ($usercookie) { |
| 2242 |
// Remember me cookie exists. Login with usercookie info. |
// Remember me cookie exists. Login with usercookie info. |
| 2243 |
require_once (mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once (mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 2244 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 2245 |
$authenticator->authenticateUser ($message, $usercookie['username'], $usercookie['password'], null, $currentSession); |
$authenticator->authenticateUser ($message, $usercookie['username'], $usercookie['password'], null, $currentSession); |
| 2246 |
} |
} |
| 2247 |
} |
} |
| 2279 |
if ($randnum != "") { |
if ($randnum != "") { |
| 2280 |
$cryptrandnum = md5( $randnum ); |
$cryptrandnum = md5( $randnum ); |
| 2281 |
$this->_db->setQuery( "SELECT $this->_tbl_key FROM $this->_tbl WHERE $this->_tbl_key=MD5('$randnum')" ); |
$this->_db->setQuery( "SELECT $this->_tbl_key FROM $this->_tbl WHERE $this->_tbl_key=MD5('$randnum')" ); |
| 2282 |
if(!$result = $this->_db->query()) { |
if(!($result = $this->_db->query())) { |
| 2283 |
die( $this->_db->stderr( true )); |
die( $this->_db->stderr( true )); |
| 2284 |
// todo: handle gracefully |
// todo: handle gracefully |
| 2285 |
} |
} |
| 2296 |
return $this->_session_cookie; |
return $this->_session_cookie; |
| 2297 |
} |
} |
| 2298 |
|
|
| 2299 |
function purge( $inc=1800 ) { |
function purge () { |
| 2300 |
$past = time() - $inc; |
$past = time() - intval(mamboCore::get('mosConfig_lifetime')); |
| 2301 |
$query = "DELETE FROM $this->_tbl" |
$adminpast = time() - 3600; |
| 2302 |
. "\nWHERE (time < $past)"; |
$database = mamboDatabase::getInstance(); |
| 2303 |
$this->_db->setQuery($query); |
$database->setQuery("DELETE FROM #__session WHERE (time<$past AND guest>=0) OR (time<$adminpast AND guest<0)"); |
| 2304 |
|
return $database->query(); |
|
return $this->_db->query(); |
|
| 2305 |
} |
} |
| 2306 |
|
|
| 2307 |
} |
} |
| 2308 |
|
|
| 2309 |
/** |
/** |
| 2412 |
return $result; |
return $result; |
| 2413 |
} |
} |
| 2414 |
/** |
/** |
| 2415 |
|
* @param string The name of the control, or the default text area if a setup file is not found |
| 2416 |
|
* @return string HTML |
| 2417 |
|
*/ |
| 2418 |
|
function render( $name='params' ) { |
| 2419 |
|
if (is_file($this->_path)) { |
| 2420 |
|
$parser = new mosXMLParams ($this->_path, $this, $name); |
| 2421 |
|
if (count($parser->html)) return implode("\n", $parser->html); |
| 2422 |
|
} |
| 2423 |
|
$raw = $this->_raw; |
| 2424 |
|
return "<textarea name='$name' cols='40' rows='10' class='text_area'>$raw</textarea>"; |
| 2425 |
|
} |
| 2426 |
|
|
| 2427 |
|
/** |
| 2428 |
* special handling for textarea param |
* special handling for textarea param |
| 2429 |
*/ |
*/ |
| 2430 |
function textareaHandling( &$txt ) { |
function textareaHandling( &$txt ) { |
| 2456 |
} |
} |
| 2457 |
} |
} |
| 2458 |
|
|
| 2459 |
|
|
| 2460 |
require($configuration->rootPath().'/includes/version.php'); |
require($configuration->rootPath().'/includes/version.php'); |
| 2461 |
$_VERSION =& new version(); |
$_VERSION =& new version(); |
| 2462 |
|
|
| 2471 |
$local_backup_path = $configuration->rootPath().'/administrator/backups'; |
$local_backup_path = $configuration->rootPath().'/administrator/backups'; |
| 2472 |
$media_path = $configuration->rootPath().'/media/'; |
$media_path = $configuration->rootPath().'/media/'; |
| 2473 |
$image_path = $configuration->rootPath().'/images/stories'; |
$image_path = $configuration->rootPath().'/images/stories'; |
| 2474 |
|
$lang_path = $configuration->rootPath().'/language'; |
| 2475 |
$image_size = 100; |
$image_size = 100; |
| 2476 |
|
|
| 2477 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2478 |
$database->debug(mamboCore::get('mosConfig_debug')); |
$database->debug(mamboCore::get('mosConfig_debug')); |
| 2479 |
|
|
| 2480 |
|
// |
| 2481 |
|
|
| 2482 |
|
$gettext =& phpgettext(); |
| 2483 |
|
$gettext->bindtextdomain('common', $configuration->rootPath().'/language'); |
| 2484 |
|
$gettext->textdomain('common'); |
| 2485 |
|
//dump($gettext->textdomain(substr($option, 3))); |
| 2486 |
|
//$gettext->bindtextdomain('frontend', $lang_path); |
| 2487 |
|
//$gettext->textdomain('frontend'); |
| 2488 |
|
|
| 2489 |
if (!$adminside) { |
if (!$adminside) { |
| 2490 |
$sefcode = $configuration->rootPath().'/components/com_sef/sef.php'; |
$sefcode = $configuration->rootPath().'/components/com_sef/sef.php'; |
| 2491 |
if (file_exists($sefcode)) require_once($sefcode); |
if (file_exists($sefcode)) require_once($sefcode); |
| 2492 |
else require_once($configuration->rootPath().'/includes/sef.php'); |
else require_once($configuration->rootPath().'/includes/sef.php'); |
| 2493 |
$urlerror = 0; |
$urlerror = 0; |
| 2494 |
if (mamboCore::get('mosConfig_sef') AND $indextype == 3) { |
if (mamboCore::get('mosConfig_sef') AND $indextype == 3) { |
| 2495 |
$sef = mosSEF::getInstance(); |
$sef =& mosSEF::getInstance(); |
| 2496 |
$urlerror = $sef->sefRetrieval(mamboCore::get('mosConfig_register_globals')); |
$urlerror = $sef->sefRetrieval(mamboCore::get('mosConfig_register_globals')); |
| 2497 |
$indextype = 1; |
$indextype = 1; |
| 2498 |
} |
} |
| 2507 |
$act = strtolower(mosGetParam($_REQUEST, 'act', '')); |
$act = strtolower(mosGetParam($_REQUEST, 'act', '')); |
| 2508 |
$section = mosGetParam($_REQUEST, 'section', ''); |
$section = mosGetParam($_REQUEST, 'section', ''); |
| 2509 |
$no_html = strtolower(mosGetParam($_REQUEST, 'no_html', '')); |
$no_html = strtolower(mosGetParam($_REQUEST, 'no_html', '')); |
| 2510 |
|
$cid = (array) mosGetParam( $_POST, 'cid', array() ); |
| 2511 |
|
|
| 2512 |
|
ini_set('session.use_trans_sid', 0); |
| 2513 |
|
ini_set('session.use_cookies', 1); |
| 2514 |
|
ini_set('session.use_only_cookies', 1); |
| 2515 |
|
|
| 2516 |
|
|
| 2517 |
if ($adminside) { |
if ($adminside) { |
| 2518 |
// Start ACL |
// Start ACL |
| 2521 |
$acl = new gacl_api(); |
$acl = new gacl_api(); |
| 2522 |
// Handle special admin side options |
// Handle special admin side options |
| 2523 |
$option = strtolower(mosGetParam($_REQUEST,'option','com_admin')); |
$option = strtolower(mosGetParam($_REQUEST,'option','com_admin')); |
| 2524 |
// Login will, if it succeeds, start a new session and set $my |
|
| 2525 |
if ($option == 'login') { |
$domain = substr($option, 4); |
| 2526 |
|
$gettext->bindtextdomain('administrator', $lang_path); |
| 2527 |
|
$gettext->bindtextdomain($domain, $lang_path); |
| 2528 |
|
$admindomain = $gettext->textdomain(); |
| 2529 |
|
$gettext->textdomain('administrator'); |
| 2530 |
|
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
| 2531 |
|
session_start(); |
| 2532 |
|
// restore some session variables |
| 2533 |
|
$my = new mosUser(); |
| 2534 |
|
$my->getSession(); |
| 2535 |
|
if (mosSession::validate($my)) mosSession::purge(); |
| 2536 |
|
else $my = null; |
| 2537 |
|
if (!$my AND $option == 'login') { |
| 2538 |
require_once($configuration->rootPath().'/includes/authenticator.php'); |
require_once($configuration->rootPath().'/includes/authenticator.php'); |
| 2539 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 2540 |
$my = $authenticator->loginAdmin($acl); |
$my = $authenticator->loginAdmin($acl); |
| 2541 |
} |
} |
|
// If this is not login, we should already have a valid admin session |
|
|
else { |
|
|
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
|
|
session_start(); |
|
| 2542 |
// Handle the remaining special options |
// Handle the remaining special options |
| 2543 |
if ($option == 'logout') { |
elseif ($option == 'logout') { |
| 2544 |
require($configuration->rootPath().'/administrator/logout.php'); |
require($configuration->rootPath().'/administrator/logout.php'); |
| 2545 |
exit(); |
exit(); |
| 2546 |
} |
} |
|
if ($option == 'simple_mode') $admin_mode = 'on'; |
|
|
elseif ($option == 'advanced_mode') $admin_mode = 'off'; |
|
|
else $admin_mode = mosGetParam($_SESSION, 'simple_editing', ''); |
|
|
$_SESSION['simple_editing'] = mosGetParam($_POST, 'simple_editing', $admin_mode); |
|
|
// Include admin side functions, check that we have a valid admin side session |
|
|
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
|
|
$my = checkAdminSession($database); |
|
|
} |
|
| 2547 |
// We can now create the mainframe object |
// We can now create the mainframe object |
| 2548 |
$mainframe =& new mosMainFrame($database, $option, '..', true); |
$mainframe =& new mosMainFrame($database, $option, '..', true); |
| 2549 |
// Provided $my is set, we have a valid admin side session and can include remaining code |
// Provided $my is set, we have a valid admin side session and can include remaining code |
| 2550 |
if ($my) { |
if ($my) { |
| 2551 |
mamboCore::set('currentUser', $my); |
mamboCore::set('currentUser', $my); |
| 2552 |
|
if ($option == 'simple_mode') $admin_mode = 'on'; |
| 2553 |
|
elseif ($option == 'advanced_mode') $admin_mode = 'off'; |
| 2554 |
|
else $admin_mode = mosGetParam($_SESSION, 'simple_editing', ''); |
| 2555 |
|
$_SESSION['simple_editing'] = mosGetParam($_POST, 'simple_editing', $admin_mode); |
| 2556 |
|
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
| 2557 |
require_once( $configuration->rootPath().'/includes/mambo.php' ); |
require_once( $configuration->rootPath().'/includes/mambo.php' ); |
| 2558 |
require_once ($configuration->rootPath().'/includes/mambofunc.php'); |
require_once ($configuration->rootPath().'/includes/mambofunc.php'); |
| 2559 |
require_once ($configuration->rootPath().'/includes/mamboHTML.php'); |
require_once ($configuration->rootPath().'/includes/mamboHTML.php'); |
| 2560 |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
| 2561 |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
| 2562 |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
| 2563 |
$_MAMBOTS = mosMambotHandler::getInstance(); |
require_once( $configuration->rootPath() . '/components/com_content/content.class.php' ); |
| 2564 |
|
$_MAMBOTS =& mosMambotHandler::getInstance(); |
| 2565 |
|
|
| 2566 |
|
|
| 2567 |
// If no_html is set, we avoid starting the template, and go straight to the component |
// If no_html is set, we avoid starting the template, and go straight to the component |
| 2568 |
if ($no_html) { |
if ($no_html) { |
| 2569 |
if ($path = $mainframe->getPath( "admin" )) require $path; |
if ($path = $mainframe->getPath( "admin" )) require $path; |
| 2577 |
$configuration->doGzip(); |
$configuration->doGzip(); |
| 2578 |
} |
} |
| 2579 |
else { |
else { |
| 2580 |
|
if (!isset($popup)) { |
| 2581 |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
| 2582 |
if ($pop) require_once($configuration->rootPath()."/administrator/popups/$pop"); |
if ($pop) require($configuration->rootPath()."/administrator/popups/$pop"); |
| 2583 |
else require_once($configuration->rootPath()."/administrator/popups/index3pop.php"); |
else require($configuration->rootPath()."/administrator/popups/index3pop.php"); |
| 2584 |
$configuration->doGzip(); |
$configuration->doGzip(); |
| 2585 |
} |
} |
| 2586 |
} |
} |
| 2587 |
// If $my was not set, the only possibility is to ask for an admin side login |
} |
| 2588 |
|
// If $my was not set, the only possibility is to offer a login screen |
| 2589 |
else { |
else { |
| 2590 |
$configuration->initGzip(); |
$configuration->initGzip(); |
| 2591 |
$path = $configuration->rootPath().'/administrator/templates/'.$mainframe->getTemplate().'/login.php'; |
$path = $configuration->rootPath().'/administrator/templates/'.$mainframe->getTemplate().'/login.php'; |
| 2599 |
$configuration->handleGlobals(); |
$configuration->handleGlobals(); |
| 2600 |
$Itemid = $configuration->get('Itemid'); |
$Itemid = $configuration->get('Itemid'); |
| 2601 |
|
|
| 2602 |
|
// load frontend language file |
| 2603 |
|
$gettext->bindtextdomain(substr($option, 4), $configuration->rootPath().'/language'); |
| 2604 |
|
$gettext->bindtextdomain('frontend', $configuration->rootPath().'/language'); |
| 2605 |
|
$frontdomain = $gettext->textdomain(); |
| 2606 |
|
$gettext->textdomain('frontend'); |
| 2607 |
|
|
| 2608 |
|
|
| 2609 |
$mainframe =& new mosMainFrame($database, $option, '.'); |
$mainframe =& new mosMainFrame($database, $option, '.'); |
| 2610 |
if ($option == 'login') $configuration->handleLogin(); |
if ($option == 'login') $configuration->handleLogin(); |
| 2611 |
elseif ($option == 'logout') $configuration->handleLogout(); |
elseif ($option == 'logout') $configuration->handleLogout(); |
| 2612 |
|
|
| 2613 |
$session = mosSession::getCurrent(); |
$session =& mosSession::getCurrent(); |
| 2614 |
$my =& new mosUser($database); |
$my =& new mosUser(); |
| 2615 |
$my->getSessionData(); |
$my->getSessionData(); |
| 2616 |
mamboCore::set('currentUser',$my); |
mamboCore::set('currentUser',$my); |
| 2617 |
$configuration->offlineCheck($my, $database); |
$configuration->offlineCheck($my, $database); |
| 2633 |
$mainframe->detect(); |
$mainframe->detect(); |
| 2634 |
|
|
| 2635 |
/** @global mosPlugin $_MAMBOTS */ |
/** @global mosPlugin $_MAMBOTS */ |
| 2636 |
$_MAMBOTS = mosMambotHandler::getInstance(); |
$_MAMBOTS =& mosMambotHandler::getInstance(); |
| 2637 |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
| 2638 |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
| 2639 |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
| 2640 |
|
require_once( $configuration->rootPath() . '/components/com_content/content.class.php' ); |
| 2641 |
$acl = new gacl_api(); |
$acl = new gacl_api(); |
| 2642 |
|
|
| 2643 |
/** Get the component handler */ |
/** Get the component handler */ |
| 2646 |
$c_handler->startBuffer(); |
$c_handler->startBuffer(); |
| 2647 |
|
|
| 2648 |
if (!$urlerror AND $path = $mainframe->getPath( 'front' )) { |
if (!$urlerror AND $path = $mainframe->getPath( 'front' )) { |
| 2649 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 2650 |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
| 2651 |
$menuhandler->setPathway($Itemid); |
$menuhandler->setPathway($Itemid); |
| 2652 |
if ($ret) require_once( $path ); |
if ($ret) { |
| 2653 |
|
$gettext->textdomain(substr($option, 4)); // get the component lang file |
| 2654 |
|
require ($path); |
| 2655 |
|
$gettext->textdomain($frontdomain); |
| 2656 |
|
} |
| 2657 |
else mosNotAuth(); |
else mosNotAuth(); |
| 2658 |
} |
} |
| 2659 |
else { |
else { |
| 2667 |
$configuration->initGzip(); |
$configuration->initGzip(); |
| 2668 |
|
|
| 2669 |
$configuration->standardHeaders(); |
$configuration->standardHeaders(); |
| 2670 |
if ($indextype == 1) { |
if (mosGetParam($_GET, 'syndstyle', '') == 'yes') mosMainBody(); |
| 2671 |
|
elseif ($indextype == 1) { |
| 2672 |
// loads template file |
// loads template file |
| 2673 |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
| 2674 |
echo '<font color=\"red\"><b>'.T_('Template File Not Found! Looking for template').'</b></font>'.$cur_template; |
echo '<font color=\"red\"><b>'.T_('Template File Not Found! Looking for template').'</b></font>'.$cur_template; |
| 2675 |
} else { |
} else { |
| 2676 |
require_once( 'templates/'. $cur_template .'/index.php' ); |
require_once( 'templates/'. $cur_template .'/index.php' ); |
| 2677 |
$mambothandler = mosMambotHandler::getInstance(); |
$mambothandler =& mosMambotHandler::getInstance(); |
| 2678 |
$mambothandler->loadBotGroup('system'); |
$mambothandler->loadBotGroup('system'); |
| 2679 |
$mambothandler->trigger('afterTemplate', array($configuration)); |
$mambothandler->trigger('afterTemplate', array($configuration)); |
| 2680 |
echo "<!-- ".time()." -->"; |
echo "<!-- ".time()." -->"; |
| 2707 |
$configuration->doGzip(); |
$configuration->doGzip(); |
| 2708 |
} |
} |
| 2709 |
// displays queries performed for page |
// displays queries performed for page |
| 2710 |
if ($configuration->get('mosConfig_debug')) $database->displayLogged(); |
if ($configuration->get('mosConfig_debug') AND $adminside != 3) $database->displayLogged(); |
| 2711 |
|
|
| 2712 |
?> |
?> |