Файл: user/inc/jurnal.php
Строк: 34
<?
only_reg();
$set['title'] = 'Журнал';
unset($_COOKIE['jurnal_count']);
query("UPDATE `jurnal` SET `read` = '1' WHERE `id_kont` = '$user[id]'");
if (isset($_GET['type_jurnal']))
$types=" and `type`='".my_esc($_GET['type_jurnal'])."' ";
else
$types = null;
$k_post=mysql_result(query("SELECT COUNT(*) FROM `jurnal` WHERE `id_user` = '0' AND `id_kont` = '$user[id]' $types"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo '<center>
<div class="p_m">
<a href="?type_jurnal=obmen">Обменник</a> ::
<a href="?type_jurnal=my_foto">Фото</a> ::
<a href="?type_jurnal=rating">Оценки</a> ::
<a href="?type_jurnal=rating">Жалобы</a> ::
<a href="?">Все действия журнала</a>
</div></center>
';
if ($k_post==0)msg('Журнал пуст!');
$jurnal_sql=query("SELECT * FROM `jurnal` WHERE `id_user` = '0' AND `id_kont` = '$user[id]' $types ORDER BY id DESC LIMIT $start, $set[p_str]");
while ($row = mysql_fetch_array($jurnal_sql))
{
echo "<div class='p_m'><span class='ank_n'>(".vremja($row['time']).")</span> ".output_text($row['msg'])."</div>";
}
if (@$_GET['type_jurnal'] != null)
$type_p = "?type_jurnal=".my_esc(@$_GET['type_jurnal'])."&";
else
$type_p = "?";
if ($k_page > 1)str($type_p,$k_page,$page); // Вывод страниц
?>