File size: 1.03Kb
<?php
// by Mike O. (mides), coolcms.mobi
require_once 'system/sys.php';
require_once 'system/cache.php';
require_once 'system/header.php';
$file = 'inc/templates/'.$act.'.tpl';
if (file_exists($file) and $act !== 'index') {
echo file_get_contents($file).'<br /><i>'.$lang['updated'].': '.date('d.m.y, H:i', filemtime($file)).'</i>';
nav_main();
} else {
if (isset($u['id'])) {
tp($lang['welcome'].' '.$u['username']);
} else {
tp($lang['welcome'].' '.$lang['guest'].'');
}
include_once 'inc/templates/index.tpl';
$ad_r = mysql_query("SELECT * FROM `ad` WHERE `type` = 2 ORDER BY `id`");
while ($ad = mysql_fetch_assoc($ad_r)) {
echo '<a href="'.$ad['link'].'">'.$ad['name'].'</a><br />';
}
mysql_query("DELETE FROM `ad` WHERE `time` < '".TIME."'");
echo '<div class="navigation">© <a href="http://coolcms.mobi">coolcms</a><br /><a href="online.php">'.$lang['online'].' ('.stats_online().')</a></div>';
}
require_once 'system/tail.php';
?>