Myrna Degano <mdegan@mecon.gov.ar>
------------------------------------------------------------------------------*/
-require_once 'DB.php';
-
-//Conexión a la BD
-$dbh = DB::connect("mysql://mark:mark@intranet-db/MEconDAV");
-if (DB::isError($dbh)) {
- die ($dbh->getMessage());
-}
-
//Obtener Datos del Adjunto
$sql = "SELECT mimetype, filename, size
- FROM FilesForArticle
+ FROM MEconDAV.FilesForArticle
WHERE file_for_article_id = ". $_GET['id'];
-$datos = $dbh->getAll($sql);
+$datos = $DB->getAll($sql);
$mime = $datos[0][0];
$filename = $datos[0][1];
$dir = $dir.$_GET['id'];
header("Content-Type: ".$mime);
-header("Content-Disposition: attachment; filename=".$filename);
+//header("Content-Disposition: attachment; filename=".$filename);
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Length: ".$filesize);
readfile ($dir);
-?>
\ No newline at end of file
+?>