[ 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: /cvsroot/vtigercrm/vtiger_crm/modules/SalesOrder/Save.php,v 1.1 2005/12/16 04:13:15 mangai Exp $ 17 * Description: Saves an Account record and then redirects the browser to the 18 * defined return URL. 19 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. 20 * All Rights Reserved. 21 * Contributor(s): ______________________________________.. 22 ********************************************************************************/ 23 24 require_once ('modules/SalesOrder/SalesOrder.php'); 25 require_once ('include/logging.php'); 26 require_once ('include/database/PearDatabase.php'); 27 include ("modules/Emails/mail.php"); 28 29 $local_log =& LoggerManager::getLogger('index'); 30 31 $focus = new SalesOrder(); 32 setObjectValuesFromRequest(&$focus); 33 34 $focus->save("SalesOrder"); 35 36 $return_id = $focus->id; 37 38 if(isset($_REQUEST['parenttab']) && $_REQUEST['parenttab'] != "") $parenttab = $_REQUEST['parenttab']; 39 if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = $_REQUEST['return_module']; 40 else $return_module = "SalesOrder"; 41 if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = $_REQUEST['return_action']; 42 else $return_action = "DetailView"; 43 if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = $_REQUEST['return_id']; 44 45 $local_log->debug("Saved record with id of ".$return_id); 46 47 //code added for returning back to the current view after edit from list view 48 if($_REQUEST['return_viewname'] == '') $return_viewname='0'; 49 if($_REQUEST['return_viewname'] != '')$return_viewname=$_REQUEST['return_viewname']; 50 51 header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&viewname=$return_viewname&smodule=SO"); 52 53 ?>
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 |