Файл: world-faces.ru/world-faces.ru/dnevnik/index.php
Строк: 81
<?
/*Скрипт vmobe.net
venix & PaRaDoX*/
include_once '../i.php';
pdo();
$set['title']='Дневники';
verh();
aut();
function dnava($id){
$width=37; $height=39;
if(is_file(H."files/avatar/$id.gif"))
echo "<img src='/files/avatar/$id.gif' align='left' width='$width' height='$height' alt=''/>";
elseif(is_file(H."files/avatar/$id.jpg"))
echo "<img src='/files/avatar/$id.jpg' align='left' width='$width' height='$height' alt=''/>";
elseif(is_file(H."files/avatar/$id.png"))
echo "<img src='/files/avatar/$id.png' align='left' width='$width' height='$height' alt=''/>";
else
echo "<img src='/img/user.png' align='left' width='$width' height='$height' alt=''/>";
}
$del = (isset($_GET['del'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['del']))) : NULL;
if(isset($_GET['del'])){
echo'<div class="prof">Запись удалена!</div>';
}
$mys=DB::$dbs->querySingle("select count(*) from `vmobe_net_dnevnik` where `uid`=?",array($us[id]));
echo '<div class="prof"><a href="/dnevnik/add.php">Добавить запись</a></div><div class="prof"><a href="/dnevnik/dn'.$us['id'].'">Мой дневник</a> ('.$mys.')</div><div class="prof"><a href="/dnevnik/top.php">Рейтинги</a></div>'; echo'<hr/>';
$k_post=DB::$dbs->querySingle("select count(`id`) from `vmobe_net_dnevnik` ");
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post==0) echo "Нет записей<br />";
$res = DB::$dbs->query("select * from `vmobe_net_dnevnik` order by `date` desc limit $start,$set[p_str]");
while ($dnevnik = $res->fetch()){
echo"<div class='prof'>";
avatar4($dnevnik['uid']);
echo "<a href="/dnevnik/view.php?id=".$dnevnik['id']."">";
echo esc(trim(br(bbcode(links($dnevnik['name'])))))."</a> (".vr($dnevnik['date']).")".(($dnevnik['vip']==1)?'<font color="red">[<b>VIP!</b>]</font>':NULL)."<br/>Рейтинг: <a href='view.php?id=$dnevnik[id]&nice'><img src='/library/book/001_18.png' alt='+1' weight='16' height='16' /></a> ".DB::$dbs->querysingle('select count(*) from `dnevnik_votes` where `type`=? and `id_dnev`=?',array(nice,$dnevnik[id]))." / <a href='view.php?id=$dnevnik[id]&bad'><img src='/library/book/001_19.png' alt='-1' weight='16' height='16' /></a> ".DB::$dbs->querysingle('select count(*) from `dnevnik_votes` where `type`=? and `id_dnev`=?',array(bad,$dnevnik[id]))."";
echo"</div>";
}
if ($k_page>0)str('?',$k_page,$page);
include_once '../sys/inc/tfoot.php';
?>