Файл: vkollektive2014/soo/act_user.php
Строк: 30
<?
include_once '../connect.php';
include_once '../head.php';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `soo_users` WHERE `id_users` = '$u[id]'"),0);
$total = intval(($k_post - 1) / 10) + 1;
$page = intval(@$_GET['page']);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * 10 - 10;
if ($k_post==0)
{
echo "<div class='menu123'>n";
echo "Нет сообществn";
echo "</div>n";
}
$q=mysql_query("SELECT * FROM `soo_users` WHERE `id_users` = '$u[id]' ORDER BY `last_time` DESC LIMIT $start, $set[p_str]");
while($post=mysql_fetch_array($q))
{
$comm=mysql_query("SELECT * FROM `comm` WHERE `id` = '$post[id_comm]'");
$comm=mysql_fetch_array($comm);
$aname=NULL;
if($post['access']=='creator')$aname='создатель';
elseif($post['access']=='adm')$aname='администратор';
elseif($post['access']=='mod')$aname='модератор';
echo "<div class='main123'>n";
echo "<a href='?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a>n";
if($aname!=NULL)echo " ($aname)";
echo "<br/>Вступил".($ank['pol']==0?'a':NULL)." ".vremja($post['time']);
echo "</div>n";
echo "</tr>n";
}
echo "</table>n";
if ($k_page>1)str("?act=user&id=$ank[id]&",$k_page,$page); // Вывод страниц
include_once '../foot.php';
?>