[ 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/database/PearDatabase.php'); 27 require_once ('include/utils/utils.php'); 28 29 global $mod_strings; 30 global $app_strings; 31 global $currentModule; 32 33 $focus = new Faq(); 34 35 if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) 36 { 37 $focus->retrieve_entity_info($_REQUEST['record'],"Faq"); 38 $focus->id = $_REQUEST['record']; 39 } 40 41 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 42 { 43 $focus->id = ""; 44 } 45 46 global $theme; 47 $theme_path="themes/".$theme."/"; 48 $image_path=$theme_path."images/"; 49 require_once ($theme_path.'layout_utils.php'); 50 51 $log->info("Faq detail view"); 52 $smarty = new vtigerCRM_Smarty; 53 $smarty->assign("MOD", $mod_strings); 54 $smarty->assign("APP", $app_strings); 55 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 56 57 if(isset($focus->column_fields[question])) 58 $smarty->assign("FAQ_TITLE", $focus->column_fields[question]); 59 60 $category = getParenttab(); 61 $smarty->assign("CATEGORY",$category); 62 63 $smarty->assign("THEME", $theme); 64 $smarty->assign("IMAGE_PATH", $image_path); 65 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 66 $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); 67 $smarty->assign("SINGLE_MOD",$currentModule); 68 $smarty->assign("MODULE",$currentModule); 69 70 $smarty->assign("ID", $_REQUEST['record']); 71 if(isPermitted("Faq","EditView",$_REQUEST['record']) == 'yes') 72 $smarty->assign("EDIT_DUPLICATE","permitted"); 73 74 if(isPermitted("Faq","Delete",$_REQUEST['record']) == 'yes') 75 $smarty->assign("DELETE","permitted"); 76 77 $check_button = Button_Check($module); 78 $smarty->assign("CHECK", $check_button); 79 $tabid = getTabid("Faq"); 80 $validationData = getDBValidationData($focus->tab_name,$tabid); 81 $data = split_validationdataArray($validationData); 82 83 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); 84 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); 85 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); 86 87 //Added to display the Faq comments information 88 $smarty->assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record'])); 89 $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record])); 90 $smarty->display("DetailView.tpl"); 91 ?>
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 |