diff options
| author | David Aspinall | 2000-02-29 06:30:41 +0000 |
|---|---|---|
| committer | David Aspinall | 2000-02-29 06:30:41 +0000 |
| commit | 624b841e56e8a252ac8bed2b178b414a7969df44 (patch) | |
| tree | 00b26f40a22da3a1ed012a395422aa3bef4ba9ab /html/functions.php3 | |
| parent | b37bf74fc2d6309a5ae3dc6b55e8488409976775 (diff) | |
Put projects onto separate pages.
Diffstat (limited to 'html/functions.php3')
| -rw-r--r-- | html/functions.php3 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/html/functions.php3 b/html/functions.php3 index 75c2291c..86ef295a 100644 --- a/html/functions.php3 +++ b/html/functions.php3 @@ -182,6 +182,8 @@ function htmlshow($filename,$text="",$title="") { } + + /* Markup plain text file, by escaping < and > */ function markup_plain_text($filename) { @@ -262,3 +264,25 @@ function hack_html($filename,$title="") { } + +/* Display a small page with standard header, footer added on. + Much like htmlshow. */ + +function smallpage($filename,$text="",$title="",$message="") { + if ( $text == "") { $text=$filename; }; + if ( $message == "") { $message=$title; }; + if ( $message == "") { $message=$filename; }; + $urlbits = parse_url($filename); + hlink("smallpage.phtml" + . "?title=" . urlencode($title) + . "&file=" . urlencode($urlbits["path"]) + . ($urlbits["fragment"]=="" ? "" : "#" . $urlbits["fragment"]), + $text, $message); +} + +/* Specialised version for projects */ + +function pgproject($filename,$title) { + smallpage("projects/$filename.html",$title,"Proof General Project",$title); +} + |
