View file admin/w_comment.php

File size: 609B
<?php
include_once('../system/config.php');
$sys['title'] = 'Админ-панель';
include_once('../system/head.php');

if ($user) {

$comm = mysql_fetch_assoc(mysql_query("SELECT * FROM `comment` WHERE `id` = '".int($_GET['id'])."'"));
if(!$comm) {
echo '<div class="error">Ошибка ! Такого сообщения нет</div>';
include_once('../system/foot.php');
exit;
}

mysql_query("DELETE FROM `comment` WHERE `id` = '".int($_GET['id'])."' ");
header('Location: http://'. $_SERVER['HTTP_HOST'] .'/comment-'.int($_GET['id_note']).'.xhtml/page=end'); 

}

include_once('../system/foot.php');
?>