32) { header("HTTP/1.0 404 Not Found"); exit; } $Datas=$query->firstrow("select binary_id,originalname,mimetype from binarydescription where md5(concat(binary_id,'X|X',originalname))='". $Keys[0] ."'"); if($Datas["binarydescription.binary_id"]>0) { $Binary=$query->firstfield("select bin from binarys where id = " . $Datas["binarydescription.binary_id"]); if($Datas["binarydescription.mimetype"]=="image/pjpeg") $Datas["binarydescription.mimetype"]="image/jpeg"; header("Content-Type: " . $Datas["binarydescription.mimetype"]); header("Content-Length: ".strlen($Binary)); header("Content-Disposition: attachment; filename=" . $Datas["binarydescription.originalname"]); echo $Binary; } else { header("HTTP/1.0 404 Not Found"); } ?>