Вход Регистрация
Файл: api_forum/delete_post.php
Строк: 15
<?

////////////////////////////////////////
///// 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';
/////////////////////////////////////////
$theme_id intval($_GET['theme']);
/////////////////////////////////////////
if (!isset($user)) header('location: index.php');
if (isset(
$_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `api_forum_post` WHERE `id` = '".intval($_GET['id'])."'"),0)==&& mysql_result(mysql_query("SELECT COUNT(*) FROM `api_forum_theme` WHERE `id` = '".$theme_id."'"),0)==1){
$post=mysql_fetch_assoc(mysql_query("SELECT * FROM `api_forum_post` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1"));
if (isset(
$user) && $user['id'] == $post['id_user'] or $user['level']==or $user['level']==&& $post['delete']==0){
$msg 'Сообщение удалено';
mysql_query("UPDATE `api_forum_post` SET `text` = '$msg', `delete` = '1', `delete_time` = '$time' WHERE `id` = '$post[id]' LIMIT 1");
header("Location: theme.php?id=".$theme_id."");
}
}else{
echo 
"<div class='erors'>Ошибка удаления</div>n";
}
//////////////////////////////////////////
require_once '../design/styles/'.htmlspecialchars($api_design).'/footer.php';
?>
Онлайн: 1
Реклама