| 131 |
} |
} |
| 132 |
fclose($f); |
fclose($f); |
| 133 |
eval($code); |
eval($code); |
| 134 |
$subdir = dirname($_SERVER['PHP_SELF']); |
$subdir = substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT'])); |
| 135 |
if ($subdir == '/' OR $subdir == '\\') $subdir = ''; |
$subdir = str_replace('\\', '/', $subdir); |
| 136 |
$this->mosConfig_live_site = 'http://'.$_SERVER['SERVER_NAME'].$subdir; |
$this->mosConfig_live_site = 'http://'.$_SERVER['SERVER_NAME'].$subdir; |
|
//$this->mosConfig_live_site = str_replace('/administrator', '', 'http://'.$_SERVER['HTTP_HOST'].'/'.$subdir); |
|
|
|
|
| 137 |
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); |
| 138 |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
foreach ($matches[1] as $match) $GLOBALS[$match] = $this->$match; |
| 139 |
if (!isset($this->mosConfig_register_globals)) { |
if (!isset($this->mosConfig_register_globals)) { |
| 169 |
DEFINE('_DATE_FORMAT_LC',"%A, %d %B %Y"); //Uses PHP's strftime Command Format |
DEFINE('_DATE_FORMAT_LC',"%A, %d %B %Y"); //Uses PHP's strftime Command Format |
| 170 |
DEFINE('_DATE_FORMAT_LC2',"%A, %d %B %Y %H:%M"); |
DEFINE('_DATE_FORMAT_LC2',"%A, %d %B %Y %H:%M"); |
| 171 |
|
|
|
// the name of the xml definition file |
|
|
if (!isset($this->mosConfig_lang)) { |
|
|
$this->set('mosConfig_lang', 'english'); |
|
|
} |
|
|
// the name of the language folder |
|
|
if (!isset($this->mosConfig_locale)) { |
|
|
$this->set('mosConfig_locale', 'en'); |
|
|
} |
|
| 172 |
|
|
| 173 |
/*/ the current character set |
/*/ the current character set |
| 174 |
if (!isset($this->mosConfig_charset)) { |
if (!isset($this->mosConfig_charset)) { |
| 175 |
$this->set('mosConfig_charset', 'iso-8859-1');/*'utf-8'* / |
$this->set('mosConfig_charset', 'iso-8859-1');/*'utf-8'* / |
| 176 |
} |
} |
| 177 |
|
|
|
|
|
|
|
|
| 178 |
/**/ |
/**/ |
| 179 |
$language_file = "$this->mosConfig_absolute_path/language/$this->mosConfig_lang.php"; |
$language_file = "$this->mosConfig_absolute_path/language/$this->mosConfig_lang.php"; |
| 180 |
if (file_exists($language_file)) require_once ($language_file); |
if (file_exists($language_file)) require_once ($language_file); |
| 181 |
|
error_reporting(0); |
| 182 |
//set_error_handler('error_handler'); |
set_error_handler('error_handler'); |
| 183 |
$domain = 'administrator'; |
$domain = $this->mosConfig_lang; |
| 184 |
$textdomain = $this->mosConfig_absolute_path.'/languages'; |
$textdomain = $this->mosConfig_absolute_path.'/language'; |
| 185 |
$gettext =& phpgettext(); |
$gettext =& phpgettext(); |
| 186 |
$gettext->debug = 1; |
$gettext->debug = 1; |
| 187 |
$gettext->has_gettext = false; |
$gettext->has_gettext = 0; |
| 188 |
$gettext->setlocale($this->mosConfig_locale);; |
$gettext->setlocale($this->mosConfig_lang);; |
| 189 |
$gettext->bindtextdomain($domain, $textdomain); |
$gettext->bindtextdomain($domain, $textdomain); |
| 190 |
$gettext->bind_textdomain_codeset($domain, 'utf-8'); |
$gettext->bind_textdomain_codeset($domain, 'utf-8'); |
| 191 |
$gettext->textdomain($domain); |
$gettext->textdomain($domain); |
| 2298 |
} |
} |
| 2299 |
else { |
else { |
| 2300 |
header ('HTTP/1.1 404 Not Found'); |
header ('HTTP/1.1 404 Not Found'); |
| 2301 |
$mainframe->setPageTitle('404 Error - page not found'); |
$mainframe->setPageTitle(T_('404 Error - page not found')); |
| 2302 |
include ($configuration->rootPath().'/page404.php'); |
include ($configuration->rootPath().'/page404.php'); |
| 2303 |
} |
} |
| 2304 |
|
|
| 2310 |
if ($indextype == 1) { |
if ($indextype == 1) { |
| 2311 |
// loads template file |
// loads template file |
| 2312 |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
| 2313 |
echo _TEMPLATE_WARN . $cur_template; |
echo '<font color=\"red\"><b>'.T_('Template File Not Found! Looking for template').'</b></font>'.$cur_template; |
| 2314 |
} else { |
} else { |
| 2315 |
require_once( 'templates/'. $cur_template .'/index.php' ); |
require_once( 'templates/'. $cur_template .'/index.php' ); |
| 2316 |
$mambothandler = mosMambotHandler::getInstance(); |
$mambothandler = mosMambotHandler::getInstance(); |