⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ticketactions.php

📁 jsp程序开发系统
💻 PHP
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: ticketactions.php,v $
// | $Date: 2004/02/10 01:34:25 $
// | $Revision: 1.12 $
// +-------------------------------------------------------------+
// | File Details:
// | - Ticket actions handler (close/reopen).
// +-------------------------------------------------------------+

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
//Nullify WTN-WDYL Team

// default do
$_REQUEST['do'] = trim($_REQUEST['do']);
if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
	$_REQUEST['do'] = "view";
}

// globalise variables
$global = array	(
			array('ticketref')
);
rg($global);

############################### GENERAL PERMISSIONS ###############################

// check ticket ref
if (!$ticketref) {
	error("error_noticket");
}

check_user();

$ticket = $db->query_return("
	SELECT ticket.*
	FROM ticket
	WHERE	ticket.ref = '" . addslashes($ticketref) . "' AND
			ticket.userid = $session[userid]
");

if (!$db->num_rows()) {
	// no result returned
	error('error_noticket');
}

############################### REOPEN A CLOSED TICKET ###############################

if ($_REQUEST['do'] == "reopen") {

	if ($settings[user_reopen] != "1") {
		echo error("VIEW_error_reopen");
	}

	$db->query("UPDATE ticket SET is_open = '1' WHERE id = '$ticket[id]'");
	ticketlog($ticket['id'], 'reopen');
	jump("view.php?ticketref=$ticketref", "redirect_ticket_opened");

}

############################### CLOSE A OPEN TICKET ###############################

if ($_REQUEST['do'] == "close") {
	
	$db->query("
		UPDATE ticket 
		SET is_open = '0', 
			date_closed = '" . mktime() . "'
		WHERE id = '$ticket[id]'
	");
	
	ticketlog($ticket['id'], 'close');
	jump("ticketlist.php?open=1", "redirect_ticket_closed");

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -