[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 /********************************************************************************* 3 * The contents of this file are subject to the SugarCRM Public License Version 1.1.2 4 * ("License"); You may not use this file except in compliance with the 5 * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL 6 * Software distributed under the License is distributed on an "AS IS" basis, 7 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 8 * the specific language governing rights and limitations under the License. 9 * The Original Code is: SugarCRM Open Source 10 * The Initial Developer of the Original Code is SugarCRM, Inc. 11 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.; 12 * All Rights Reserved. 13 * Contributor(s): ______________________________________. 14 ********************************************************************************/ 15 /********************************************************************************* 16 * $Header$ 17 * Description: TODO To be written. 18 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. 19 * All Rights Reserved. 20 * Contributor(s): ______________________________________.. 21 ********************************************************************************/ 22 23 require_once ('Smarty_setup.php'); 24 require_once ('modules/Faq/Faq.php'); 25 require_once ('include/CustomFieldUtil.php'); 26 require_once ('include/ComboUtil.php'); 27 require_once ('include/utils/utils.php'); 28 require_once ('include/FormValidationUtil.php'); 29 30 global $app_strings; 31 global $mod_strings; 32 global $current_user; 33 global $currentModule; 34 35 $focus = new Faq(); 36 $smarty = new vtigerCRM_Smarty(); 37 38 if(isset($_REQUEST['record'])) 39 { 40 $focus->id = $_REQUEST['record']; 41 $focus->mode = 'edit'; 42 $focus->retrieve_entity_info($_REQUEST['record'],"Faq"); 43 } 44 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 45 { 46 $focus->id = ""; 47 $focus->mode = ''; 48 } 49 50 global $theme; 51 $theme_path="themes/".$theme."/"; 52 $image_path=$theme_path."images/"; 53 54 require_once ($theme_path.'layout_utils.php'); 55 56 $disp_view = getView($focus->mode); 57 if($disp_view == 'edit_view') 58 $smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields)); 59 else 60 { 61 $smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS')); 62 } 63 64 $smarty->assign("OP_MODE",$disp_view); 65 66 $smarty->assign("MODULE",$currentModule); 67 $smarty->assign("SINGLE_MOD",$currentModule); 68 $smarty->assign("MOD", $mod_strings); 69 $smarty->assign("APP", $app_strings); 70 71 $smarty->assign("ID", $focus->id); 72 if(isset($focus->column_fields[question])) 73 $smarty->assign("NAME", $focus->column_fields[question]); 74 75 $category = getParentTab(); 76 $smarty->assign("CATEGORY",$category); 77 78 if($focus->mode == 'edit') 79 { 80 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 81 $smarty->assign("MODE", $focus->mode); 82 } 83 84 if(isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']); 85 else $smarty->assign("RETURN_MODULE","Faq"); 86 if(isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']); 87 else $smarty->assign("RETURN_ACTION","index"); 88 if(isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", $_REQUEST['return_id']); 89 90 $smarty->assign("THEME", $theme); 91 $smarty->assign("IMAGE_PATH", $image_path); 92 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 93 94 $smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); 95 $smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); 96 97 98 $tabid = getTabid("Faq"); 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 Faq comments information 112 $smarty->assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record'])); 113 } 114 115 if($focus->mode == 'edit') 116 $smarty->display("salesEditView.tpl"); 117 else 118 $smarty->display("CreateView.tpl"); 119 ?>
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 |