2 require_once("Obj/brisk.phh");
6 GLOBAL $G_doc_path, $_GET;
8 if (! isset($_GET['doc'])) {
13 $cont_type = "application/octet-stream";
14 if (isset($_GET['ext']) && ($_GET['ext'] == "txt")) {
15 $cont_type = "plain/text";
19 $fname = sprintf("%s%s.%s", $G_doc_path, basename($_GET['doc']), $ext);
20 if (! file_exists($fname)) {
24 header(sprintf("Content-Type: %s", $cont_type));
25 header(sprintf("Content-Disposition: attachment; filename=brisk_%s", basename($fname)));