File size: 1.04Kb
<?php
# Автор: SoluS_Angelu[S] #
# ICQ: 865991 #
# Сайт: http://nkat.h2m.ru #
require_once('admin/connect.php');
require_once('admin/functions.php');
require_once('admin/navigation.php');
echo up();
$navig = new navigation();
$all = mysql_result(mysql_query("SELECT COUNT(*) FROM guest"), 0);
if(!$all)
{
echo '<div class="menu">Сообщений пока нет!</div>';
}
else
{
$q = mysql_query('SELECT * FROM guest ORDER BY gid ASC '.$navig->limit());
while($res = mysql_fetch_assoc($q))
{
echo '<div class="titl"> '.antimat(($res['nick'] ? $res['nick'] : 'Гость')).'</div>
<div class="menu">'.antimat($res['message']).'<br />
<b>Добавленно: '.date('d.m.y в H:i', $res['time']).'</b></div>';
}
$navig->view();
}
$count = mysql_result(mysql_query('SELECT COUNT(*) FROM guest'), 0);
$new = mysql_result(mysql_query('SELECT COUNT(*) FROM guest WHERE time > "'.(time()-60*24*7).'"'), 0);
echo '<div class="adv">Сообщений: <b>'.$count.($new ? ' (<span style="color: red">+'.$new.'</span>' : '').')</b></div>';
echo down();
?>