<?
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']+360>time())$err='Нельзя так часто совершать действия';
if(!isset($err)){
$_SESSION['time']=time();
mysql_query("INSERT INTO `jurnal` (`id_kont`, `msg`, `time`) values('".$id."', '".$user['nick']." сделал вам действие $d[name]  ', '".time()."')");
msg('О вашем действии отправлено уведомление');
}}
err();
$q=mysql_query("SELECT * FROM `deistviya` ORDER BY `id` ASC");
echo "<table class='post'>";

while ($qq = mysql_fetch_assoc($q))
{
echo "<tr><td class='p_t'>";
echo "<img src='/sys/dimg/$qq[nameimg]'> <a href='?id=$id&amp;d=$qq[id]'>$qq[name]</a>";
echo "</td></tr>";
}
echo "</table>";
echo "<div class='foot'><a href='/info.php?id=$id'>Назад</a></div>";
include_once '../sys/inc/tfoot.php';
?>