24require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
28$r=
$cn->exec_sql(
"select md_id,md_lob,md_filename,md_mimetype
29 from document_modele where md_id=$1",array(
$_REQUEST[
'md_id']));
40$tmp=tempnam($_ENV[
'TMP'],
'document_');
42ini_set(
'zlib.output_compression',
'Off');
43header(
"Pragma: public");
44header(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT");
45header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
46header(
"Cache-Control: must-revalidate");
47header(
'Content-type: '.
$row[
'md_mimetype']);
48header(
'Content-Disposition: attachment;filename="'.
$row[
'md_filename'].
'"',FALSE);
49header(
"Accept-Ranges: bytes");
52 echo fread(
$file,8192);
echo_error($p_log, $p_line="", $p_message="")
log error into the /tmp/noalyss_error.log it doesn't work on windows
global $g_user
if no group available , then stop
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
if(Database::num_row($r)==0) $row
for($e=0; $e< count($afiche); $e++) exit