| 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 |
|
|
| 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(); |
| 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'])); |
$subdir = dirname($_SERVER['PHP_SELF']); |
| 140 |
|
if ($adminside) $subdir = substr($subdir, 0, strrpos($subdir, '/')); |
| 141 |
|
if (strlen($subdir) == 1) $subdir = ''; |
| 142 |
$this->subdirectory = str_replace('\\', '/', $subdir); |
$this->subdirectory = str_replace('\\', '/', $subdir); |
| 143 |
$scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); |
$scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); |
| 144 |
if (isset($_SERVER['HTTP_HOST'])) { |
if (isset($_SERVER['HTTP_HOST'])) { |
| 156 |
$afterscheme = '://'.$servername.$port.$this->subdirectory; |
$afterscheme = '://'.$servername.$port.$this->subdirectory; |
| 157 |
$this->mosConfig_live_site = $this->mosConfig_secure_site = $scheme.$afterscheme; |
$this->mosConfig_live_site = $this->mosConfig_secure_site = $scheme.$afterscheme; |
| 158 |
$this->mosConfig_unsecure_site = 'http'.$afterscheme; |
$this->mosConfig_unsecure_site = 'http'.$afterscheme; |
|
// $this->mosConfig_live_site = 'http://'.$_SERVER['SERVER_NAME'].$this->subdirectory; |
|
| 159 |
$this->mosConfig_absolute_path = $this->rootPath; |
$this->mosConfig_absolute_path = $this->rootPath; |
| 160 |
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); |
| 161 |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
| 173 |
} |
} |
| 174 |
|
|
| 175 |
function offlineCheck (&$user, &$database) { |
function offlineCheck (&$user, &$database) { |
| 176 |
if ($this->mosConfig_offline) { |
if ($this->mosConfig_offline OR file_exists($this->rootPath.'/installation/index.php')) { |
| 177 |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
| 178 |
session_name(md5($this->mosConfig_live_site)); |
session_name(md5($this->mosConfig_live_site)); |
| 179 |
session_start(); |
session_start(); |
| 184 |
} |
} |
| 185 |
|
|
| 186 |
function fixLanguage () { |
function fixLanguage () { |
|
|
|
|
|
|
|
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/error.php'); |
|
| 187 |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
| 188 |
|
|
|
|
|
| 189 |
########## DEPRECATED ############ |
########## DEPRECATED ############ |
| 190 |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
| 191 |
else $this->set('mosConfig_lang', 'english'); |
else $this->set('mosConfig_lang', 'english'); |
| 193 |
if (file_exists($language_file)) require_once ($language_file); |
if (file_exists($language_file)) require_once ($language_file); |
| 194 |
################################### |
################################### |
| 195 |
|
|
|
#set_error_handler('error_handler'); |
|
| 196 |
$lang = $this->mosConfig_lang; |
$lang = $this->mosConfig_lang; |
|
|
|
|
|
|
| 197 |
$langfile = $this->rootPath.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR.$lang.'.xml'; |
$langfile = $this->rootPath.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR.$lang.'.xml'; |
|
/*$this->language[$this->mosConfig_language] = array( |
|
|
'locale' => 'pt, pt.utf-8', |
|
|
'encoding' => 'utf-8', |
|
|
'direction' => 'rtl', |
|
|
'dateformat' => '%A, %d %B %Y', |
|
|
'offset' => '+00:00' |
|
|
); |
|
|
*/ |
|
| 198 |
$p = xml_parser_create(); |
$p = xml_parser_create(); |
| 199 |
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); |
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); |
| 200 |
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); |
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); |
| 207 |
$this->language[$name] = $value['attributes']['default']; |
$this->language[$name] = $value['attributes']['default']; |
| 208 |
} |
} |
| 209 |
} |
} |
|
|
|
|
|
|
| 210 |
if (!defined('_ISO')) DEFINE('_ISO','charset='.$this->language['encoding']); |
if (!defined('_ISO')) DEFINE('_ISO','charset='.$this->language['encoding']); |
| 211 |
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $this->language['dateformat']); //Uses PHP's strftime Command Format |
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $this->language['dateformat']); //Uses PHP's strftime Command Format |
| 212 |
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $this->language['dateformat']." %H:%M"); |
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $this->language['dateformat']." %H:%M"); |
| 213 |
|
|
|
//header('Content-Type: text/html; charset=utf-8'); |
|
| 214 |
$gettext =& phpgettext(); |
$gettext =& phpgettext(); |
| 215 |
$gettext->debug = 0; |
$gettext->debug = $this->mosConfig_locale_debug; |
| 216 |
$gettext->has_gettext = 0; |
$gettext->has_gettext = $this->mosConfig_locale_use_gettext; |
| 217 |
$gettext->setlocale($this->mosConfig_lang, $this->mosConfig_locale); |
$gettext->setlocale($this->mosConfig_lang, $this->mosConfig_locale); |
|
/*dump($gettext->getlocale()); |
|
|
$gettext->bindtextdomain('administrator', $lang_path);/*dump($gettext->getlocale()); |
|
|
dump(setlocale(LC_CTYPE, ''));; |
|
|
|
|
|
|
|
|
dump(array($gettext, $this));*/ |
|
|
|
|
| 218 |
} |
} |
| 219 |
|
|
| 220 |
function handleGlobals () { |
function handleGlobals () { |
| 413 |
|
|
| 414 |
} |
} |
| 415 |
|
|
| 416 |
|
/* This is the new error handler to store errors in the database |
| 417 |
|
class mosErrorHandler { |
| 418 |
|
var $types = array ( |
| 419 |
|
E_STRICT => 'Strict check', |
| 420 |
|
E_USER_WARNING => 'User Warning', |
| 421 |
|
E_USER_NOTICE => 'User Notice', |
| 422 |
|
E_WARNING => 'Warning', |
| 423 |
|
E_NOTICE => 'Notice', |
| 424 |
|
E_CORE_WARNING => 'Core Warning', |
| 425 |
|
E_COMPILE_WARNING => 'Compile Warning', |
| 426 |
|
E_USER_ERROR => 'User Error', |
| 427 |
|
E_ERROR => 'Error', |
| 428 |
|
E_PARSE => 'Parse error', |
| 429 |
|
E_CORE_ERROR => 'Core Error', |
| 430 |
|
E_COMPILE_ERROR => 'Compile Error' |
| 431 |
|
); |
| 432 |
|
|
| 433 |
|
function mosErrorHandler () { |
| 434 |
|
set_error_handler(array(&$this, 'handler')); |
| 435 |
|
} |
| 436 |
|
|
| 437 |
|
function handler ($errno, $errstr, $errfile, $errline, $errcontext) { |
| 438 |
|
if ($errno = E_STRICT) return; |
| 439 |
|
$string = $this->types[$errno].': '.$errstr.' in '.$errfile.' at '.$errline; |
| 440 |
|
$database = mamboDatabase::getInstance(); |
| 441 |
|
if (eregi('^(sql)$', $errstr)) { |
| 442 |
|
$extra = $database->getErrorMsg(); |
| 443 |
|
} |
| 444 |
|
if (function_exists('debug_backtrace')) { |
| 445 |
|
foreach(debug_backtrace() as $back) { |
| 446 |
|
if (@$back['file']) { |
| 447 |
|
$extra .= "\n".$back['file'].':'.$back['line']; |
| 448 |
|
} |
| 449 |
|
} |
| 450 |
|
} |
| 451 |
|
$database->setQuery("DELETE FROM #__errors WHERE file=$errfile AND line=$errline AND number=$errno"); |
| 452 |
|
$database->query(); |
| 453 |
|
$database->setQuery("INSERT INTO #__errors VALUES (0, $errno, '$errfile', $errline, '$string', '$extra')"); |
| 454 |
|
$database->query(); |
| 455 |
|
} |
| 456 |
|
} |
| 457 |
|
*/ |
| 458 |
|
|
| 459 |
if (!isset($adminside)) $adminside = 0; |
if (!isset($adminside)) $adminside = 0; |
| 460 |
if (!isset($indextype)) $indextype = 1; |
if (!isset($indextype)) $indextype = 1; |
| 461 |
|
|
| 463 |
$configuration->handleGlobals(); |
$configuration->handleGlobals(); |
| 464 |
|
|
| 465 |
require_once ($configuration->rootPath().'/includes/database.php'); |
require_once ($configuration->rootPath().'/includes/database.php'); |
| 466 |
|
//new mosErrorHandler(); |
| 467 |
|
|
| 468 |
/** |
/** |
| 469 |
* Mambo basic error object |
* Mambo basic error object |
| 673 |
/** |
/** |
| 674 |
* @param database A database connector object |
* @param database A database connector object |
| 675 |
*/ |
*/ |
| 676 |
function mosMenu( $dummy ) { |
function mosMenu() { |
| 677 |
$db =& mamboDatabase::getInstance(); |
$db =& mamboDatabase::getInstance(); |
| 678 |
$this->mosDBTable( '#__menu', 'id', $db ); |
$this->mosDBTable( '#__menu', 'id', $db ); |
| 679 |
} |
} |
| 732 |
} |
} |
| 733 |
|
|
| 734 |
function createDirectory ($dir) { |
function createDirectory ($dir) { |
| 735 |
|
if (file_exists($dir)) { |
| 736 |
if (is_dir($dir)) return true; |
if (is_dir($dir)) return true; |
| 737 |
|
else return false; |
| 738 |
|
} |
| 739 |
list($upDirectory, $count) = $this->containingDirectory($dir); |
list($upDirectory, $count) = $this->containingDirectory($dir); |
| 740 |
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; |
| 741 |
|
if (!is_dir($upDirectory)) return false; |
| 742 |
$dirperms = mamboCore::get('mosConfig_dirperms'); |
$dirperms = mamboCore::get('mosConfig_dirperms'); |
| 743 |
if ($dirperms) { |
if ($dirperms) { |
| 744 |
$origmask = @umask(0); |
$origmask = @umask(0); |
| 745 |
$mode = octdec($dirperms); |
$mode = octdec($dirperms); |
| 746 |
} |
} |
| 747 |
else $mode = 0777; |
else $mode = 0755; |
| 748 |
if (!@mkdir($dir, $mode )) $result = false; |
if (!@mkdir($dir, $mode )) $result = false; |
| 749 |
else { |
else { |
| 750 |
$result = true; |
$result = true; |
| 836 |
$ret = true; |
$ret = true; |
| 837 |
if (is_dir($path)) { |
if (is_dir($path)) { |
| 838 |
$topdir =& new mosDirectory($path); |
$topdir =& new mosDirectory($path); |
| 839 |
$files =& $topdir->listFiles ('', 'file', true); |
$files =& $topdir->listFiles ('', 'file', true, true); |
| 840 |
$dirs =& $topdir->listFiles ('', 'dir', true); |
$dirs =& $topdir->listFiles ('', 'dir', true, true); |
| 841 |
} |
} |
| 842 |
else { |
else { |
| 843 |
$files = array($path); |
$files = array($path); |
| 991 |
function &getMenuByID ($id) { |
function &getMenuByID ($id) { |
| 992 |
if (isset($this->_idlinks[$id])) { |
if (isset($this->_idlinks[$id])) { |
| 993 |
$key = $this->_idlinks[$id]; |
$key = $this->_idlinks[$id]; |
| 994 |
return $this->_menus[$key]; |
$result = $this->_menus[$key]; |
| 995 |
} |
} |
| 996 |
$result = null; |
else $result = null; |
| 997 |
return $result; |
return $result; |
| 998 |
} |
} |
| 999 |
|
|
| 1100 |
$menu = $this->_menus[$key]; |
$menu = $this->_menus[$key]; |
| 1101 |
if ($menutype AND $mtype != $menutype) continue; |
if ($menutype AND $mtype != $menutype) continue; |
| 1102 |
if ($Itemid AND $Itemid != $menu->id) continue; |
if ($Itemid AND $Itemid != $menu->id) continue; |
| 1103 |
if ($maxaccess AND $menu->access > $maxaccess) continue; |
if ($menu->access > $maxaccess) continue; |
| 1104 |
if ($noparent AND $parent != 0) continue; |
if ($noparent AND $parent != 0) continue; |
| 1105 |
$result[] = $this->_menus[$key]; |
$result[] = $this->_menus[$key]; |
| 1106 |
} |
} |
| 1382 |
* @param int the subscript for use in the main array of mambots |
* @param int the subscript for use in the main array of mambots |
| 1383 |
*/ |
*/ |
| 1384 |
function _botRegister (&$botObject, &$selected, $i) { |
function _botRegister (&$botObject, &$selected, $i) { |
| 1385 |
$function = array(&$newbot, 'perform'); |
$function = array(&$botObject, 'perform'); |
| 1386 |
if (!is_callable($function)) return; |
if (!is_callable($function)) return; |
| 1387 |
if (is_array($selected)) foreach ($selected as $select) $this->_botRegister($botObject, $select); |
if (is_array($selected)) foreach ($selected as $select) $this->_botRegister($botObject, $select); |
| 1388 |
$this->_events[$selected][] = array ($function, $i); |
$this->_events[$selected][] = array ($function, $i); |
| 1540 |
/** |
/** |
| 1541 |
* @param database A database connector object |
* @param database A database connector object |
| 1542 |
*/ |
*/ |
| 1543 |
function mosUser( $dummy ) { |
function mosUser() { |
| 1544 |
$database =& mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 1545 |
$this->mosDBTable( '#__users', 'id', $database ); |
$this->mosDBTable( '#__users', 'id', $database ); |
| 1546 |
} |
} |
| 1612 |
} |
} |
| 1613 |
|
|
| 1614 |
function delete($oid=null) { |
function delete($oid=null) { |
| 1615 |
|
global $acl; |
| 1616 |
|
$k = $this->_tbl_key; |
| 1617 |
if ($oid) $this->id = intval( $oid ); |
if ($oid) $this->id = intval( $oid ); |
| 1618 |
$aro_id = $acl->get_object_id( 'users', $this->$k, 'ARO' ); |
$aro_id = $acl->get_object_id( 'users', $this->$k, 'ARO' ); |
| 1619 |
$acl->del_object( $aro_id, 'ARO', true ); |
$acl->del_object( $aro_id, 'ARO', true ); |
| 2162 |
/** |
/** |
| 2163 |
* @param database A database connector object |
* @param database A database connector object |
| 2164 |
*/ |
*/ |
| 2165 |
function mosSession( &$db ) { |
function mosSession() { |
| 2166 |
$database =& mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2167 |
$this->mosDBTable( '#__session', 'session_id', $database ); |
$this->mosDBTable( '#__session', 'session_id', $database ); |
| 2168 |
$this->time = time(); |
$this->time = time(); |
| 2171 |
function &getCurrent () { |
function &getCurrent () { |
| 2172 |
static $currentSession; |
static $currentSession; |
| 2173 |
if (!is_object($currentSession)) { |
if (!is_object($currentSession)) { |
| 2174 |
$currentSession = new mosSession($dummy); |
$currentSession = new mosSession(); |
| 2175 |
$currentSession->purge(intval(mamboCore::get('mosConfig_lifetime'))); |
mosSession::purge(); |
| 2176 |
$sessionCookieName = md5('site'.mamboCore::get('mosConfig_live_site')); |
$sessionCookieName = md5('site'.mamboCore::get('mosConfig_live_site')); |
| 2177 |
$sessioncookie = mosGetParam($_COOKIE, $sessionCookieName, null); |
$sessioncookie = mosGetParam($_COOKIE, $sessionCookieName, null); |
| 2178 |
$usercookie = mosGetParam($_COOKIE, 'usercookie', null); |
$usercookie = mosGetParam($_COOKIE, 'usercookie', null); |
| 2228 |
if ($randnum != "") { |
if ($randnum != "") { |
| 2229 |
$cryptrandnum = md5( $randnum ); |
$cryptrandnum = md5( $randnum ); |
| 2230 |
$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')" ); |
| 2231 |
if(!$result = $this->_db->query()) { |
if(!($result = $this->_db->query())) { |
| 2232 |
die( $this->_db->stderr( true )); |
die( $this->_db->stderr( true )); |
| 2233 |
// todo: handle gracefully |
// todo: handle gracefully |
| 2234 |
} |
} |
| 2245 |
return $this->_session_cookie; |
return $this->_session_cookie; |
| 2246 |
} |
} |
| 2247 |
|
|
| 2248 |
function purge( $inc=1800 ) { |
function purge () { |
| 2249 |
$past = time() - $inc; |
$past = time() - intval(mamboCore::get('mosConfig_lifetime')); |
| 2250 |
$query = "DELETE FROM $this->_tbl" |
$adminpast = time() - 3600; |
| 2251 |
. "\nWHERE (time < $past)"; |
$database = mamboDatabase::getInstance(); |
| 2252 |
$this->_db->setQuery($query); |
$database->setQuery("DELETE FROM #__session WHERE (time<$past AND guest>=0) OR (time<$adminpast AND guest<0)"); |
| 2253 |
|
return $database->query(); |
|
return $this->_db->query(); |
|
| 2254 |
} |
} |
| 2255 |
|
|
| 2256 |
} |
} |
| 2257 |
|
|
| 2258 |
/** |
/** |
| 2477 |
} |
} |
| 2478 |
// 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 |
| 2479 |
else { |
else { |
| 2480 |
|
ini_set('session.use_trans_sid', 0); |
| 2481 |
|
ini_set('session.use_cookies', 1); |
| 2482 |
|
ini_set('session.use_only_cookies', 1); |
| 2483 |
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
| 2484 |
session_start(); |
session_start(); |
| 2485 |
// Handle the remaining special options |
// Handle the remaining special options |
| 2507 |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
require_once( $configuration->rootPath().'/administrator/includes/mosAdminMenus.php'); |
| 2508 |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
require_once($configuration->rootPath().'/administrator/includes/admin.php'); |
| 2509 |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
| 2510 |
|
require_once( $configuration->rootPath() . '/components/com_content/content.class.php' ); |
| 2511 |
$_MAMBOTS =& mosMambotHandler::getInstance(); |
$_MAMBOTS =& mosMambotHandler::getInstance(); |
| 2512 |
|
|
| 2513 |
|
|
| 2524 |
$configuration->doGzip(); |
$configuration->doGzip(); |
| 2525 |
} |
} |
| 2526 |
else { |
else { |
| 2527 |
if (!$popup) { |
if (!isset($popup)) { |
| 2528 |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
| 2529 |
if ($pop) require_once($configuration->rootPath()."/administrator/popups/$pop"); |
if ($pop) require_once($configuration->rootPath()."/administrator/popups/$pop"); |
| 2530 |
else require_once($configuration->rootPath()."/administrator/popups/index3pop.php"); |
else require_once($configuration->rootPath()."/administrator/popups/index3pop.php"); |
| 2584 |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
require_once( $configuration->rootPath().'/editor/editor.php' ); |
| 2585 |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl.class.php' ); |
| 2586 |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
require_once( $configuration->rootPath() . '/includes/gacl_api.class.php' ); |
| 2587 |
|
require_once( $configuration->rootPath() . '/components/com_content/content.class.php' ); |
| 2588 |
$acl = new gacl_api(); |
$acl = new gacl_api(); |
| 2589 |
|
|
|
|
|
| 2590 |
/** Get the component handler */ |
/** Get the component handler */ |
| 2591 |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
require_once( $configuration->rootPath() . '/includes/cmtclasses.php' ); |
| 2592 |
$c_handler =& mosComponentHandler::getInstance(); |
$c_handler =& mosComponentHandler::getInstance(); |
| 2598 |
$menuhandler->setPathway($Itemid); |
$menuhandler->setPathway($Itemid); |
| 2599 |
if ($ret) { |
if ($ret) { |
| 2600 |
$gettext->textdomain(substr($option, 4)); // get the component lang file |
$gettext->textdomain(substr($option, 4)); // get the component lang file |
| 2601 |
require_once( $path ); |
require ($path); |
| 2602 |
$gettext->textdomain($frontdomain); |
$gettext->textdomain($frontdomain); |
| 2603 |
} |
} |
| 2604 |
else mosNotAuth(); |
else mosNotAuth(); |
| 2614 |
$configuration->initGzip(); |
$configuration->initGzip(); |
| 2615 |
|
|
| 2616 |
$configuration->standardHeaders(); |
$configuration->standardHeaders(); |
| 2617 |
if ($indextype == 1) { |
if (mosGetParam($_GET, 'syndstyle', '') == 'yes') mosMainBody(); |
| 2618 |
|
elseif ($indextype == 1) { |
| 2619 |
// loads template file |
// loads template file |
| 2620 |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
| 2621 |
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; |