ticketlist.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:3k
- <?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: ticketlist.php,v $
- // | $Date: 2004/02/10 01:34:25 $
- // | $Revision: 1.27 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - Ticket list pages (opened/resolved).
- // +-------------------------------------------------------------+
- error_reporting(E_ALL & ~E_NOTICE);
- require_once('./global.php');
- //Nullify WTN-WDYL Team
- check_user();
- $template_cache = templatecache('LIST_ticketlisting,HF_footer,HF_header');
- // globalise variables
- $global = array (
- array('open') // ticket open/closed
- );
- rg($global);
- if ($_REQUEST[open] == 1) {
- $page = 'open';
- } else {
- $page = 'closed';
- }
- ############################### GET CATEGORY / PRIORITY INFORMATION ###############################
- // categories
- $categories = user_category_array('view');
- $categories[0] = $dplang['none'];
- // priorities
- $priorities = user_priority_array('view');
- $priorities[0] = $dplang['none'];
- ############################### TICKET INFORMATION ###############################
- if (!$_REQUEST['all']) {
- $limit = "LIMIT 10";
- }
- $db->query("
- SELECT ticket.*
- FROM ticket
- WHERE userid = '$session[userid]'
- AND " . iff($_REQUEST['open'], 'is_open', '!is_open') . "
- ORDER BY " . iff($_REQUEST['open'], 'date_lastreply_tech DESC', 'date_closed DESC ') . " $limit"
- );
- $total = $db->num_rows();
- while ($result = $db->row_array()) {
- $result[priority] = $priorities[$result[priority]];
- $result[category] = $categories[$result[category]];
- if (!$result['tech']) {
- $result['tech'] = $dplang['unassigned'];
- }
- $result['subject'] = trimstring($result['subject'], 30, 1);
- if ($result['date_closed']) {
- $result['date_closed'] = our_date($result['date_closed']);
- } else {
- $result['date_closed'] = '';
- }
- if ($result['date_lastreply_tech']) {
- $result['date_lastreply_tech'] = our_date($result['date_lastreply_tech']);
- } else {
- $result['date_lastreply_tech'] = $dplang['n/a'];
- }
- $result['date_opened'] = our_date($result['date_opened']);
- $ticket[] = $result;
- }
- ############################### DISPLAY ###############################
- eval(makeeval('header', 'HF_header'));
- eval(makeeval('footer', 'HF_footer'));
- eval(makeeval('echo', 'LIST_ticketlisting'));
- ?>