File size: 643B
<?php
#######################################
### Тикет система для JohnCMS 3.2.2 ###
### Автор скрипта: desay ###
### ICQ: 640-976-131 ###
#######################################
defined('_IN_JOHNCMS') or die('Error: restricted access');
if ($rights < 7 || !$id) {
header('Location: index.php');
exit;
}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ticket` WHERE `id` = '$id' AND `type` = '2'"), 0)) {
mysql_query("DELETE from `ticket` WHERE `id` = '$id'");
header("Location: index.php?act=read&id=$do");
}else {
header("Location: index.php?");
}
?>