| [ 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 require_once ('include/database/PearDatabase.php'); 12 $fld_module=$_REQUEST["fld_module"]; 13 $tableName=$_REQUEST["table_name"]; 14 $fldPickList = $_REQUEST['listarea']; 15 //changed by dingjianting on 2006-10-1 for picklist editor 16 $fldPickList = utf8RawUrlDecode($fldPickList); 17 $uitype = $_REQUEST['uitype']; 18 19 global $adb; 20 21 //Deleting the already existing values 22 if($uitype == 111) 23 { 24 $delquery="delete from vtiger_".$tableName." where presence=0"; 25 $adb->query($delquery); 26 } 27 else 28 { 29 $delquery="delete from vtiger_".$tableName; 30 $adb->query($delquery); 31 } 32 33 $pickArray = explode("\n",$fldPickList); 34 $count = count($pickArray); 35 36 $tabname=explode('cf_',$tableName); 37 38 if($tabname[1]!='') 39 $custom=true; 40 41 for($i = 0; $i < $count; $i++) 42 { 43 $pickArray[$i] = trim($pickArray[$i]); 44 if($pickArray[$i] != '') 45 { 46 if($uitype == 111) 47 $query = "insert into vtiger_".$tableName." values('','".$pickArray[$i]."',".$i.",0)"; 48 else 49 $query = "insert into vtiger_".$tableName." values('','".$pickArray[$i]."',".$i.",1)"; 50 51 $adb->query($query); 52 } 53 } 54 header("Location:index.php?action=SettingsAjax&module=Settings&directmode=ajax&file=PickList&fld_module=".$fld_module); 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 |