<?

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


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

if ( empty($blog['id']) ) {
    
    echo link2 . 'Блог не найден' . div;
    navig();
    foot();
    exit();
    
}

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



    if ( $result != NULL ) {
        
        
        echo rew('index.php?mod=blog_delete&result=good');
        
    } else {
        
        
        echo rew('index.php?mod=blog_delete&result=error');
        
    }