Размер файла: 1.69Kb
<?php
// coding by Felis
define('MAIN', true);
require_once('sys/kernel.php');
require_once('temp/cap.php');
echo $fnc->head('<a href="online.php"><span class="online"><b>'.$uo.'</b></span></a> [<a href="'.CFILE.'">обновить</a>]'.($op == true ? ' [<a href="add.php">сказать</a>] [<a href="profile.php?u='.$uid.'">профиль</a>]' : ' [<a href="enter.php">вход</a>|<a href="register.php">регистрация</a>]').($adm == true ? ' [<a href="adm.php">админка</a>]' : ''));
$psto = $db->query("SELECT * FROM `posts` ORDER BY `time` DESC LIMIT $begin, $onpage");
$row = 1;
if($psto->num_rows == 0)
{
echo $fnc->cont('В чате нет сообщений..');
}
else
{
while($pi = $psto->fetch_assoc())
{
if($row == 1)
{
echo $fnc->cont('<b>'.$fnc->get_author($pi['author'], 1).'</b>
<span class="sim">['.date('H:i', $pi['time']).']</span> (<a href="add.php?u='.$pi['author'].'">Отв</a>'.($mod == true ? '|<a href="adm.php?mode=ban&id='.$pi['author'].'">Бан</a>|<a href="adm.php?mode=remove&id='.$pi['id'].'">Уд</a>' : NULL).')<br />
'.$fnc->smile($fnc->out($pi['text'], 1, 1)));
$row = 2;
}
elseif($row == 2)
{
echo $fnc->cont2('<b>'.$fnc->get_author($pi['author'], 1).'</b>
<span class="sim">['.date('H:i', $pi['time']).']</span> (<a href="add.php?u='.$pi['author'].'">Отв</a>'.($mod == true ? '|<a href="adm.php?mode=ban&id='.$pi['author'].'">Бан</a>|<a href="adm.php?mode=remove&id='.$pi['id'].'">Уд</a>' : NULL).')<br />
'.$fnc->smile($fnc->out($pi['text'], 1, 1)));
$row = 1;
}
}
$fnc->nav($all_p, $onpage, $p, 1, 0, NULL);
}
require_once('temp/foot.php');
// конец файла ./main.php