File size: 1.41Kb
<?php
// by Mike O. (mides), coolcms.org
require_once 'includes/sys.php';
require_once 'includes/cache.php';
require_once 'includes/header.php';
/* $today00 = date('d-m-Y');
$timest = strtotime($today00);
$time_yest = $timest - 86400;
echo date('d.m.y, H:i', $time_yest);
*/
/*if($_SERVER['HTTP_X_FORWARDED_FOR']){
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if($_SERVER['HTTP_CLIENT_IP']){
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
else if($_SERVER['REMOTE_ADDR']){
$ip=$_SERVER['REMOTE_ADDR'];
}
*/
$file = 'local/main/'.$act.'.tpl';
if (file_exists($file) and $act !== 'index') {
echo file_get_contents($file).'<br />';
echo '</div>';
nav_main();
} else {
if (isset($u['id'])) {
tp($lang['welcome'].' '.$u['username']);
} else {
tp($lang['welcome'].' '.$lang['guest'].'');
}
include_once 'local/main/index.tpl';
$ad_r = mysql_query("SELECT * FROM `ad` WHERE `type` = 2 ORDER BY `id`");
if (mysql_num_rows($ad_r)) {
echo '<div class="body">';
while ($ad = mysql_fetch_assoc($ad_r)) {
echo '<a href="'.$ad['link'].'">'.$ad['name'].'</a><br />';
}
echo '</div>';
}
echo '<div class="tail"><a href="other/online.php">'.$lang['online'].': '.stats_online().'</a> <a href="http://coolcms.org" style="float: right; margin-top: -8px;">© coolcms</a></div>';
}
require_once 'includes/tail.php';
?>