[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 3 /********************************************************************************* 4 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 5 * ("License"); You may not use this file except in compliance with the License 6 * The Original Code is: vtiger CRM Open Source 7 * The Initial Developer of the Original Code is vtiger. 8 * Portions created by vtiger are Copyright (C) vtiger. 9 * All Rights Reserved. 10 * 11 ********************************************************************************/ 12 13 require_once ('include/database/PearDatabase.php'); 14 require_once ('include/utils/utils.php'); 15 16 17 $sql="select fieldid from vtiger_field, vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Leads';"; 18 $result = $adb->query($sql); 19 $noofrows = $adb->num_rows($result); 20 21 for($i=0;$i<$noofrows;$i++) 22 { 23 $lead_id=$adb->query_result($result,$i,"fieldid"); 24 $account_id_name=$lead_id."_account"; 25 $contact_id_name=$lead_id."_contact"; 26 $potential_id_name=$lead_id."_potential"; 27 28 $account_id_val=$_REQUEST[$account_id_name]; 29 $contact_id_val=$_REQUEST[$contact_id_name]; 30 $potential_id_val=$_REQUEST[$potential_id_name]; 31 32 if($account_id_val=="None") 33 { 34 $account_id_val=""; 35 } 36 if($contact_id_val=="None") 37 { 38 $contact_id_val=""; 39 } 40 if($potential_id_val =="None") 41 { 42 $potential_id_val=""; 43 } 44 $update_sql="update vtiger_convertleadmapping set accountfid='".$account_id_val."',contactfid='".$contact_id_val."',potentialfid='".$potential_id_val."' where leadfid=".$lead_id; 45 46 $adb->query($update_sql); 47 } 48 header("Location: index.php?action=CustomFieldList&module=Settings&parenttab=Settings"); 49 50 ?>
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 |