Файл: vk.com_vhllam/klan/adm_display.php
Строк: 113
<?php
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/start.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/compress.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/sess.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/home.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/settings.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/db_connect.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/ipua.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/fnc.php';
require_once$_SERVER['DOCUMENT_ROOT'] . '/sys/inc/user.php';
$id = intval($_GET['id']);
$clan = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '".$id."' LIMIT 1"));
$set['title'] = 'Клан '.$clan['name'];
include_once '../sys/inc/thead.php';
title();
aut();
if ($user['group_access'] == 15) {
switch ($_GET['act']) {
default:
$all = mysql_result(mysql_query("SELECT COUNT(id) FROM `clan_chat` where `id_clan` = '".$id."'"),0);
echo '<div class="gmenu"><a href="adm_display.php?id='.$id.'&act=chat">Просмотр чата</a> ['.$all.']</div>';
$all = mysql_result(mysql_query("SELECT COUNT(id) FROM `clan_adm_chat` where `id_clan` = '".$id."'"),0);
echo '<div class="gmenu"><a href="adm_display.php?id='.$id.'&act=adm_chat">Просмотр админ-чата</a> ['.$all.']</div>';
break;
case 'chat':
echo '<div class="gmenu"><a href="adm_display.php?id='.$id.'"><b>[Назад]</b></a></div>';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `clan_chat` WHERE `id_clan` = '$clan[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 " <tr>n";
echo " <td class='err'>n";
echo "Нет сообщенийn";
echo " </td>n";
echo " </tr>n";
}
$q=mysql_query("SELECT * FROM `clan_chat` WHERE `id_clan` = '$clan[id]' ORDER BY id DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
if(@$num==1){
echo "<div class='x1'>";
@$num=0;
}else{
echo "<div class='x2'>";
@$num=1;}
echo group($ank['id'])." <a href='/info.php?id=$ank[id]'><span style="color:$ank[ncolor]">$ank[nick]</span></a> [".vremja($post['time'])."]n";
echo "<br>n";
echo "<span style="color:#$ank[mcolor]">";
echo output_text($post['msg'])."n";
echo "</span><br />";
echo "</div>";
}
if ($k_page>1)str("?id=".$id."&act=chat&",$k_page,$page); // Вывод страниц
break;
case 'adm_chat':
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `clan_adm_chat` WHERE `id_clan` = '$clan[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 " <tr>n";
echo " <td class='err'>n";
echo "Нет сообщенийn";
echo " </td>n";
echo " </tr>n";
}
$q=mysql_query("SELECT * FROM `clan_adm_chat` WHERE `id_clan` = '$clan[id]' ORDER BY id DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
if(@$num==1){
echo "<div class='x1'>";
@$num=0;
}else{
echo "<div class='x2'>";
@$num=1;}
echo status($ank['id'])." <a href='/info.php?id=$ank[id]'><span style="color:$ank[ncolor]">$ank[nick]</span></a> (".vremja($post['time']).")n";
echo "<br/>n";
echo "<span style="color:$ank[color]">n";
echo esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($post['msg']))))))))."n";
echo "</span><br/>n";
echo "</div>";
}
if ($k_page>1)str("?id=".$id."&act=adm_chat&",$k_page,$page); // Вывод страниц
break;
}
}
echo "</div>n";
echo "<div class='aut'>";
echo "<a href='/klan/myklan.php'>Мой клан</a><br/>n";
echo "<a href='/klan/'>Все кланы</a><br/>n";
echo "<a href='/klan/rules.php'>Помощь и Правила</a>n";
echo "</div>n";
include_once '../sys/inc/tfoot.php';
?>