| 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 = 0; |
$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(); |