Файл: public_html/user/stena/index.php
Строк: 88
<?
$set['p_str']=5;
if (isset($_GET['likepost']))
{
$stena=mysql_fetch_assoc(mysql_query("SELECT * FROM `stena` WHERE `id` = '".intval($_GET['likepost'])."' LIMIT 1"));
$ank3=get_user($stena['id_user']);
$l=mysql_result(mysql_query("SELECT COUNT(*) FROM `stena_like` WHERE `id_stena` = '$stena[id]'"),0);
if (isset($_GET['likepost']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `stena_like` WHERE
`id_stena` = '$stena[id]' AND `id_user` = '$user[id]' LIMIT 1"),0)==0){
mysql_query("INSERT INTO `stena_like` (`id_user`, `id_stena`) values('$user[id]', '$stena[id]')");
mysql_query("UPDATE `user` SET `balls` = '".($ank3['balls']+1)."' WHERE `id` = '$ank3[id]' LIMIT 1");
}
}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `stena` WHERE `id_stena` = '$ank[id]'"),0);
$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 " <div class='mess'>n";
echo "Нет сообщенийn";
echo " </div>n";
}
else
{
/*------------сортировка по времени--------------*/
if (isset($user) || (isset($set['write_guest']) && $set['write_guest']==1 && (!isset($_SESSION['antiflood']) || $_SESSION['antiflood']<$time-300)))
{
}
if (isset($user)){
/*
echo "<div id='comments' class='menus'>";
echo "<div class='webmenu'>";
echo "<a href='/info.php?id=$ank[id]&page=$page&sort=1' class='".($user['sort']==1?'activ':'')."'>Внизу</a>";
echo "</div>";
echo "<div class='webmenu'>";
echo "<a href='/info.php?id=$ank[id]&page=$page&sort=0' class='".($user['sort']==0?'activ':'')."'>Вверху</a>";
echo "</div>";
echo "</div>";
*/
}
/*---------------alex-borisi---------------------*/
}
echo "<form method="post" name='message' action="?id=$ank[id]$go_otv">n";
if ($set['web'] && is_file(H.'style/themes/'.$set['set_them'].'/altername_post_form.php'))
include_once H.'style/themes/'.$set['set_them'].'/altername_post_form.php';
else
echo "$tPanel<textarea name="msg">$otvet</textarea><br />n";
echo "<input value="Отправить" type="submit" />n";
echo "</form><table width='99%'>n";
$q=mysql_query("SELECT * FROM `stena` WHERE `id_stena` = '$ank[id]' ORDER BY id $sort LIMIT $start, $set[p_str]");
$num=0;
while ($post = mysql_fetch_assoc($q))
{
$ank_stena=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
if ($set['set_show_icon']==2){
avatar($ank_stena['id']);
}
elseif ($set['set_show_icon']==1)
{
}
?>
<a name="actions"></a>
</div> <div class="wall_item" id='wall19285371_1108' data-ignore="1">
<a class="post__anchor anchor" name="post19285371_1108"></a>
<div class="wi_head">
<?
echo "<a class='pi_author al_u19285371 _u19285371' href='/info.php?id=$ank_stena[id]'>$ank_stena[nick]</a>";
?>
<div class="wi_info"><a class="wi_date al_wall" data-header="Запись на стене">
<?
echo " ".vremja($post['time'])."";
?>
</a>
</div>
</div>
<div class="wi_body">
<div class="pi_text zoom_text">
<?
echo output_text($post['msg'])."<br />n";
?>
</div>
<div class="wi_buttons"><div class="wi_buttons_wrap"><span class="like_wrap">
<?
$l=mysql_result(mysql_query("SELECT COUNT(*) FROM `stena_like` WHERE `id_stena` = '$post[id]'"),0);
echo '<a href="?id='.$ank['id'].'&likepost='.$post['id'].'&page='.$page.'" " class="item_like is_empty item_sel _i"><i class="i_like"></i><b class="v_like" > '.$l.' </b></a>
';
if (isset($user) && $ank_stena['id']!=$user['id'])echo "<a href= "/info.php?id=$ank[id]&page=$page&spam=$post[id]" class='item_like is_empty item_sel _i'> <b class='v_like' > Это спам</b></a>
";
if (user_access('guest_delete') || $ank['id']==$user['id'])
{
echo "<a href='?id=$ank[id]&delete_post=$post[id]' class='item_like is_empty item_sel _i'> <b class='v_like' > Delete</b></a>
";
}
?>
</span>
<span class="item_views no_views"></span></div></div>
</div>
<?
if (isset($user))
{
}
}
if ($k_page>1)str('?id='.$ank['id'].'&',$k_page,$page); // Вывод страниц
?>