[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/HelpDesk/ -> DetailView.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  
  12  require_once ('include/database/PearDatabase.php');
  13  require_once ('Smarty_setup.php');
  14  require_once ('modules/HelpDesk/HelpDesk.php');
  15  require_once ('include/utils/utils.php');
  16  require_once ('user_privileges/default_module_view.php');
  17  
  18  $focus = new HelpDesk();
  19  
  20  if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) 
  21  {
  22      $focus->retrieve_entity_info($_REQUEST['record'],"HelpDesk");
  23      $focus->name=$focus->column_fields['ticket_title'];
  24  }
  25  
  26  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 
  27  {
  28          $focus->id = "";
  29  }
  30  
  31  //Added code for Error display in sending mail to assigned to user when ticket is created or updated.
  32  if($_REQUEST['mail_error'] != '')
  33  {
  34          require_once ("modules/Emails/mail.php");
  35          echo parseEmailErrorString($_REQUEST['mail_error']);
  36  }
  37  
  38  global $app_strings;
  39  global $mod_strings;
  40  global $currentModule, $singlepane_view;
  41  
  42  global $theme;
  43  $theme_path="themes/".$theme."/";
  44  $image_path=$theme_path."images/";
  45  require_once ($theme_path.'layout_utils.php');
  46  
  47  $smarty = new vtigerCRM_Smarty;
  48  $smarty->assign("MOD", $mod_strings);
  49  $smarty->assign("APP", $app_strings);
  50  
  51  $focus->id = $_REQUEST['record'];
  52  if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
  53  else $smarty->assign("NAME", "");
  54  $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
  55  $smarty->assign("TICKETID", $_REQUEST['record']);
  56  
  57  $smarty->assign("CUSTOMFIELD", $cust_fld);
  58  $smarty->assign("SINGLE_MOD", 'HelpDesk');
  59  $category = getParentTab();
  60  $smarty->assign("CATEGORY",$category);
  61  $smarty->assign("UPDATEINFO",updateInfo($_REQUEST['record']));
  62  
  63  if(isPermitted("HelpDesk","EditView",$_REQUEST['record']) == 'yes')
  64      $smarty->assign("EDIT_DUPLICATE","permitted");
  65  
  66  if(isPermitted("HelpDesk","Delete",$_REQUEST['record']) == 'yes')
  67      $smarty->assign("DELETE","permitted");
  68  
  69  //Added button for Convert the ticket to FAQ
  70  if(isPermitted("Faq","EditView",'') == 'yes')
  71      $smarty->assign("CONVERTASFAQ","permitted");
  72  
  73  $smarty->assign("IMAGE_PATH", $image_path);
  74  $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  75  $smarty->assign("ID", $_REQUEST['record']);
  76  if(isPermitted("HelpDesk","Merge",'') == 'yes')
  77  {
  78      $smarty->assign("MERGEBUTTON","permitted");
  79          require_once ('include/utils/UserInfoUtil.php');
  80          $wordTemplateResult = fetchWordTemplateList("HelpDesk");
  81          $tempCount = $adb->num_rows($wordTemplateResult);
  82          $tempVal = $adb->fetch_array($wordTemplateResult);
  83          for($templateCount=0;$templateCount<$tempCount;$templateCount++)
  84          {
  85                  $optionString[$tempVal["templateid"]]=$tempVal["filename"];
  86                  $tempVal = $adb->fetch_array($wordTemplateResult);
  87          }
  88      $smarty->assign("WORDTEMPLATEOPTIONS",$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']);
  89          $smarty->assign("TOPTIONS",$optionString);
  90  }
  91  
  92  $check_button = Button_Check($module);
  93  $smarty->assign("CHECK", $check_button);
  94  
  95  $tabid = getTabid("HelpDesk");
  96  $validationData = getDBValidationData($focus->tab_name,$tabid);
  97  $data = split_validationdataArray($validationData);
  98  $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
  99  $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
 100  $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
 101  
 102  //Added to display the ticket comments information
 103  $smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record']));
 104  
 105  $smarty->assign("MODULE",$currentModule);
 106  $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
 107  
 108  if($singlepane_view == 'true')
 109  {
 110      $related_array = getRelatedLists($currentModule,$focus);
 111      $smarty->assign("RELATEDLISTS", $related_array);
 112  }
 113  
 114  $smarty->assign("SinglePane_View", $singlepane_view);
 115  
 116  $smarty->display("DetailView.tpl");
 117  
 118  
 119  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7