aboutsummaryrefslogtreecommitdiff
path: root/html/fileshow.html
diff options
context:
space:
mode:
authorDavid Aspinall2000-09-28 15:01:50 +0000
committerDavid Aspinall2000-09-28 15:01:50 +0000
commitbd7aa7923a25d16207842f9f3d6b773c2fc6fa58 (patch)
tree8f5733bf63e8c880e65472b3ebf745b1026698e3 /html/fileshow.html
parent2c253444d0b93cf7628ab030e6a5f1ad24fa20fd (diff)
Renamed file
Diffstat (limited to 'html/fileshow.html')
-rw-r--r--html/fileshow.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/html/fileshow.html b/html/fileshow.html
new file mode 100644
index 00000000..a13857e7
--- /dev/null
+++ b/html/fileshow.html
@@ -0,0 +1,24 @@
+<?php
+ require('functions.php3');
+ require('elispmarkup.php3');
+ $filename=$HTTP_GET_VARS["file"];
+ $title=$HTTP_GET_VARS["title"];
+ $expanded=$HTTP_GET_VARS["expanded"];
+ 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";
+ } elseif (substr($filename,-3)==".el") {
+ elisp_markup($filename,"fileshow.phtml");
+ } else {
+ outline_markup($filename,"fileshow.phtml",$expanded);
+ }
+ print "</pre>\n";
+ print "<hr>";
+ click_to_go_back();
+ footer();
+?>