print.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:2k
- <?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: print.php,v $
- // | $Date: 2004/02/10 01:34:25 $
- // | $Revision: 1.10 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - Printable ticket view.
- // +-------------------------------------------------------------+
- 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);
- ############################### PERMISSIONS AND VALIDATION ###############################
- // check ticket ref
- if (!$ticketref) {
- error("error_noticket");
- }
- // check user
- if (!$session[userid]) {
- login_form();
- }
- $ticket = $db->query_return("
- SELECT ticket.*, ticket_cat.name AS category, ticket_pri.name AS priority
- FROM ticket
- LEFT JOIN ticket_cat ON (ticket.category = ticket_cat.id)
- LEFT JOIN ticket_pri ON (ticket.priority = ticket_pri.id)
- WHERE ticket.ref = '" . addslashes($ticketref) . "'
- AND ticket.userid = '$session[userid]'
- ");
- if (!$db->num_rows()) {
- // no result returned
- error('error_noticket');
- }
- header('Content-Type: text/plain');