<?
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';
if (!user_access('adm_panel_show') || !isset($user)){
header("Location: /?");
exit;
}
$set['title']='Жалобы'; // заголовок страницы
include_once '../../../sys/inc/thead.php';
title();
?>
<div class="lc_br wbg font0 relative oh" id="header_path"> <a href="/" style="font-size:0;"> <img src="/style/i/lb/home.png" alt="Главная"> </a> <span class="lc_brw"> <img src="/style/i/lb/sep.png" alt="" class="lc_br_sep"> <a href="/plugins/admin/"> <span itemprop="name">Админ раздел</span> </a> </span> <span class="lc_brw"> <img src="/style/i/lb/sep.png" alt="" class="lc_br_sep"> <span class="lc_br_text">Жалобы </span> </span> </div>
<?
err();
if ($user['group_access']==2)
{
$types = " where `types` = 'chat' ";
}
elseif ($user['group_access']==3)
{
$types =" where `types` = 'forum' ";
}
elseif ($user['group_access']==4)
{
$types = " where (`types` = 'obmen_komm' OR `types` = 'files_komm') ";
}
elseif ($user['group_access']==5)
{
$types = " where `types` = 'lib_komm' ";
}
elseif ($user['group_access']==6)
{
$types = " where `types` = 'foto_komm' ";
}
elseif ($user['group_access']==11)
{
$types = " where `types` = 'notes_komm' ";
}
elseif ($user['group_access']==12)
{
$types = " where `types` = 'guest' ";
}
elseif (($user['group_access']>6 && $user['group_access']<10) || $user['group_access']==15)
{
$types = null;
}
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `spamus` $types"),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){
?>
<div class="wrapper bb0">
<div class=" busi t_center" style="border-left: 0;border-right: 0;"><span class="grey">Внимание!</span> После рассмотрения жалоб не забывайте их удалять!</div>
</div>
<?
}
if ($k_post == 0) {
?>
<div class="wrapper block">Нет новых жалоб</div>
<?
}
$q=mysql_query("SELECT * FROM `spamus` $types ORDER BY id DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$ank = get_user($post['id_user']);
$spamer = get_user($post['id_spam']);
?>
<div class="wrapper">
<div class=" block bord-botm">
<?
echo '<b class="grey">Раздел:</b> ';
if ($post['razdel'] == 'mail')echo "<font color='red'>Почта</font>";
if ($post['razdel'] == 'notes_komm'){ // Дневники
$notes=mysql_fetch_assoc(mysql_query("SELECT * FROM `notes` WHERE `id` = '$post[id_object]' LIMIT 1"));
echo "<font color='red'>Дневники</font> | ";
echo " <a href='/plugins/notes/list.php?id=$notes[id]'>".htmlspecialchars($notes['name'])."</a>\n";
}
if ($post['razdel'] == 'forum'){ // Тема форума
$them=mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_t` WHERE `id` = '$post[id_object]' LIMIT 1"));
echo "<font color='red'>Форум</font> | ";
echo " <a href='/forum/$them[id_forum]/$them[id_razdel]/$them[id]/'>".htmlspecialchars($them['name'])."</a>\n";
}
if ($post['razdel'] == 'foto_komm'){ // Фотографии
$foto=mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '$post[id_object]' LIMIT 1"));
echo "<font color='red'>Фото</font> | ";
echo " <a href='/foto/$foto[id_user]/$foto[id_gallery]/$foto[id]/'>".htmlspecialchars($foto['name'])."</a>\n";
}
if ($post['razdel'] == 'status_komm') // Статус
{
$status=mysql_fetch_assoc(mysql_query("SELECT * FROM `status` WHERE `id` = '$post[id_object]' LIMIT 1"));
echo "<a href='/user/status/komm.php?id=$status[id]'><font color='red'>Статус</font></a> | ";
$anketa = get_user($status['id_user']);
echo " <a href='/info.php?id=$anketa[id]'>$anketa[nick]</a>\n";
echo " ".medal($anketa['id'])."";
}
?>
<div class="pad_t_a">
<span class="grey">Нарушитель:</span> <span class="m"><?= group($spamer['id'])?> </span>
<a href="/user/?id=<?= $spamer['id']?>" class="b nick black t"><?= $spamer['nick']?></a>
<span class="m"><?= medal($spamer['id'])?></span>
</div>
<?
if ($post['razdel']=='mail' || $post['razdel']=='guest' || $post['razdel']=='forum' || $post['razdel']=='stena')
echo "<div class='pad_t_a'><span class='grey'>Сообщение:</span> <font color='red' style='border-bottom: 1px solid green;'>".output_text($post['spam'])."<br /></font></div>\n";
?>
<div class="pad_t_a">
<span class="grey">Комментарий:</span> <?= output_text($post['msg'])?>
</div>
<div class="pad_t_a">
<span class="grey">Жалоба от:</span> <span class="m"><?= group($ank['id'])?> </span>
<a href="/user/?id=<?= $ank['id']?>" class="b nick black t"><?= $ank['nick']?></a>
<span class="m"><?= medal($ank['id'])?></span> (<?= vremja($post['time'])?>)
</div>
<?
if (($user['id']!=$spamer['id'] && $user['group_access'] >= $spamer['group_access']) || ($user['id']==1))
{
?>
</div>
<div class="oh js-action_bar action-bar">
<table class="table__wrap table__wrap-fixed grey"> <tbody><tr>
<td class="table__cell relative m">
<a href="/adm_panel/ban.php?id=<?= $spamer['id']?>" class="link" title="Бан"> Бан </a>
</td>
<td class="table__cell relative m">
<a href="delete.php?id=<?= $post['id']?>&otkl" class="link" title="Отклонить жалобу"> Отвергнуть </a>
</td>
<td class="table__cell relative m bord-right0">
<a href="delete.php?id=<?= $post['id']?>" class="link" title="Рассмотрена"> Рассмотрена </a>
</td>
</tr></tbody></table>
</div>
<?
}
else if ($user['id']==$spamer['id']){
echo "<div class='pad_t_a'><div class='mess'>На вас поступила жалоба от <font color='green'>$ank[nick]</font>
пожалуста дождитесь администратора для выяснения обстоятельств.</div></div></div>\n";
}
else{
echo "<div class='pad_t_a'><div class='mess'>У вас не достаточно полномочий, для рассмотрения этой жалобы.</div></div></div>\n";
}
?>
</div>
<?
}
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
?>
<a href="/plugins/admin/" class="link darkblue return full_link"> <span class="ico ico_arrow-back"></span> Назад </a>
<?
include_once '../../../sys/inc/tfoot.php';
?>