Файл: archive/www/musimka.ru/lenta_user.php
Строк: 44
<?
include 'connect.php';
include 'core/panel.php';
include 'core/bb_code.php';
$title = $title.' | Моя лента';
include 'head.php';
echo '<div class="title"><a href = "/'.$u['id'].'">'.$u['login'].'</a> / Лента</div>';
if(!isset($u)){
echo '<div class="err">Доступ закрыт.</div>';
}else{
mysql_query("UPDATE `lenta_user` SET `read` = '1' WHERE `id_kont` = '".$u['id']."' AND `read` = '0'");
echo '<table class="post">';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta_user` WHERE `id_kont` = '".$u['id']."'"),0);
$total = intval(($all - 1) / $count) + 1;
$page = num($_GET['page']);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $count - $count;
if($k_post==0){
echo '<div class="div">Нет новых событий!</div>';
}
$q=mysql_query("SELECT * FROM `lenta_user` WHERE `id_kont` = '".$u['id']."' ORDER BY time DESC LIMIT 10");
while ($post = mysql_fetch_array($q)){
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '$post[id_user]'"));
echo '<div class="div">';
echo "". ico($ank['sex'],$ank['admin']) ." <a href='/$ank[id]'> ".$ank['login']."</a>". online($ank['online']) ." ".vremya_ban($post['time'])." <a href='lenta_del.php?del=$post[id]' title='Удалить'><img src='http://i.spaces.ru//cross_r.gif'></img></a>
| <a href='lenta_set.php?id=$ank[id]' title='Настройки ленты'>[настр]</a></br>";
echo ''.smile(links($post['msg'])).'</div>';
echo "</div>";
}
navigation($page, $total,'lenta.php?id='.$u['id'].'&');
}
echo '</div>';
echo "<div class='title'>";
echo "<img src='http://i.spaces.ru/trash.gif'></img><a href='lenta_del.php?del_all=$u[id]'>Очистить ленту</a>";
echo '</div>';
include_once 'foot.php';
?>