[ 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 ('modules/Reports/Reports.php'); 12 require_once ('include/logging.php'); 13 require_once ('include/database/PearDatabase.php'); 14 15 global $adb; 16 17 $local_log =& LoggerManager::getLogger('index'); 18 $focus = new Reports(); 19 20 $rfid = $_REQUEST['record']; 21 $mode = $_REQUEST['savemode']; 22 $foldername = addslashes($_REQUEST["foldername"]); 23 $folderdesc = addslashes($_REQUEST["folderdesc"]); 24 $foldername = str_replace('*amp*','&',$foldername); 25 $folderdesc = str_replace('*amp*','&',$folderdesc); 26 if($mode=="Save") 27 { 28 if($rfid=="") 29 { 30 $sql = "INSERT INTO vtiger_reportfolder "; 31 $sql .= "(FOLDERID,FOLDERNAME,DESCRIPTION,STATE) "; 32 $sql .= "VALUES ('','".$foldername."','".$folderdesc."','CUSTOMIZED')"; 33 $result = $adb->query($sql); 34 if($result!=false) 35 { 36 header("Location: index.php?action=ReportsAjax&file=ListView&mode=ajax&module=Reports"); 37 }else 38 { 39 include('themes/'.$theme.'/header.php'); 40 $errormessage = "<font color='red'><B>Error Message<ul> 41 <li><font color='red'>Error while inserting the record</font> 42 </ul></B></font> <br>" ; 43 echo $errormessage; 44 } 45 } 46 }elseif($mode=="Edit") 47 { 48 if($rfid != "") 49 { 50 $sql = "update vtiger_reportfolder set "; 51 $sql .= "FOLDERNAME='".$foldername."', "; 52 $sql .= "DESCRIPTION='".$folderdesc."' "; 53 $sql .= "where folderid=".$rfid; 54 $result = $adb->query($sql); 55 if($result!=false) 56 { 57 header("Location: index.php?action=ReportsAjax&file=ListView&mode=ajax&module=Reports"); 58 }else 59 { 60 include('themes/'.$theme.'/header.php'); 61 $errormessage = "<font color='red'><B>Error Message<ul> 62 <li><font color='red'>Error while updating the record</font> 63 </ul></B></font> <br>" ; 64 echo $errormessage; 65 } 66 } 67 } 68 69 70 ?>
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 |