[ 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: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Notes/DetailView.php,v 1.11 2005/03/17 11:21:40 ray Exp $ 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 ('data/Tracker.php'); 24 require_once ('Smarty_setup.php'); 25 require_once ('modules/Notes/Notes.php'); 26 require_once ('include/upload_file.php'); 27 require_once ('include/utils/utils.php'); 28 global $app_strings; 29 global $mod_strings; 30 global $currentModule; 31 32 $focus = new Notes(); 33 34 if(isset($_REQUEST['record'])) { 35 $focus->retrieve_entity_info($_REQUEST['record'],"Notes"); 36 $focus->id = $_REQUEST['record']; 37 $focus->name=$focus->column_fields['notes_title']; 38 } 39 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { 40 $focus->id = ""; 41 } 42 43 //needed when creating a new note with default values passed in 44 if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { 45 $focus->contact_name = $_REQUEST['contact_name']; 46 } 47 if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) { 48 $focus->contact_id = $_REQUEST['contact_id']; 49 } 50 if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name)) { 51 $focus->parent_name = $_REQUEST['opportunity_name']; 52 } 53 if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id)) { 54 $focus->parent_id = $_REQUEST['opportunity_id']; 55 } 56 if (isset($_REQUEST['account_name']) && is_null($focus->parent_name)) { 57 $focus->parent_name = $_REQUEST['account_name']; 58 } 59 if (isset($_REQUEST['account_id']) && is_null($focus->parent_id)) { 60 $focus->parent_id = $_REQUEST['account_id']; 61 } 62 63 global $theme; 64 $theme_path="themes/".$theme."/"; 65 $image_path=$theme_path."images/"; 66 require_once ($theme_path.'layout_utils.php'); 67 68 $log->info("Note detail view"); 69 70 $smarty = new vtigerCRM_Smarty; 71 $smarty->assign("MOD", $mod_strings); 72 $smarty->assign("APP", $app_strings); 73 $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); 74 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 75 76 77 if (isset($focus->name)) $smarty->assign("NAME", $focus->name); 78 else $smarty->assign("NAME", ""); 79 80 if (isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']); 81 if (isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']); 82 if (isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", $_REQUEST['return_id']); 83 84 $smarty->assign("THEME", $theme); 85 $smarty->assign("IMAGE_PATH", $image_path); 86 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 87 $smarty->assign("ID", $focus->id); 88 $category = getParentTab(); 89 $smarty->assign("CATEGORY",$category); 90 91 if ( isset($focus->filename) && $focus->filename != '') 92 { 93 $fileurl = "<a href=\"".UploadFile::get_url($focus->filename,$focus->id)."\" target=\"_blank\">". $focus->filename ."</a>"; 94 $smarty->assign("FILELINK", $fileurl); 95 } 96 97 $smarty->assign("SINGLE_MOD", 'Note'); 98 99 if(isPermitted("Notes","EditView",$_REQUEST['record']) == 'yes') 100 $smarty->assign("EDIT_DUPLICATE","permitted"); 101 102 if(isPermitted("Notes","Delete",$_REQUEST['record']) == 'yes') 103 $smarty->assign("DELETE","permitted"); 104 105 $check_button = Button_Check($module); 106 $smarty->assign("CHECK", $check_button); 107 $tabid = getTabid("Notes"); 108 $validationData = getDBValidationData($focus->tab_name,$tabid); 109 $data = split_validationdataArray($validationData); 110 111 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); 112 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); 113 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); 114 115 $smarty->assign("MODULE",$currentModule); 116 $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record])); 117 $smarty->display("DetailView.tpl"); 118 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 |