File size: 1.56Kb
<?php
$onu = mysql_result(mysql_query("SELECT COUNT(*) FROM `online_user`"), 0 );
$ont = mysql_result(mysql_query("SELECT COUNT(*) FROM `online_tel`"), 0 );
$u = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` "), 0 );
$un = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `date_reg`> NOW() - INTERVAL '1' DAY"), 0 );
if($_SERVER['SCRIPT_NAME'] != '/index.php'){
$sqlrn = mysql_query("SELECT * FROM `rek` WHERE `mesto`=2 AND `tip`=2");
while ($srn = mysql_fetch_array($sqlrn)){
echo '<div class="rkn"><a href="http://'.$srn['link'].'">'.$srn['name'].'</a></div>';
}
}else{
$sqlrn = mysql_query("SELECT * FROM `rek` WHERE `mesto`=2 AND `tip`=1");
while ($srn = mysql_fetch_array($sqlrn)){
echo '<div class="rkn"><a href="http://'.$srn['link'].'">'.$srn['name'].'</a></div>';
}
}
echo '<div class="end">Пользователей: (<a href="../user.php">'.$u.'/+'.$un.'</a>)</div>';
echo '<div class="end">OnLine: ('.$onu.'/'.$ont.')</div>';
if($_SERVER['SCRIPT_NAME'] != '/index.php'){
$sqlrb = mysql_query("SELECT * FROM `rek` WHERE `mesto`=3 AND `tip`=2");
while ($srb = mysql_fetch_array($sqlrb)){
echo '<div class="rkb"><a href="http://'.$srb['link'].'"><img src="http://'.$srb['img'].'" alt="'.$srb['name'].'"/></a></div>';
}
}else{
$sqlrb = mysql_query("SELECT * FROM `rek` WHERE `mesto`=3 AND `tip`=1");
while ($srb = mysql_fetch_array($sqlrb)){
echo '<div class="rkb"><a href="http://'.$srb['link'].'"><img src="http://'.$srb['img'].'" alt="'.$srb['name'].'"/></a></div>';
}
}
echo '<div class="copy">©'.$_SERVER['SERVER_NAME'].'</div>';
echo '</body></html>';
?>