blob: 6e984bdfd7756289c0c0c7fc7f4354c084da44e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?php
require('functions.php3');
$filename=$HTTP_GET_VARS["file"];
$title=$HTTP_GET_VARS["title"];
if ($title=="") { $title = $filename; };
small_header($title);
print "<pre>\n";
/* I hope this is enough to prevent access outside cwd */
if (substr($filename,0,1)=="." or
substr($filename,0,1)=="/" or
substr($filename,0,1)=="~") {
print "Sorry, can't show you that file!\n";
} else {
markup_plain_text($filename);
}
print "</pre>\n";
print "<hr>";
click_to_go_back();
footer();
?>
|