Файл: vsime.com/diary/inc/act_sk.php
Строк: 86
<?
if(isset($_GET['id']) && profile(intval($_GET['id'])))
{
$ank=profile(intval($_GET['id']));
if(isset($_GET['sk_all']) && $_GET['mdp']==$mdp)mysqli_query($dbi, "UPDATE `diary` SET `sk` = '0', `sk_user` = '$user[id]' WHERE `sk` = '1' AND `id_user` = '$ank[id]'");
$ank=profile(intval($_GET['id']));
}
$title .= " - Заблокированные записи".(isset($ank)?" $ank[nick]":null).""; //заголовок
ex_head();
$count_results = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `diary` WHERE `sk` = '1'".(isset($ank)?" AND `id_user` = '$ank[id]'":null).""));
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
if ($count_results == 0)
{
echo "<div class='list_empty'>Нет записей</div>n";
}
$query=mysqli_query($dbi, "SELECT * FROM `diary` WHERE `sk` = '1'".(isset($ank)?" AND `id_user` = '$ank[id]'":null)." ORDER BY `time` DESC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query))
{
$ank2 = profile($post['id_user']);
$count_komms = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `diary_komm` WHERE `id_diary` = '$post[id]'"));
echo "<div class='list'>n";
echo "<div class='left'>n";
show_avatar($ank2['id'], 'small');
echo "</div>n";
echo "<div class='overfl_hid'>n";
echo profile_icon($ank2['id']).profile_nick($ank2['id'], 1).profile_medal($ank2['id'])."<br />n";
echo "<a href='/diary/?act=diary&id=$post[id]'>".($post['name']!=NULL?hsc($post['name']):hsc(str_cut($post['text'], 5, 50)))."</a>n";
echo "<span class='grey right'>".vremja($post['time'])."</span><br/>n";
echo "<div class='freespace'>n";
echo hsc(str_cut($post['text'], 20, 200))."".(hsc(str_cut($post['text'], 20, 200))!=$post['text']?" <a href='/diary/?act=diary&id=$post[id]&'>подробнее →</a>":null)."<br/>n";
echo "</div>n";
$sank=profile($post['sk_user']);
echo "<div class='list_dr'>n";
echo "Дневник заблокировал n";
echo profile_icon($sank['id']).profile_nick($sank['id'], 1).profile_medal($sank['id'])."n";
echo "<span class='grey'>(".vremja($post['sk_time']).")</span>n";
echo "<br />n";
echo "Причина: ".output_text($post['sk_msg'],$sank['id'])."<br />n";
echo "</div>n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?act=sk&".(isset($ank)?"id=$ank[id]&":NULL)); // Вывод страниц
if (isset($moderate_diary) && isset($ank))
{
if ($count_results) {
echo "<div class='mod_grad'>n";
echo "<img src='/i/site/unlock_blue.png' /> <a href='?act=sk&id=$ank[id]&sk_all=1&mdp=$mdp'>Разблокировать все записи $ank[nick]</a><br />n";
echo "</div>n";
}
echo "<div class='foot'>n";
echo image_back()." <a href='/diary/?act=sk'>Все заблокированные записи</a> | <a href='/diary/'>Все записи</a><br/>n";
echo "</div>n";
} else {
echo "<div class='foot'>n";
echo image_back()." <a href='/diary/'>Все записи</a>n";
echo "</div>n";
}
ex_foot();
?>