[ 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 ('config.php'); 13 require_once ('include/database/PearDatabase.php'); 14 15 global $adb; 16 global $fileId; 17 18 $fileid = $_REQUEST['fileid']; 19 20 //$dbQuery = "SELECT * from vtiger_seattachmentsrel where crmid = '" .$fileid ."'"; 21 //$attachmentsid = $adb->query_result($adb->query($dbQuery),0,'attachmentsid'); 22 $attachmentsid = $fileid; 23 24 $returnmodule=$_REQUEST['return_module']; 25 26 if($_REQUEST['activity_type']=='Settings') 27 $attachmentsid=$fileid; 28 29 $dbQuery = "SELECT * FROM vtiger_organizationdetails "; 30 31 $result = $adb->query($dbQuery) or die("Couldn't get file list"); 32 if($adb->num_rows($result) == 1) 33 { 34 $name = @$adb->query_result($result, 0, "logoname"); 35 //echo 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ' .$fileType; 36 $fileContent = @$adb->query_result($result, 0, "logo"); 37 header("Cache-Control: private"); 38 header("Content-Disposition: attachment; filename=$name"); 39 header("Content-Description: PHP Generated Data"); 40 echo base64_decode($fileContent); 41 } 42 else 43 { 44 echo "Record doesn't exist."; 45 } 46 ?> 47
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 |