[ 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 require_once ('Smarty_setup.php'); 16 require_once ('data/Tracker.php'); 17 require_once ('modules/Leads/Leads.php'); 18 require_once ('include/database/PearDatabase.php'); 19 require_once ('include/CustomFieldUtil.php'); 20 require_once ('include/utils/utils.php'); 21 require_once ('include/utils/UserInfoUtil.php'); 22 require_once ('user_privileges/default_module_view.php'); 23 24 global $mod_strings; 25 global $app_strings; 26 global $currentModule, $singlepane_view; 27 global $log; 28 $focus = new Leads(); 29 30 if(isset($_REQUEST['record'])) 31 { 32 $focus->id = $_REQUEST['record']; 33 34 $focus->retrieve_entity_info($_REQUEST['record'],"Leads"); 35 $focus->id = $_REQUEST['record']; 36 $log->debug("id is ".$focus->id); 37 $focus->firstname=$focus->column_fields['firstname']; 38 $focus->lastname=$focus->column_fields['lastname']; 39 40 } 41 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { 42 $focus->id = ""; 43 } 44 45 global $theme; 46 $theme_path="themes/".$theme."/"; 47 $image_path=$theme_path."images/"; 48 require_once ($theme_path.'layout_utils.php'); 49 50 $log->info("Lead detail view"); 51 52 $smarty = new vtigerCRM_Smarty; 53 $smarty->assign("MOD", $mod_strings); 54 $smarty->assign("APP", $app_strings); 55 56 $smarty->assign("THEME", $theme); 57 $smarty->assign("IMAGE_PATH", $image_path); 58 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 59 $smarty->assign("ID", $focus->id); 60 $smarty->assign("SINGLE_MOD", 'Lead'); 61 $smarty->assign("REDIR_MOD","leads"); 62 63 $smarty->assign("NAME",$focus->lastname.' '.$focus->firstname); 64 65 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 66 $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); 67 $smarty->assign("CUSTOMFIELD", $cust_fld); 68 69 if(useInternalMailer() == 1) 70 $smarty->assign("INT_MAILER","true"); 71 72 73 $val = isPermitted("Leads","EditView",$_REQUEST['record']); 74 75 if(isPermitted("Leads","EditView",$_REQUEST['record']) == 'yes') 76 $smarty->assign("EDIT_DUPLICATE","permitted"); 77 78 79 if(isPermitted("Leads","ConvertLead") =='yes' && isPermitted("Accounts","EditView") =='yes' && isPermitted("Contacts","EditView")) 80 { 81 $smarty->assign("CONVERTLEAD","permitted"); 82 } 83 84 $category = getParentTab(); 85 $smarty->assign("CATEGORY",$category); 86 87 88 if(isPermitted("Leads","Delete",$_REQUEST['record']) == 'yes') 89 $smarty->assign("DELETE","permitted"); 90 91 if(isPermitted("Emails","EditView",'') == 'yes') 92 { 93 //Added to pass the parents list as hidden for Emails -- 09-11-2005 94 $parent_email = getEmailParentsList('Leads',$_REQUEST['record']); 95 $smarty->assign("HIDDEN_PARENTS_LIST",$parent_email); 96 $smarty->assign("SENDMAILBUTTON","permitted"); 97 } 98 99 if(isPermitted("Leads","Merge",'') == 'yes') 100 { 101 $smarty->assign("MERGEBUTTON","permitted"); 102 $wordTemplateResult = fetchWordTemplateList("Leads"); 103 $tempCount = $adb->num_rows($wordTemplateResult); 104 $tempVal = $adb->fetch_array($wordTemplateResult); 105 for($templateCount=0;$templateCount<$tempCount;$templateCount++) 106 { 107 $optionString[$tempVal["templateid"]] =$tempVal["filename"]; 108 $tempVal = $adb->fetch_array($wordTemplateResult); 109 } 110 $smarty->assign("WORDTEMPLATEOPTIONS",$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']); 111 $smarty->assign("TOPTIONS",$optionString); 112 } 113 114 $tabid = getTabid("Leads"); 115 $validationData = getDBValidationData($focus->tab_name,$tabid); 116 $data = split_validationdataArray($validationData); 117 118 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); 119 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); 120 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); 121 122 $check_button = Button_Check($module); 123 $smarty->assign("CHECK", $check_button); 124 125 $smarty->assign("MODULE", $currentModule); 126 $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record])); 127 128 if($singlepane_view == 'true') 129 { 130 $related_array = getRelatedLists($currentModule,$focus); 131 $smarty->assign("RELATEDLISTS", $related_array); 132 } 133 134 $smarty->assign("SinglePane_View", $singlepane_view); 135 136 $smarty->display("DetailView.tpl"); 137 138 ?>
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 |