|
<?php
//-----Если не index.php-----//
echo '<table cols="2" width="100%" cellpadding="0" cellspacing="0" style="font-size:11px;"><tr>';
if ($_SERVER['PHP_SELF'] != '/index.php') {
echo '<table cols="2" width="100%" cellpadding="0" cellspacing="0" style="font-size:11px;"><tr>
<td class="men" width="50%"><a href="/" class="user1">На главную</a></td>
<td class="men" width="50%"><a href="'.$HOME.'/online.php" class="user2">В сети: '.mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `viz` > '".(time()-360)."'"),0).'</a></td>';
echo '</tr></table>';
}
$rek = mysql_result(mysql_query("SELECT COUNT(id) FROM `ads` WHERE `time_srok` > '".time()."' and `tip` = '1'"),0);
$sql_rek = mysql_query("SELECT * FROM `ads` WHERE `time_srok` > '".time()."' and `tip` = '1' ORDER BY rand() ");
##Блок рекламы
if($rek != 0) {
echo '<div class="podmenu">';
while($sql = mysql_fetch_assoc($sql_rek)){
echo '<a href="'.$sql['url'].'"><img src="'.$HOME.'/images/rr.png" alt="*" title="Реклама" /> ';
echo '<font color="'.$sql['color'].'">';
if($sql['b'] == 1) echo '<b>';
if($sql['i'] == 1) echo '<i>';
echo $sql['name'];
if($sql['i'] == 1) echo '</i>';
if($sql['b'] == 1) echo '</b>';
echo '</font>';
echo '</a>';
if($rek > 1) echo '</div>';
}
}
/* Переменная вывода настроек сайта */
$sql = mysql_fetch_assoc(mysql_query("SELECT * FROM `settings` WHERE `id` = '1'"));
//-----Выводим копирайт-----//
echo '<div class="foot"><img src="/img/footcopy.png"/>';
?>