[ 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 global $adb; 14 $idlist = $_REQUEST['idlist']; 15 16 if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '' && $_REQUEST['destination_module'] == 'Contacts') 17 { 18 //split the string and store in an array 19 $storearray = explode (";",$idlist); 20 foreach($storearray as $id) 21 { 22 if($id != '') 23 { 24 $record = $_REQUEST['parentid']; 25 $sql = "insert into vtiger_cntactivityrel values (".$id.",".$_REQUEST["parentid"].")"; 26 $adb->query($sql); 27 } 28 } 29 header("Location: index.php?action=CallRelatedList&module=Calendar&activity_mode=Events&record=".$record); 30 31 } 32 elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '' && $_REQUEST['destination_module'] == 'Contacts') 33 { 34 $record = $_REQUEST["parid"]; 35 $sql = "insert into vtiger_cntactivityrel values (". $_REQUEST["entityid"] .",".$_REQUEST["parid"] .")"; 36 $adb->query($sql); 37 header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); 38 } 39 40 41 42 43 //This if for adding the vtiger_users 44 if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '' && $_REQUEST['destination_module'] == 'Users') 45 { 46 //split the string and store in an array 47 $storearray = explode (";",$idlist); 48 foreach($storearray as $id) 49 { 50 if($id != '') 51 { 52 $record = $_REQUEST['parentid']; 53 $sql = "insert into vtiger_salesmanactivityrel values (".$id.",".$_REQUEST["parentid"].")"; 54 $adb->query($sql); 55 } 56 } 57 header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); 58 } 59 elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '' && $_REQUEST['destination_module'] == 'Users') 60 { 61 $record = $_REQUEST['parid']; 62 $sql = "insert into vtiger_salesmanactivityrel values (". $_REQUEST["entityid"] .",".$_REQUEST["parid"] .")"; 63 $adb->query($sql); 64 header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); 65 66 } 67 68 69 ?>
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 |