index.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:4k
- <?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: index.php,v $
- // | $Date: 2004/02/12 21:16:57 $
- // | $Revision: 1.29 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - User interface index page (home).
- // +-------------------------------------------------------------+
- require_once('./global.php');
- //Nullify WTN-WDYL Team
- $template_cache = templatecache('FRONT_index,HF_footer,HF_header');
- ############################### ANNOUNCEMENTS ###############################
- $db->query('SELECT * FROM news ' .
- iff($session['userid'], 'WHERE logged_in', 'WHERE logged_out') . '
- ORDER BY date DESC');
- $news = array();
- while ($result = $db->row_array()) {
- $news[] = $result;
- }
- ############################### TICKETS FOR LOGGED IN USER ###############################
- if ($user[id]) {
- $o_tickets = $db->query_return_array("
- SELECT *
- FROM ticket
- WHERE userid = '$session[userid]'
- AND is_open
- ORDER BY date_lastreply_tech DESC"
- );
-
- $r_tickets = $db->query_return_array("
- SELECT *
- FROM ticket
- WHERE userid = '$session[userid]'
- AND !is_open
- ORDER BY date_closed DESC"
- );
- if (is_array($o_tickets)) {
- foreach ($o_tickets AS $result) {
- $result['subject'] = trimstring($result['subject'], 30, 1);
- if (!$result['ref']) {
- force_refs();
- }
- if ($result['date_opened']) {
- $result['date_opened'] = our_date($result['date_opened']);
- }
- if ($result['date_lastreply']) {
- $result['date_lastreply'] = our_date($result['date_lastreply']);
- }
- if ($result['date_closed']) {
- $result['date_closed'] = our_date($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'];
- }
- if (count($oticket) < 5) {
- $oticket[] = $result;
- } else {
- $oticket_more++;
- }
- }
- }
- if (is_array($r_tickets)) {
- foreach ($r_tickets AS $result) {
- $result['subject'] = trimstring($result['subject'], 30, 1);
- if (!$result['ref']) {
- force_refs();
- }
- if ($result['date_opened']) {
- $result['date_opened'] = our_date($result['date_opened']);
- }
- if ($result['date_lastreply']) {
- $result['date_lastreply'] = our_date($result['date_lastreply']);
- }
- if ($result['date_closed']) {
- $result['date_closed'] = our_date($result['date_closed']);
- }
- if ($result['date_lastreply_tech']) {
- $result['date_lastreply_tech'] = our_date($result['date_lastreply_tech']);
- }
- if ($result['awaiting_tech']) {
- $result['awaiting_tech'] = $dplang['tech_reply'];
- } else {
- $result['awaiting_tech'] = $dplang['your_reply'];
- }
- if (count($rticket) < 5) {
- $rticket[] = $result;
- } else {
- $rticket_more++;
- }
- }
- }
- }
- ############################### DISPLAY PAGE ###############################
- eval(makeeval('header', 'HF_header'));
- eval(makeeval('footer', 'HF_footer'));
- eval(makeeval('echo', 'FRONT_index'));