Файл: akcii/del.php
Строк: 53
<?php
session_name('im');
session_start();
include '../header/config.inc.php';
include '../header/function.inc.php';
include '../header/header.inc.php';
include '../header/connect.inc.php';
include '../header/click-club.class.php';
If (!isset($_GET['log'])) define("anybody","true");
include '../header/enter.inc.php';
include '../ban.php';
If ($_USER['admin']){
$id = intval($_GET['id']);
$empty = intval($_POST['empty']);
if ($id < '1') {
header("Location: /akcii/");
}
if (empty($empty)) {
echo '
<div class="downsw">Удалить акцию</div>
<form action="del.php?id='.$id.'" method="POST">
<input type="hidden" name="empty" value="1" />
<input type="submit" class="form" value="Да" /> <a href="/akcii/"><input type="button" class="form" value="Нет" /></a>
</form>
';
} else {
$sql = @mysql_query("DELETE FROM `akcii` WHERE `id` = '$id'");
$sql_comm = @mysql_query("DELETE FROM `akcii_comment` WHERE `news_id` = '$id'");
if ($sql_comm && $sql) {
header("Location: /akcii/");
exit;
} else {echo ' <div class="menuindex">
Произошла ошибка!
</div>';
include "../header/end.inc.php";
break;
}
}
} else {
echo '<div class="menuindex">Как же достали эти хакеры!</div>';
include "../header/end.inc.php";
break;
}
include "../header/end.inc.php";
?>