Файл: world-faces.ru/world-faces.ru/chat/delete.php
Строк: 37
<?
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/user.php';
if ( $user['level'] < 1 ) exit('ПРИФ МАЛАЛАЙКА =)');
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_post` WHERE `id` = '".intval($_GET['id'])."'"),0)==1){
if (isset($user) && $user['level']>=1)
mysql_query("DELETE FROM `chat_post` WHERE `id` = '".abs((int)$_GET['id'])."'");
}
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL)
header("Location: ".$_SERVER['HTTP_REFERER']);
else
header("Location: index.php?".SID);
?>