Размер файла: 3.98Kb
<?
require_once '../core/system.php';
echo admin();
$header = 'Админ-панель';
require_once H.'core/head.php';
$teme = time()-84000;
$req = mysql_query("SELECT `id` FROM `user` WHERE `datareg` > '".(time()-84600)."'");
$new = mysql_num_rows($req);
$reql = mysql_query("SELECT `id` FROM `logi` WHERE `text`='Куплено золото' and `time` > '".(time()-84600)."'");
$ngold = mysql_num_rows($reql);
$reqn = mysql_query("SELECT `id` FROM `ban` where `time`>'".$time."'");
$ban = mysql_num_rows($reqn);
$ipp = mysql_query("SELECT `id` FROM `ipban`");
$ip = mysql_num_rows($ipp);
$chaty = mysql_query("SELECT `id` FROM `chat` WHERE `elit`='1'");
$chat = mysql_num_rows($chaty);
$day = mysql_query("SELECT `id` FROM `user` WHERE `online` > '".(time()-84600)."'");
$day = mysql_num_rows($day);
$month = mysql_query("SELECT `id` FROM `user` WHERE `online` > '".(time()-2538000)."'");
$month = mysql_num_rows($month);
if(isset($_GET['chat'])){
mysql_query("DELETE FROM `chat`");
header('Location: ?');
$_SESSION['message'] = 'Чат очищен!';
}
if(isset($_GET['task'])){
mysql_query("DELETE FROM `task`");
header('Location: ?');
$_SESSION['message'] = 'Задания удалены!';
}
if(isset($_GET['exp'])){
if($setgame['exp']==0){
$next = 1;
$text = 'включен';
} else {
$next = 0;
$text = 'выключен';
}
mysql_query("UPDATE `setgame` set `exp`='".$next."'");
header('Location: ?');
$_SESSION['message'] = 'Опыт '.$text.'!';
}
?>
<div class = "head center">
Активных за 24 часа: <?php echo $day;?>
<br>
Активных за месяц: <?php echo $month;?>
</div>
<hr>
<?php
echo '<div class="head"><table class="foot" width="100%" border="0" style="padding-top: 5px; cellpadding="2px" cellspacing="2px" >
<tbody>
<tr>';
echo"<td width='45%'><a class='inpc-ar' href='ngold'><img src='/images/icon/gold.png'> Купили золото <span class='float-right'><font color='CDC9C9'>".$ngold."</font></span> </a></td>
<td width='45%'><a class='inpc-ar' href='zgold'><img src='/images/icon/gold.png'> Начислить золото</a></td></tr>
<td width='45%'><a class='fight' href='amail'><img src='/images/icon/mail.png'> Почта</a></td>
<td width='45%'><a class='fight' href='user'><img src='/images/icon/st.png'> Редакт. игрока</a></td></tr>
<td width='45%'><a class='inpc-ar' href='reg'><img src='/images/icon/r.png'> Новые игроки <span class='float-right'><font color='CDC9C9'>".$new."</font></span> </a></td>
<td width='45%'><a class='inpc-ar' href='ban'><img src='/images/icon/r.png'> Забан. игроки <span class='float-right'><font color='CDC9C9'>".$ban."</font></span> </a></td></tr>
<td width='45%'><a class='fight' href='ban_ip'><img src='/images/icon/r.png'> Забаненные ip <span class='float-right'><font color='CDC9C9'>".$ip."</font></span> </a></td>
<td width='45%'><a class='fight' href='search_ip'><img src='/images/icon/r.png'> Поиск по IP</a></td></tr>
<td width='45%'><a class='inpc-ar' href='news'><img src='/images/icon/r.png'> Создать новость</a></td>
<td width='45%'><a class='inpc-ar' href='chat'><img src='/images/icon/r.png'> Чат <span class='float-right'><font color='CDC9C9'>".$chat."</font></span></a></td></tr>
<td width='45%'><a class='fight' href='optim'><img src='/images/icon/r.png'> Оптимиз. БД</a></td>
<td width='45%'><a class='fight' href='?chat'><img src='/images/icon/r.png'> Очистить чат</a>
</td>
</tbody>
</tr>
</table>
</div>
</div>
<hr>";
if($setgame['exp']==0){
echo"<div class='but-list-light center'><a href='?exp'><img src='/images/icon/exp.png'> Включить Двойной Опыт</a></div>";
} else {
echo"<div class='but-list-light center'><a href='?exp'><img src='/images/icon/exp.png'> Выключить Двойной Опыт</a></div>";
}
if($user['prava'] > 4){
echo"<div class='but-list-light center'><a href='?task'><img src='/images/icon/error.png'> Удалить задания</a></div>";
}
require_once H.'core/foot.php';
?>