Файл: games/anagrama/delete.php
Строк: 39
<?
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/start.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/compress.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/sess.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/home.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/settings.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/db_connect.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/ipua.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/fnc.php';
require_once$_SERVER['DOCUMENT_ROOT'].'/sys/inc/user.php';
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `anagramma_form` WHERE `id` = '".intval($_GET['id'])."'"),0)==1)
{
$post=mysql_fetch_assoc(mysql_query("SELECT * FROM `anagramma_form` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1"));
if ($post['id_user']==0)
{
$ank['id']=0;
$ank['pol']='guest';
$ank['level']=0;
$ank['nick']='Гость';
}
else
$ank=get_user($post['id_user']);
if (user_access('guest_delete'))
{
admin_log('Анаграмма','Удаление сообщения',"Удаление сообщения от $ank[nick]");
mysql_query("DELETE FROM `anagramma_form` WHERE `id` = '$post[id]'");
}
}
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL)
header("Location: ".$_SERVER['HTTP_REFERER']);
else
header("Location: room.php?".SID);
?>