-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexplnum_doc_data.php
More file actions
executable file
·35 lines (29 loc) · 1.16 KB
/
explnum_doc_data.php
File metadata and controls
executable file
·35 lines (29 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// | creator : Yves PRATTER |
// +-------------------------------------------------+
// $Id: explnum_doc_data.php,v 1.5 2015-04-03 11:16:23 jpermanne Exp $
// définition du minimum nécéssaire
$base_path = ".";
$base_auth = ""; //"CIRCULATION_AUTH";
$base_title = "";
$base_noheader = 1;
$base_nocheck = 1;
$base_nobody = 1;
$base_nosession = 1;
require_once ("$base_path/includes/init.inc.php");
$resultat = pmb_mysql_query("SELECT explnum_doc_nomfichier, explnum_doc_mimetype, explnum_doc_data, explnum_doc_extfichier
FROM explnum_doc WHERE id_explnum_doc = '$explnumdoc_id' ", $dbh);
$nb_res = pmb_mysql_num_rows($resultat) ;
if (!$nb_res) {
exit ;
}
$ligne = pmb_mysql_fetch_object($resultat);
if ($ligne->explnum_doc_data) {
header("Content-Type: ".$ligne->explnum_doc_mimetype);
header("Content-Length: ".$ligne->taille);
print $ligne->explnum_doc_data;
exit ;
} else print "ERROR".pmb_mysql_error() ;
?>