| 49 |
} |
} |
| 50 |
|
|
| 51 |
function sefRelToAbs ($string) { |
function sefRelToAbs ($string) { |
| 52 |
$sef = mosSEF::getInstance(); |
$sef =& mosSEF::getInstance(); |
| 53 |
return $sef->sefRelToAbs($string); |
return $sef->sefRelToAbs($string); |
| 54 |
} |
} |
| 55 |
|
|
| 247 |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
| 248 |
if ($option = strtolower(mosGetParam($_REQUEST, 'option'))); |
if ($option = strtolower(mosGetParam($_REQUEST, 'option'))); |
| 249 |
else { |
else { |
| 250 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 251 |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
| 252 |
$this->Itemid = $menus[0]->id; |
$this->Itemid = $menus[0]->id; |
| 253 |
$_REQUEST['Itemid'] = $this->Itemid; |
$_REQUEST['Itemid'] = $this->Itemid; |
| 266 |
if ($this->Itemid === 0) { |
if ($this->Itemid === 0) { |
| 267 |
if ( $option == 'com_content') { |
if ( $option == 'com_content') { |
| 268 |
require_once($this->rootPath().'/components/com_content/content.class.php'); |
require_once($this->rootPath().'/components/com_content/content.class.php'); |
| 269 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 270 |
$this->Itemid = $handler->getItemid(mosGetParam($_REQUEST, 'id', 0 )); |
$this->Itemid = $handler->getItemid(mosGetParam($_REQUEST, 'id', 0 )); |
| 271 |
$_REQUEST['Itemid'] = $this->Itemid; |
$_REQUEST['Itemid'] = $this->Itemid; |
| 272 |
} |
} |
| 273 |
else { |
else { |
| 274 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 275 |
$this->Itemid = $menuhandler->getIdLikeLink("index.php?option=$option"); |
$this->Itemid = $menuhandler->getIdLikeLink("index.php?option=$option"); |
| 276 |
if ($this->Itemid === 0) { |
if ($this->Itemid === 0) { |
| 277 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 278 |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
$menus =& $menuhandler->getByParentOrder($this->Itemid, 'mainmenu'); |
| 279 |
} |
} |
| 280 |
} |
} |
| 323 |
|
|
| 324 |
function handleLogin () { |
function handleLogin () { |
| 325 |
require_once($this->rootPath().'/includes/authenticator.php'); |
require_once($this->rootPath().'/includes/authenticator.php'); |
| 326 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 327 |
$loggedin = $authenticator->loginUser(); |
$loggedin = $authenticator->loginUser(); |
| 328 |
if ($loggedin) $this->logMessage(_LOGIN_SUCCESS); |
if ($loggedin) $this->logMessage(_LOGIN_SUCCESS); |
| 329 |
else mamboCore::redirect('index.php'); |
else mamboCore::redirect('index.php'); |
| 331 |
|
|
| 332 |
function handleLogout () { |
function handleLogout () { |
| 333 |
require_once($this->rootPath().'/includes/authenticator.php'); |
require_once($this->rootPath().'/includes/authenticator.php'); |
| 334 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 335 |
$authenticator->logoutUser(); |
$authenticator->logoutUser(); |
| 336 |
$this->logMessage(_LOGOUT_SUCCESS); |
$this->logMessage(_LOGOUT_SUCCESS); |
| 337 |
} |
} |
| 342 |
header( 'Cache-Control: no-store, no-cache, must-revalidate' ); |
header( 'Cache-Control: no-store, no-cache, must-revalidate' ); |
| 343 |
header( 'Cache-Control: post-check=0, pre-check=0', false ); |
header( 'Cache-Control: post-check=0, pre-check=0', false ); |
| 344 |
header( 'Pragma: no-cache' ); |
header( 'Pragma: no-cache' ); |
| 345 |
$mambothandler = mosMambotHandler::getInstance(); |
$mambothandler =& mosMambotHandler::getInstance(); |
| 346 |
$mambothandler->loadBotGroup('system'); |
$mambothandler->loadBotGroup('system'); |
| 347 |
$mambothandler->trigger('onHeaders', array($this)); |
$mambothandler->trigger('onHeaders', array($this)); |
| 348 |
} |
} |
| 351 |
$this->do_gzip_compress = FALSE; |
$this->do_gzip_compress = FALSE; |
| 352 |
//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 |
| 353 |
//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 |
| 354 |
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 ) { |
| 355 |
$phpver = phpversion(); |
$phpver = phpversion(); |
| 356 |
$useragent = mosGetParam( $_SERVER, 'HTTP_USER_AGENT', '' ); |
$useragent = mosGetParam( $_SERVER, 'HTTP_USER_AGENT', '' ); |
| 357 |
$canZip = mosGetParam( $_SERVER, 'HTTP_ACCEPT_ENCODING', '' ); |
$canZip = mosGetParam( $_SERVER, 'HTTP_ACCEPT_ENCODING', '' ); |
| 358 |
|
|
| 359 |
if ( $phpver >= '4.0.4pl1' && |
if ( $phpver >= '4.0.4pl1' AND |
| 360 |
( strpos($useragent,'compatible') !== false || |
( strpos($useragent,'compatible') !== false || |
| 361 |
strpos($useragent,'Gecko') !== false |
strpos($useragent,'Gecko') !== false |
| 362 |
) |
) |
| 523 |
* Constructor |
* Constructor |
| 524 |
*/ |
*/ |
| 525 |
function mosPathway () { |
function mosPathway () { |
| 526 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 527 |
$menus =& $menuhandler->getByParentOrder(0,'mainmenu'); |
$menus =& $menuhandler->getByParentOrder(0,'mainmenu'); |
| 528 |
$home = $menus[0]; |
$home = $menus[0]; |
| 529 |
$this->_names[] = $home->name; |
$this->_names[] = $home->name; |
| 564 |
function makePathway () { |
function makePathway () { |
| 565 |
$last = count($this->_names) - 1; |
$last = count($this->_names) - 1; |
| 566 |
if ($last == 0) return ''; |
if ($last == 0) return ''; |
| 567 |
$mainframe = mosMainFrame::getInstance(); |
$mainframe =& mosMainFrame::getInstance(); |
| 568 |
$result = "<span class='pathway'>"; |
$result = "<span class='pathway'>"; |
| 569 |
$config = mamboCore::getMamboCore(); |
$config =& mamboCore::getMamboCore(); |
| 570 |
$rootpath = $config->rootPath(); |
$rootpath = $config->rootPath(); |
| 571 |
$imgPath = 'templates/'.$mainframe->getTemplate().'/images/arrow.png'; |
$imgPath = 'templates/'.$mainframe->getTemplate().'/images/arrow.png'; |
| 572 |
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' />"; |
| 636 |
* @param database A database connector object |
* @param database A database connector object |
| 637 |
*/ |
*/ |
| 638 |
function mosMenu( $dummy ) { |
function mosMenu( $dummy ) { |
| 639 |
$db = mamboDatabase::getInstance(); |
$db =& mamboDatabase::getInstance(); |
| 640 |
$this->mosDBTable( '#__menu', 'id', $db ); |
$this->mosDBTable( '#__menu', 'id', $db ); |
| 641 |
} |
} |
| 642 |
/** |
/** |
| 648 |
$k = $this->_tbl_key; |
$k = $this->_tbl_key; |
| 649 |
if ($oid !== null) $this->$k = $oid; |
if ($oid !== null) $this->$k = $oid; |
| 650 |
if ($this->$k === null) return false; |
if ($this->$k === null) return false; |
| 651 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 652 |
$menu = $menuhandler->getMenuById($this->$k); |
$menu =& $menuhandler->getMenuById($this->$k); |
| 653 |
if ($menu) { |
if ($menu) { |
| 654 |
foreach (get_object_vars($menu) as $key=>$data) $this->$key = $data; |
foreach (get_object_vars($menu) as $key=>$data) $this->$key = $data; |
| 655 |
return true; |
return true; |
| 794 |
$ret = true; |
$ret = true; |
| 795 |
if (is_dir($path)) { |
if (is_dir($path)) { |
| 796 |
$topdir =& new mosDirectory($path); |
$topdir =& new mosDirectory($path); |
| 797 |
$files = $topdir->listFiles ('', 'file', true); |
$files =& $topdir->listFiles ('', 'file', true); |
| 798 |
$dirs = $topdir->listFiles ('', 'dir', true); |
$dirs =& $topdir->listFiles ('', 'dir', true); |
| 799 |
} |
} |
| 800 |
else { |
else { |
| 801 |
$files = array($path); |
$files = array($path); |
| 863 |
$subdirectory->deleteAll(); |
$subdirectory->deleteAll(); |
| 864 |
unset($subdirectory); |
unset($subdirectory); |
| 865 |
} |
} |
| 866 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 867 |
$files =& $this->listAll ('file', false, true); |
$files =& $this->listAll ('file', false, true); |
| 868 |
foreach ($files as $file) $filemanager->deleteFile($file); |
foreach ($files as $file) $filemanager->deleteFile($file); |
| 869 |
$filemanager->deleteDirectory($this->path); |
$filemanager->deleteDirectory($this->path); |
| 871 |
|
|
| 872 |
function createFresh () { |
function createFresh () { |
| 873 |
$this->deleteAll(); |
$this->deleteAll(); |
| 874 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 875 |
$filemanager->createDirectory($this->path); |
$filemanager->createDirectory($this->path); |
| 876 |
return true; |
return true; |
| 877 |
} |
} |
| 878 |
|
|
| 879 |
function createIfNeeded () { |
function createIfNeeded () { |
| 880 |
if (!file_exists($this->path)) { |
if (!file_exists($this->path)) { |
| 881 |
$filemanager = mosFileManager::getInstance(); |
$filemanager =& mosFileManager::getInstance(); |
| 882 |
$filemanager->createDirectory($this->path); |
$filemanager->createDirectory($this->path); |
| 883 |
} |
} |
| 884 |
} |
} |
| 896 |
|
|
| 897 |
function getSize () { |
function getSize () { |
| 898 |
$totalsize = 0; |
$totalsize = 0; |
| 899 |
$files = $this->listFiles(); |
$files =& $this->listFiles(); |
| 900 |
foreach ($files as $file) $totalsize += filesize($this->path.$file); |
foreach ($files as $file) $totalsize += filesize($this->path.$file); |
| 901 |
return $totalsize; |
return $totalsize; |
| 902 |
} |
} |
| 922 |
*/ |
*/ |
| 923 |
function mosMenuHandler() { |
function mosMenuHandler() { |
| 924 |
global $my; |
global $my; |
| 925 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 926 |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
| 927 |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
| 928 |
if (!$this->_menus) $this->_menus = array(); |
if (!$this->_menus) $this->_menus = array(); |
| 1070 |
|
|
| 1071 |
function setPathway ($Itemid) { |
function setPathway ($Itemid) { |
| 1072 |
if ($Itemid) { |
if ($Itemid) { |
| 1073 |
$menu = $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1074 |
if ($menu->parent) $this->setPathway($menu->parent); |
if ($menu->parent) $this->setPathway($menu->parent); |
| 1075 |
$pathway = mosPathway::getInstance(); |
$pathway =& mosPathway::getInstance(); |
| 1076 |
$pathway->addItem($menu->name, $menu->link."&Itemid=$Itemid"); |
$pathway->addItem($menu->name, $menu->link."&Itemid=$Itemid"); |
| 1077 |
} |
} |
| 1078 |
} |
} |
| 1090 |
if (in_array($menu_option, $exceptions)) return true; |
if (in_array($menu_option, $exceptions)) return true; |
| 1091 |
$dblink="index.php?option=$menu_option"; |
$dblink="index.php?option=$menu_option"; |
| 1092 |
if ($Itemid) { |
if ($Itemid) { |
| 1093 |
$menu = $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1094 |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
| 1095 |
} |
} |
| 1096 |
if (!isset($access)) { |
if (!isset($access)) { |
| 1097 |
if ($task!='') $dblink .= "&task=$task"; |
if ($task!='') $dblink .= "&task=$task"; |
| 1098 |
$menu = $this->maxAccessLink($dblink); |
$menu =& $this->maxAccessLink($dblink); |
| 1099 |
if (isset($menu)) { |
if (isset($menu)) { |
| 1100 |
$access = $menu->access; |
$access = $menu->access; |
| 1101 |
mamboCore::set('Itemid', $menu->id); |
mamboCore::set('Itemid', $menu->id); |
| 1115 |
$temp = split("&task=view&id=", $mitem->link); |
$temp = split("&task=view&id=", $mitem->link); |
| 1116 |
if (isset($temp[1])) { |
if (isset($temp[1])) { |
| 1117 |
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'); |
| 1118 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 1119 |
$mitem->link .= '&Itemid='.$handler->getItemid($temp[1]); |
$mitem->link .= '&Itemid='.$handler->getItemid($temp[1]); |
| 1120 |
} |
} |
| 1121 |
break; |
break; |
| 1315 |
$my = mamboCore::is_set('currentUser') ? mamboCore::get('currentUser') : null; |
$my = mamboCore::is_set('currentUser') ? mamboCore::get('currentUser') : null; |
| 1316 |
$gid = $my ? $my->gid : 0; |
$gid = $my ? $my->gid : 0; |
| 1317 |
$this->_events = array(); |
$this->_events = array(); |
| 1318 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 1319 |
$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" |
| 1320 |
. "\nFROM #__mambots" |
. "\nFROM #__mambots" |
| 1321 |
. "\nWHERE published >= 1 AND access <= $gid" |
. "\nWHERE published >= 1 AND access <= $gid" |
| 1483 |
* @param database A database connector object |
* @param database A database connector object |
| 1484 |
*/ |
*/ |
| 1485 |
function mosUser( $dummy ) { |
function mosUser( $dummy ) { |
| 1486 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 1487 |
$this->mosDBTable( '#__users', 'id', $database ); |
$this->mosDBTable( '#__users', 'id', $database ); |
| 1488 |
} |
} |
| 1489 |
|
|
| 1491 |
* Fill a user object with information from the current session |
* Fill a user object with information from the current session |
| 1492 |
*/ |
*/ |
| 1493 |
function getSessionData() { |
function getSessionData() { |
| 1494 |
$session = mosSession::getCurrent(); |
$session =& mosSession::getCurrent(); |
| 1495 |
$this->id = intval( $session->userid ); |
$this->id = intval( $session->userid ); |
| 1496 |
$this->username = $session->username; |
$this->username = $session->username; |
| 1497 |
$this->usertype = $session->usertype; |
$this->usertype = $session->usertype; |
| 1658 |
*/ |
*/ |
| 1659 |
function logout() { |
function logout() { |
| 1660 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 1661 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 1662 |
$authenticator->logoutUser(); |
$authenticator->logoutUser(); |
| 1663 |
} |
} |
| 1664 |
/** |
/** |
| 1666 |
*/ |
*/ |
| 1667 |
function login ($username=null,$passwd=null) { |
function login ($username=null,$passwd=null) { |
| 1668 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 1669 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 1670 |
return $authenticator->loginUser($username, $passwd); |
return $authenticator->loginUser($username, $passwd); |
| 1671 |
} |
} |
| 1672 |
|
|
| 1986 |
*/ |
*/ |
| 1987 |
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) { |
| 1988 |
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'); |
| 1989 |
$handler = contentHandler::getInstance(); |
$handler =& contentHandler::getInstance(); |
| 1990 |
return $handler->getItemid($id, $typed, $link, $bs, $bc, $gbs); |
return $handler->getItemid($id, $typed, $link, $bs, $bc, $gbs); |
| 1991 |
} |
} |
| 1992 |
|
|
| 1993 |
function liveBookMark () { |
function liveBookMark () { |
| 1994 |
// support for Firefox Live Bookmarks ability for site syndication |
// support for Firefox Live Bookmarks ability for site syndication |
| 1995 |
$c_handler = mosComponentHandler::getInstance(); |
$c_handler =& mosComponentHandler::getInstance(); |
| 1996 |
$params = $c_handler->getParamsByName('Syndicate'); |
$params = $c_handler->getParamsByName('Syndicate'); |
| 1997 |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
| 1998 |
if ($live_bookmark) { |
if ($live_bookmark) { |
| 2023 |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 2024 |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc') ); |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc') ); |
| 2025 |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys') ); |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys') ); |
|
$this->addMetaTag( 'robots', 'index, follow' ); |
|
| 2026 |
echo $this->getHead(); |
echo $this->getHead(); |
| 2027 |
if (mamboCore::get('mosConfig_sef')) { |
if (mamboCore::get('mosConfig_sef')) { |
| 2028 |
echo "<base href=\"$mosConfig_live_site/\" />\r\n"; |
echo "<base href=\"$mosConfig_live_site/\" />\r\n"; |
| 2035 |
} |
} |
| 2036 |
$this->liveBookMark(); |
$this->liveBookMark(); |
| 2037 |
// outputs link tag for page |
// outputs link tag for page |
| 2038 |
$configuration = mamboCore::getMamboCore(); |
$configuration =& mamboCore::getMamboCore(); |
| 2039 |
?> |
?> |
| 2040 |
<link rel="shortcut icon" href="<?php echo $configuration->getFavIcon();?>" /> |
<link rel="shortcut icon" href="<?php echo $configuration->getFavIcon();?>" /> |
| 2041 |
<?php |
<?php |
| 2103 |
* @param database A database connector object |
* @param database A database connector object |
| 2104 |
*/ |
*/ |
| 2105 |
function mosSession( &$db ) { |
function mosSession( &$db ) { |
| 2106 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2107 |
$this->mosDBTable( '#__session', 'session_id', $database ); |
$this->mosDBTable( '#__session', 'session_id', $database ); |
| 2108 |
$this->time = time(); |
$this->time = time(); |
| 2109 |
} |
} |
| 2130 |
if ($usercookie) { |
if ($usercookie) { |
| 2131 |
// Remember me cookie exists. Login with usercookie info. |
// Remember me cookie exists. Login with usercookie info. |
| 2132 |
require_once (mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once (mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 2133 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 2134 |
$authenticator->authenticateUser ($message, $usercookie['username'], $usercookie['password'], null, $currentSession); |
$authenticator->authenticateUser ($message, $usercookie['username'], $usercookie['password'], null, $currentSession); |
| 2135 |
} |
} |
| 2136 |
} |
} |
| 2348 |
$image_path = $configuration->rootPath().'/images/stories'; |
$image_path = $configuration->rootPath().'/images/stories'; |
| 2349 |
$image_size = 100; |
$image_size = 100; |
| 2350 |
|
|
| 2351 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2352 |
$database->debug(mamboCore::get('mosConfig_debug')); |
$database->debug(mamboCore::get('mosConfig_debug')); |
| 2353 |
|
|
| 2354 |
if (!$adminside) { |
if (!$adminside) { |
| 2357 |
else require_once($configuration->rootPath().'/includes/sef.php'); |
else require_once($configuration->rootPath().'/includes/sef.php'); |
| 2358 |
$urlerror = 0; |
$urlerror = 0; |
| 2359 |
if (mamboCore::get('mosConfig_sef') AND $indextype == 3) { |
if (mamboCore::get('mosConfig_sef') AND $indextype == 3) { |
| 2360 |
$sef = mosSEF::getInstance(); |
$sef =& mosSEF::getInstance(); |
| 2361 |
$urlerror = $sef->sefRetrieval(mamboCore::get('mosConfig_register_globals')); |
$urlerror = $sef->sefRetrieval(mamboCore::get('mosConfig_register_globals')); |
| 2362 |
$indextype = 1; |
$indextype = 1; |
| 2363 |
} |
} |
| 2383 |
// Login will, if it succeeds, start a new session and set $my |
// Login will, if it succeeds, start a new session and set $my |
| 2384 |
if ($option == 'login') { |
if ($option == 'login') { |
| 2385 |
require_once($configuration->rootPath().'/includes/authenticator.php'); |
require_once($configuration->rootPath().'/includes/authenticator.php'); |
| 2386 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 2387 |
$my = $authenticator->loginAdmin($acl); |
$my = $authenticator->loginAdmin($acl); |
| 2388 |
} |
} |
| 2389 |
// If this is not login, we should already have a valid admin session |
// If this is not login, we should already have a valid admin session |
| 2414 |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
| 2415 |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
| 2416 |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
| 2417 |
$_MAMBOTS = mosMambotHandler::getInstance(); |
$_MAMBOTS =& mosMambotHandler::getInstance(); |
| 2418 |
// 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 |
| 2419 |
if ($no_html) { |
if ($no_html) { |
| 2420 |
if ($path = $mainframe->getPath( "admin" )) require $path; |
if ($path = $mainframe->getPath( "admin" )) require $path; |
| 2452 |
if ($option == 'login') $configuration->handleLogin(); |
if ($option == 'login') $configuration->handleLogin(); |
| 2453 |
elseif ($option == 'logout') $configuration->handleLogout(); |
elseif ($option == 'logout') $configuration->handleLogout(); |
| 2454 |
|
|
| 2455 |
$session = mosSession::getCurrent(); |
$session =& mosSession::getCurrent(); |
| 2456 |
$my =& new mosUser($database); |
$my =& new mosUser($database); |
| 2457 |
$my->getSessionData(); |
$my->getSessionData(); |
| 2458 |
mamboCore::set('currentUser',$my); |
mamboCore::set('currentUser',$my); |
| 2475 |
$mainframe->detect(); |
$mainframe->detect(); |
| 2476 |
|
|
| 2477 |
/** @global mosPlugin $_MAMBOTS */ |
/** @global mosPlugin $_MAMBOTS */ |
| 2478 |
$_MAMBOTS = mosMambotHandler::getInstance(); |
$_MAMBOTS =& mosMambotHandler::getInstance(); |
| 2479 |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
| 2480 |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
| 2481 |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
| 2487 |
$c_handler->startBuffer(); |
$c_handler->startBuffer(); |
| 2488 |
|
|
| 2489 |
if (!$urlerror AND $path = $mainframe->getPath( 'front' )) { |
if (!$urlerror AND $path = $mainframe->getPath( 'front' )) { |
| 2490 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 2491 |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
| 2492 |
$menuhandler->setPathway($Itemid); |
$menuhandler->setPathway($Itemid); |
| 2493 |
if ($ret) require_once( $path ); |
if ($ret) require_once( $path ); |
| 2510 |
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; |
| 2511 |
} else { |
} else { |
| 2512 |
require_once( 'templates/'. $cur_template .'/index.php' ); |
require_once( 'templates/'. $cur_template .'/index.php' ); |
| 2513 |
$mambothandler = mosMambotHandler::getInstance(); |
$mambothandler =& mosMambotHandler::getInstance(); |
| 2514 |
$mambothandler->loadBotGroup('system'); |
$mambothandler->loadBotGroup('system'); |
| 2515 |
$mambothandler->trigger('afterTemplate', array($configuration)); |
$mambothandler->trigger('afterTemplate', array($configuration)); |
| 2516 |
echo "<!-- ".time()." -->"; |
echo "<!-- ".time()." -->"; |