[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/HelpDesk/ -> EditView.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  require_once ('include/database/PearDatabase.php');
  12  require_once ('Smarty_setup.php');
  13  require_once ('include/utils/utils.php');
  14  require_once ('modules/HelpDesk/HelpDesk.php');
  15  require_once ('include/FormValidationUtil.php');
  16  
  17  global $app_strings,$mod_strings,$theme,$currentModule;
  18  
  19  $focus = new HelpDesk();
  20  $smarty = new vtigerCRM_Smarty();
  21  
  22  if(isset($_REQUEST['record']) && $_REQUEST['record'] !='') 
  23  {
  24      $focus->id = $_REQUEST['record'];
  25      $focus->mode = 'edit';     
  26      $focus->retrieve_entity_info($_REQUEST['record'],"HelpDesk");
  27      $focus->name=$focus->column_fields['ticket_title'];        
  28  }
  29  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 
  30  {
  31      $old_id = $_REQUEST['record'];
  32      if (! empty($focus->filename) )
  33      {    
  34          $old_id = $focus->id;
  35      }
  36      $focus->id = "";
  37          $focus->mode = '';     
  38  } 
  39  
  40  $theme_path="themes/".$theme."/";
  41  $image_path=$theme_path."images/";
  42  require_once ($theme_path.'layout_utils.php');
  43  
  44  $disp_view = getView($focus->mode);
  45  if($disp_view == 'edit_view')
  46      $smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
  47  else    
  48  {
  49      $smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS'));
  50  }
  51  
  52  $smarty->assign("OP_MODE",$disp_view);
  53  
  54  $smarty->assign("MODULE",$currentModule);
  55  $smarty->assign("SINGLE_MOD",'Ticket');
  56  
  57  
  58  $category = getParentTab();
  59  $smarty->assign("CATEGORY",$category);
  60  
  61  $smarty->assign("MOD", $mod_strings);
  62  $smarty->assign("APP", $app_strings);
  63  $smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
  64  
  65  if (isset($focus->name)) 
  66  $smarty->assign("NAME", $focus->name);
  67  else 
  68  $smarty->assign("NAME", "");
  69  
  70  if(isset($cust_fld))
  71  {
  72          $smarty->assign("CUSTOMFIELD", $cust_fld);
  73  }
  74  $smarty->assign("ID", $focus->id);
  75  $smarty->assign("OLD_ID", $old_id );
  76  if($focus->mode == 'edit')
  77  {
  78      $smarty->assign("UPDATEINFO",updateInfo($focus->id));
  79          $smarty->assign("MODE", $focus->mode);
  80          $smarty->assign("OLDSMOWNERID", $focus->column_fields['assigned_user_id']);
  81  }
  82  
  83  if(isset($_REQUEST['return_module'])) 
  84  $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
  85  if(isset($_REQUEST['return_action'])) 
  86  $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
  87  if(isset($_REQUEST['return_id'])) 
  88  $smarty->assign("RETURN_ID", $_REQUEST['return_id']);
  89  if(isset($_REQUEST['product_id'])) 
  90  $smarty->assign("PRODUCTID", $_REQUEST['product_id']);
  91  if (isset($_REQUEST['return_viewname'])) 
  92  $smarty->assign("RETURN_VIEWNAME", $_REQUEST['return_viewname']);
  93  
  94  $smarty->assign("THEME", $theme);
  95  $smarty->assign("IMAGE_PATH", $image_path);
  96  $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  97  
  98  $tabid = getTabid("HelpDesk");
  99  $validationData = getDBValidationData($focus->tab_name,$tabid);
 100  $data = split_validationdataArray($validationData);
 101  
 102  $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
 103  $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
 104  $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
 105  
 106  $check_button = Button_Check($module);
 107  $smarty->assign("CHECK", $check_button);
 108  
 109  if($_REQUEST['record'] != '')
 110  {
 111      //Added to display the ticket comments information
 112      $smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record']));
 113  }
 114  
 115  if($focus->mode == 'edit')
 116      $smarty->display("salesEditView.tpl");
 117  else
 118      $smarty->display("CreateView.tpl");
 119  
 120  ?>


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