<?

include '../../config.php';
include '../../func.php';
head();


$id = num($_GET['id']);
$new = mysql_fetch_assoc(mysql_query("SELECT * FROM `news` WHERE `id` = '".$id."'"));

if ( empty($new['id']) ) {
    
    echo link2 . 'Новость не найдена' . div;
    navig();
    foot();
    exit();
    
}

$result = mysql_query("DELETE FROM `news` WHERE `id` = '".$id."'");



    if ( $result != NULL ) {
        
        header('Location: index.php?mod=new_delete&result=good');
        
    } else {
        
        header('Location: index.php?mod=new_delete&result=error');
        
    }