Файл: sys/fnc/wapadm.php
Строк: 60
<?
### - Автор: Hatchet
### - Скрипт распространяется на бесплатной основе
/*===================*/
function wapadm() {
global $user;
if (user_access('adm_panel_show'))
{
global $set;
global $db;
if ($set['web'] == false)
{
?>
<?
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_p=mysql_result(mysql_query("SELECT COUNT(*) FROM `spamus` $types",$db), 0);
?>
<?
$k_p2=mysql_result(mysql_query("SELECT COUNT(*) FROM `adm_chat`",$db), 0);
$k_n= mysql_result(mysql_query("SELECT COUNT(*) FROM `adm_chat` WHERE `time` > '".(time()-86400)."'",$db), 0);
if ($k_n==0)$k_n=NULL;
else $k_n='+'.$k_n;
?>
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<?
/*
=================================
Админ кабинет
=================================
*/
?>
<td class="auts">
<a href="/plugins/admin/"><center><img src="/plugins/admin/icon_panel/adm_cabinet.png" alt="*" /></center></a>
</td>
<?
/*
=================================
Жалобы
=================================
*/
?>
<td class="auts">
<a href="/plugins/admin/spam/index.php"><center><img src="/plugins/admin/icon_panel/spam.png" alt="*" /><font color="white"><?=($k_p)?></font></center></a>
</td><?
/*
=================================
Админ чат
=================================
*/
?>
<td class='auts'>
<a href="/plugins/admin/chat/index.php"><center><img src="/plugins/admin/icon_panel/admin_chat.png" alt="*" /><? ($k_p2)?><font color='white'><?= $k_n?></font></center></a>
</td>
<?
/*
=================================
Админка
=================================
*/
?>
<td class='auts'>
<a href="/adm_panel/index.php"><center><img src="/plugins/admin/icon_panel/adm_panel.png" alt="*" /></center></a>
</td>
</tr></table>
<?
}
}
}
?>