File size: 778B
<?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 (isset($_GET['open']))
$status = 1;
if (isset($_GET['smotr']))
$status = 2;
if (isset($_GET['close']))
$status = 3;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ticket` WHERE `id` = '$id' AND `type` = '1'"), 0)) {
mysql_query("UPDATE `ticket` SET `status` = '$status' WHERE `id` = '$id'");
header("Location: index.php?act=read&id=$id");
}else {
header("Location: index.php");
}
?>