Файл: api_forum/delete_subforum.php
Строк: 14
<?
////////////////////////////////////////
///// Kyber ApiCMS 2013 apicms.ru //////
///// Запрещается продажа данной CMS ///
///// Автор Евгений Медянкин Kyber /////
///// ICQ 626-000-895 или 37-22-47 /////
////////////////////////////////////////
/////////////////////////////////////////
$title = 'Удаление';
require_once '../api_core/apicms_system.php';
require_once '../design/styles/'.htmlspecialchars($api_design).'/head.php';
/////////////////////////////////////////
if ($user['level'] < 1) header('location: index.php');
if ($user['level'] >= 1){
if (isset($_GET['id']) && $user['level']>=1 && mysql_result(mysql_query("SELECT COUNT(*) FROM `api_forum_subforum` WHERE `id` = '".intval($_GET['id'])."'"),0)==1){
$post=mysql_fetch_assoc(mysql_query("SELECT * FROM `api_forum_subforum` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1"));
mysql_query("DELETE FROM `api_forum_subforum` WHERE `id` = '$post[id]'");
header("Location: index.php");
}
}else{
echo '<div class="erors">Ошибка доступа</div>';
}
//////////////////////////////////////////
require_once '../design/styles/'.htmlspecialchars($api_design).'/footer.php';
?>