[ 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 12 require_once ('include/database/PearDatabase.php'); 13 require_once ('user_privileges/default_module_view.php'); 14 global $adb, $singlepane_view; 15 16 $idlist = $_REQUEST['idlist']; 17 18 if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '') 19 { 20 //split the string and store in an array 21 $storearray = explode (";",$idlist); 22 foreach($storearray as $id) 23 { 24 if($id != '') 25 { 26 $sql = "insert into vtiger_vendorcontactrel values (".$_REQUEST["parentid"].",".$id.")"; 27 $adb->query($sql); 28 $sql = "insert into vtiger_seproductsrel values (". $_REQUEST["parentid"] .",".$id.")"; 29 $adb->query($sql); 30 } 31 } 32 if($singlepane_view == 'true') 33 header("Location: index.php?action=DetailView&module=Vendors&record=".$_REQUEST["parentid"]); 34 else 35 header("Location: index.php?action=CallRelatedList&module=Vendors&record=".$_REQUEST["parentid"]); 36 } 37 38 elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '') 39 { 40 41 $sql = "insert into vtiger_vendorcontactrel values (".$_REQUEST['parid'].",".$_REQUEST['entityid'].")"; 42 $adb->query($sql); 43 $sql = "insert into vtiger_seproductsrel values (". $_REQUEST["parid"] .",".$_REQUEST["entityid"] .")"; 44 $adb->query($sql); 45 if($singlepane_view == 'true') 46 header("Location: index.php?action=DetailView&module=Vendors&record=".$_REQUEST["parid"]); 47 else 48 header("Location:index.php?action=CallRelatedList&module=Vendors&record=".$_REQUEST["parid"]); 49 } 50 51 52 53 54 55 ?>
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 |