[ 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 //echo '<pre>'; print_r($_REQUEST['entityid']); echo '</pre>'; 17 18 if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '') 19 { 20 //split the strings & store in an array 21 $storearray = explode (";",$idlist); 22 foreach($storearray as $id) 23 { 24 if($id != '') 25 { 26 $record = $_REQUEST["parentid"]; 27 $sql = "insert into vtiger_seactivityrel values (". $adb->quote($id).",".$adb->quote($_REQUEST["parentid"]) .")"; 28 $adb->query($sql); 29 } 30 } 31 header("Location: index.php?action=CallRelatedList&module=Emails&record=".$record); 32 } 33 elseif (isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '') 34 { 35 $record = $_REQUEST["parid"]; 36 //$sql = "insert into vtiger_seactivityrel values (". $_REQUEST["entityid"] .",".$_REQUEST["parid"] .")"; 37 $sql = "insert into vtiger_seactivityrel values (". $adb->quote($_REQUEST["entityid"]).",".$adb->quote($_REQUEST["parid"]) .")"; 38 $adb->query($sql); 39 header("Location: index.php?action=CallRelatedList&module=Emails&record=".$record); 40 } 41 42 43 44 if(isset($_REQUEST['user_id']) && $_REQUEST['user_id'] != '') 45 { 46 $record = $_REQUEST['record']; 47 //$sql = "insert into vtiger_salesmanactivityrel values (". $_REQUEST["user_id"] .",".$_REQUEST["record"] .")"; 48 $sql = "insert into vtiger_salesmanactivityrel values (".$adb->quote($_REQUEST["user_id"]).",".$adb->quote($_REQUEST["record"]).")"; 49 $adb->query($sql); 50 header("Location: index.php?action=CallRelatedList&module=Emails&record=".$record); 51 } 52 53 54 ?>
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 |