Файл: world-faces.ru/world-faces.ru/user_status/alls.php
Строк: 26
<?
include_once '../i.php';
pdo();
$id=intval($_GET['id']);
$al=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` = ? LIMIT 1",array($id));
if ( empty($al) ) exit('o_O Покааааааааа');
$set['title'] = 'Статусы '.$al['nick'].'';
verh();
aut();
$k_post=DB::$dbs->querySingle("SELECT COUNT(*) FROM `status_user` where `id_user` = ?",array($id));
$k_all=DB::$dbs->querySingle("SELECT COUNT(*) FROM `status_user`");
echo '<div class="phpmenu">Статусы '.$al['nick'].' ('.$k_post.')</div>';
if($al['id']==$us['id']){
echo '<div class="prof">Мои статусы | <a href="/user_status">Все статусы</a> ('.$k_all.')</div>';}
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=DB::$dbs->query("SELECT * FROM `status_user` WHERE `id_user` = ? ORDER BY time DESC LIMIT $start, $set[p_str]",array($al[id]));
while ($post = $q -> Fetch()){
$ank=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` = ? LIMIT 1",array($post['id_user']));
echo "<div class='menu'>";
echo "<b><span style="color:$ank[color]">n";
echo output_text($post['msg'])."</b><small> (".vremja($post['time']).")</small> <a href='/user_status/komm.php?id=$post[id]'>[".DB::$dbs->querySingle("SELECT COUNT(*) FROM `status_komm1` WHERE `id_status` = ?",array($post['id']))."]<img src='/sys/inc/komm.png' alt''></a> <a href='/user_status/index.php?vote&id=$post[id]'>[".DB::$dbs->querySingle("SELECT COUNT(*) FROM `status_vote` WHERE `id_status` = ?",array($post['id']))."]<img src='/user_status/bbl3.png' alt''></a>n";
echo "</span>n";
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<a href='delete.php?id=$post[id]'><b>[x]</b></a></br>";
echo'</div>';
}
if ($k_page>1)str("?id=".intval($_GET['id']).'&',$k_page,$page);
niz();
?>