[ PHPXref.com ] [ Generated: Sun Jul 20 19:53:39 2008 ] [ PHProjekt 5.0.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/helpdesk/ -> helpdesk.php (source)

   1  <?php
   2  
   3  // helpdesk.php - PHProjekt Version 5.0

   4  // copyright  ©  2000-2005 Albrecht Guenther  ag@phprojekt.com

   5  // www.phprojekt.com

   6  // Author: Albrecht Guenther, $Author: nina $

   7  // $Id: helpdesk.php,v 1.26.2.1 2005/08/20 08:34:22 nina Exp $

   8  
   9  $module = 'helpdesk';
  10  $contextmenu = 1;
  11  
  12  $path_pre = '../';
  13  $include_path = $path_pre.'lib/lib.inc.php';
  14  include_once($include_path);
  15  
  16  helpdesk_init();
  17  
  18  $_SESSION['common']['module'] = 'helpdesk';
  19  
  20  // check whether there is a general rts mail in the config. if not, assign give the email of the user

  21  if (!PHPR_RTS_MAIL) $rts_mail = $user_email;
  22  else                $rts_mail = PHPR_RTS_MAIL;
  23  
  24  
  25  // access: = = n/a, 1 = internal, 2 = open. only solved requests with access = 2 are in the knowledge base

  26  $access = array( '0' => __('internal'), '2' => __('open') );
  27  
  28  // database cols according to user role

  29  $recipient_column = '9';  // to whom the ticket is assigned to

  30  $author_column    = '21'; // who has checked in this ticket

  31  
  32  
  33  // helpdesk states

  34  // field status:  0 = optional, 1 = mandatory, 2 = remove from workflow

  35  $helpdesk_states = array(
  36      array('mandatory' => 0, 'key' => '1', 'label' => __('unconfirmed')),
  37      array('mandatory' => 0, 'key' => '2', 'label' => __('new')),
  38      array('mandatory' => 1, 'key' => '3', 'label' => __('assigned')),
  39      array('mandatory' => 0, 'key' => '4', 'label' => __('reopened')),
  40      array('mandatory' => 0, 'key' => '5', 'label' => __('solved')), /* this state is a must state -> after reaching this state customers will be notified */
  41      array('mandatory' => 0, 'key' => '6', 'label' => __('verified')),
  42      array('mandatory' => 1, 'key' => '7', 'label' => __('closed'))
  43  );
  44  
  45  
  46  $status_arr = array();
  47  $hd_i = 1;
  48  foreach($helpdesk_states as $hd_state) {
  49      $status_arr[$hd_i] = array ($hd_state['key'], array($recipient_column, $author_column), $hd_state['mandatory'], $hd_state['label']);
  50      $hd_i++;
  51  }
  52  
  53  require_once ($path_pre.'lib/dbman_lib.inc.php');
  54  
  55  if (!$mode) $mode = "view";
  56  else        $mode = xss($mode);
  57  
  58  $ID = (int) $ID;
  59  
  60  $fields = build_array('helpdesk', $ID, $mode);
  61  
  62  $output = '';
  63  echo set_page_header();
  64  
  65  include_once ($path_pre.'lib/navigation.inc.php');
  66  echo '<div class="outer_content">';
  67  echo "<div class='content'>";
  68  include_once('./helpdesk_'.$mode.'.php');
  69  echo '</div>';
  70  echo '</div>';
  71  echo "\n</body>\n</html>\n";
  72  
  73  /**

  74   * initialize the helpdesk stuff and make some security checks

  75   *

  76   * @return void

  77   */
  78  function helpdesk_init() {
  79      global $ID, $mode, $output;
  80  
  81      $output = '';
  82  
  83      $ID = $_REQUEST['ID'] = (int) $_REQUEST['ID'];
  84  
  85      if (!isset($_REQUEST['mode']) || !in_array($_REQUEST['mode'], array('view', 'forms', 'data'))) {
  86          $_REQUEST['mode'] = 'view';
  87      }
  88      $mode = $_REQUEST['mode'];
  89  }
  90  
  91  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]