Файл: mylaf.ru/group/index.php
Строк: 49
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Группы';
include_once '../sys/inc/thead.php';
title();
if (isset($_GET['message'])){
msg('Группа удалена');
}
aut();
if (isset($user)){
echo "<a href='group.new.php'><div class='gmenu'><img src='img/new.png' alt='' /> Создать группу</div></a>";
echo "<a href='user.group.php?id=$user[id]'><div class='gmenu'><img src='img/soo.png' alt='' /> Мои группы</div></a>";
}
include_once 'inc/search.php';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `group`"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=mysql_query("SELECT * FROM `group` ORDER BY `ratting` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q)){
$group=mysql_fetch_assoc(mysql_query("SELECT * FROM `group` WHERE `id` = '$post[id]'"));
echo "<a href='group.php?id=$group[id]'><div class='forum'><table>";
echo "<td class='w'>";
ava50($group['id']);
echo "</td><td>";
echo "".htmlspecialchars($group['name'])."<br/><b>Создана: </b>".vremja($group['time']);
$u=mysql_result(mysql_query("SELECT COUNT(*) FROM `group_user` WHERE `id_group` = '$group[id]'"), 0);
echo "<br /><b>Участников: </b>$u";
echo "</td>";
echo "</table></div></a>";
}
if ($k_page>1)str('?&',$k_page,$page);
include_once '../sys/inc/tfoot.php';
?>