| 31 |
include_once( 'globals.php' ); |
include_once( 'globals.php' ); |
| 32 |
require_once( 'configuration.php' ); |
require_once( 'configuration.php' ); |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
// loads english language file by default |
| 36 |
|
if ( $mosConfig_lang == '' ) { |
| 37 |
|
$mosConfig_lang = 'english'; |
| 38 |
|
} |
| 39 |
|
#include_once ( 'language/'.$mosConfig_lang.'.php' ); |
| 40 |
|
DEFINE('_ISO','charset=iso-8859-1'); |
| 41 |
|
DEFINE('_DATE_FORMAT_LC',"%A, %d %B %Y"); //Uses PHP's strftime Command Format |
| 42 |
|
DEFINE('_DATE_FORMAT_LC2',"%A, %d %B %Y %H:%M"); |
| 43 |
|
|
| 44 |
|
// include phpgettext library |
| 45 |
|
require_once( 'includes/phpgettext/phpgettext.class.php' ); |
| 46 |
|
$domain = 'frontend'; |
| 47 |
|
$textdomain = $mosConfig_absolute_path.'language'; |
| 48 |
|
$charset = 'utf-8'; |
| 49 |
|
$phpgettext =& phpgettext(); |
| 50 |
|
$phpgettext->setlocale($mosConfig_lang); |
| 51 |
|
$phpgettext->bindtextdomain($domain, $textdomain); |
| 52 |
|
$phpgettext->bind_textdomain_codeset($domain, $charset); |
| 53 |
|
$phpgettext->textdomain($domain); |
| 54 |
|
|
| 55 |
|
|
| 56 |
// displays offline page |
// displays offline page |
| 57 |
if ( $mosConfig_offline == 1 ){ |
if ( $mosConfig_offline == 1 ){ |
| 58 |
include( 'offline.php' ); |
include( 'offline.php' ); |
| 146 |
$option = 'com_search'; |
$option = 'com_search'; |
| 147 |
} |
} |
| 148 |
|
|
| 149 |
// loads english language file by default |
|
| 150 |
if ( $mosConfig_lang == '' ) { |
|
|
$mosConfig_lang = 'english'; |
|
|
} |
|
|
include_once ( 'language/'.$mosConfig_lang.'.php' ); |
|
| 151 |
|
|
| 152 |
// frontend login & logout controls |
// frontend login & logout controls |
| 153 |
$return = mosGetParam( $_REQUEST, 'return', NULL ); |
$return = mosGetParam( $_REQUEST, 'return', NULL ); |
| 160 |
?> |
?> |
| 161 |
<script> |
<script> |
| 162 |
<!--// |
<!--// |
| 163 |
alert( "<?php echo _LOGIN_SUCCESS; ?>" ); |
alert( "<?php echo T_('You have Logged In succesfully'); ?>" ); |
| 164 |
//--> |
//--> |
| 165 |
</script> |
</script> |
| 166 |
<?php |
<?php |
| 180 |
?> |
?> |
| 181 |
<script> |
<script> |
| 182 |
<!--// |
<!--// |
| 183 |
alert( "<?php echo _LOGOUT_SUCCESS; ?>" ); |
alert( "<?php echo T_('You have Logged Out successfully'); ?>" ); |
| 184 |
//--> |
//--> |
| 185 |
</script> |
</script> |
| 186 |
<?php |
<?php |
| 216 |
$task = mosGetParam( $_REQUEST, 'task', '' ); |
$task = mosGetParam( $_REQUEST, 'task', '' ); |
| 217 |
$ret = mosMenuCheck( $Itemid, $option, $task, $gid ); |
$ret = mosMenuCheck( $Itemid, $option, $task, $gid ); |
| 218 |
if ($ret) { |
if ($ret) { |
| 219 |
|
$phpgettext->textdomain($option); |
| 220 |
require_once( $path ); |
require_once( $path ); |
| 221 |
} else { |
} else { |
| 222 |
mosNotAuth(); |
mosNotAuth(); |
| 223 |
} |
} |
| 224 |
} else { |
} else { |
| 225 |
echo _NOT_EXIST; |
echo T_('The page you are trying to access does not exist. Please select a page from the main menu.'); |
| 226 |
} |
} |
| 227 |
$_MOS_OPTION['buffer'] = ob_get_contents(); |
$_MOS_OPTION['buffer'] = ob_get_contents(); |
| 228 |
ob_end_clean(); |
ob_end_clean(); |
| 237 |
|
|
| 238 |
// loads template file |
// loads template file |
| 239 |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) { |
| 240 |
echo _TEMPLATE_WARN . $cur_template; |
|
| 241 |
|
echo "<font color=\"red\"><b>" . sprintf(T_('Template File Not Found! Looking for template: %s'), $cur_template) ."</b></font>"; |
| 242 |
} else { |
} else { |
| 243 |
require_once( 'templates/'. $cur_template .'/index.php' ); |
require_once( 'templates/'. $cur_template .'/index.php' ); |
| 244 |
echo "<!-- ".time()." -->"; |
echo "<!-- ".time()." -->"; |
| 246 |
|
|
| 247 |
// displays queries performed for page |
// displays queries performed for page |
| 248 |
if ($mosConfig_debug) { |
if ($mosConfig_debug) { |
| 249 |
echo $database->_ticker . ' queries executed'; |
printf(Tn_('%d query executed', '%d queries executed', $database->_ticker), $database->_ticker); |
| 250 |
echo '<pre>'; |
echo '<pre>'; |
| 251 |
foreach ($database->_log as $k=>$sql) { |
foreach ($database->_log as $k=>$sql) { |
| 252 |
echo $k+1 . "\n" . $sql . '<hr />'; |
echo $k+1 . "\n" . $sql . '<hr />'; |
| 253 |
} |
} |
| 254 |
|
echo '</pre>'; |
| 255 |
} |
} |
| 256 |
|
|
| 257 |
doGzip(); |
doGzip(); |