| [ 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 require_once ('include/database/PearDatabase.php'); 12 require_once ('Smarty_setup.php'); 13 require_once ('include/utils/utils.php'); 14 require_once ('modules/Campaigns/Campaigns.php'); 15 require_once ('include/FormValidationUtil.php'); 16 17 global $app_strings,$mod_strings,$currentModule,$theme; 18 19 $focus = new Campaigns(); 20 $smarty = new vtigerCRM_Smarty(); 21 22 if(isset($_REQUEST['record']) && $_REQUEST['record'] !='') 23 { 24 $focus->id = $_REQUEST['record']; 25 $focus->mode = 'edit'; 26 $focus->retrieve_entity_info($_REQUEST['record'],"Campaigns"); 27 $focus->name=$focus->column_fields['campaignname']; 28 } 29 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 30 { 31 $focus->id = ""; 32 $focus->mode = ''; 33 } 34 35 $theme_path="themes/".$theme."/"; 36 $image_path=$theme_path."images/"; 37 require_once ($theme_path.'layout_utils.php'); 38 39 $disp_view = getView($focus->mode); 40 if($disp_view == 'edit_view') 41 $smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields)); 42 else 43 { 44 $smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS')); 45 } 46 47 $smarty->assign("OP_MODE",$disp_view); 48 49 $smarty->assign("MODULE",$currentModule); 50 $smarty->assign("SINGLE_MOD",'Campaign'); 51 52 53 $category = getParentTab(); 54 $smarty->assign("CATEGORY",$category); 55 56 $smarty->assign("MOD", $mod_strings); 57 $smarty->assign("APP", $app_strings); 58 $smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); 59 60 if (isset($focus->name)) 61 $smarty->assign("NAME", $focus->name); 62 else 63 $smarty->assign("NAME", ""); 64 65 if(isset($cust_fld)) 66 { 67 $smarty->assign("CUSTOMFIELD", $cust_fld); 68 } 69 $smarty->assign("ID", $focus->id); 70 if($focus->mode == 'edit') 71 { 72 $smarty->assign("MODE", $focus->mode); 73 $smarty->assign("OLDSMOWNERID", $focus->column_fields['assigned_user_id']); 74 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 75 } 76 77 if(isset($_REQUEST['return_module'])) 78 $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']); 79 if(isset($_REQUEST['return_action'])) 80 $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']); 81 if(isset($_REQUEST['return_id'])) 82 $smarty->assign("RETURN_ID", $_REQUEST['return_id']); 83 if(isset($_REQUEST['product_id'])) 84 $smarty->assign("PRODUCTID", $_REQUEST['product_id']); 85 if (isset($_REQUEST['return_viewname'])) 86 $smarty->assign("RETURN_VIEWNAME", $_REQUEST['return_viewname']); 87 88 $smarty->assign("THEME", $theme); 89 $smarty->assign("IMAGE_PATH", $image_path); 90 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 91 92 $tabid = getTabid("Campaigns"); 93 $validationData = getDBValidationData($focus->tab_name,$tabid); 94 $data = split_validationdataArray($validationData); 95 96 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); 97 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); 98 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); 99 100 $check_button = Button_Check($module); 101 $smarty->assign("CHECK", $check_button); 102 103 if($focus->mode == 'edit') 104 $smarty->display("salesEditView.tpl"); 105 else 106 $smarty->display("CreateView.tpl"); 107 108 ?>
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 |