[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
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/logging.php'); 13 require_once ('modules/HelpDesk/HelpDesk.php'); 14 require_once ('include/database/PearDatabase.php'); 15 global $adb; 16 17 $local_log =& LoggerManager::getLogger('HelpDeskAjax'); 18 19 $ajaxaction = $_REQUEST["ajxaction"]; 20 if($ajaxaction == "DETAILVIEW") 21 { 22 $crmid = $_REQUEST["recordid"]; 23 $tablename = $_REQUEST["tableName"]; 24 $fieldname = $_REQUEST["fldName"]; 25 $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); 26 27 if($crmid != "") 28 { 29 $modObj = new HelpDesk(); 30 $modObj->retrieve_entity_info($crmid,"HelpDesk"); 31 32 //Added to avoid the comment save, when we edit other fields through ajax edit 33 if($fieldname != 'comments') 34 $modObj->column_fields['comments'] = ''; 35 36 $modObj->column_fields[$fieldname] = $fieldvalue; 37 $modObj->id = $crmid; 38 $modObj->mode = "edit"; 39 40 //Added to construct the update log for Ticket history 41 $assigned_group_name = $_REQUEST['assigned_group_name']; 42 $assigntype = $_REQUEST['assigntype']; 43 44 $fldvalue = $modObj->constructUpdateLog(&$modObj, $modObj->mode, $assigned_group_name, $assigntype); 45 $fldvalue = from_html($adb->formatString('vtiger_troubletickets','update_log',$fldvalue),($modObj->mode == 'edit')?true:false); 46 47 $modObj->save("HelpDesk"); 48 49 //update the log information for ticket history 50 $adb->query("update vtiger_troubletickets set update_log=$fldvalue where ticketid=".$modObj->id); 51 52 if($modObj->id != "") 53 { 54 echo ":#:SUCCESS"; 55 }else 56 { 57 echo ":#:FAILURE"; 58 } 59 }else 60 { 61 echo ":#:FAILURE"; 62 } 63 } 64 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |