File size: 536B
<?php
define('HOME', $_SERVER[DOCUMENT_ROOT]);
include_once HOME.'/sys/inc/start.php';
$doc = new document();
$act = htmlspecialchars($_GET["act"]);
$news = intval($_GET["news"]);
$query = mysql_query("SELECT * FROM `wn_news` WHERE `id` = '$news'");
if($row = mysql_fetch_array($query)){
if($act == 'del'){
mysql_query("UPDATE `wn_news` SET `status` = '0' WHERE `id` = '$news'") or die(mysql_error());
header("Location: /worldnews?d=done");
}
}else{
header("Location: /worldnews?d=notexist");
}
?>