<?
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/adm_check.php';
include_once '../sys/inc/user.php';
only_reg();
if(isset($_GET['id']))$id=intval($_GET['id']);
$set['title']='Действия';
include_once '../sys/inc/thead.php';
title();
aut();
if(isset($_GET['d'])){
$d=mysql_fetch_assoc(mysql_query("SELECT * FROM `deistviya` WHERE `id` = '".intval($_GET['d'])."' LIMIT 1"));
if($_SESSION['time']+200>time())$err='Нельзя так часто совершать действия';
if(!isset($err)){
$_SESSION['time']=time();
mysql_query("INSERT INTO `mail` (`id_kont`, `msg`, `time`) values('".$id."', '[url=/id$user[id]]".$user['nick']."[/url] совершил над Вами действие - [b]$d[name][/b]', '".time()."')");
msg('О вашем действии отправлено уведомление');
}}
err();
$q=mysql_query("SELECT * FROM `deistviya` ORDER BY `id` ASC");

while ($qq = mysql_fetch_assoc($q))
{
echo "<div class='dop_menu'><img src='/sys/dimg/$qq[nameimg]'> <a href='?id=$id&amp;d=$qq[id]'>$qq[name]</a></div>";
}
include_once '../sys/inc/tfoot.php';
?>