From 2ed53db7506dd4811fbe6c3fac64c3703d1169a8 Mon Sep 17 00:00:00 2001
From: David Aspinall
Date: Thu, 24 Jun 1999 14:04:28 +0000
Subject: New web pages
---
html/functions.php3 | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 218 insertions(+)
create mode 100644 html/functions.php3
(limited to 'html/functions.php3')
diff --git a/html/functions.php3 b/html/functions.php3
new file mode 100644
index 00000000..4a019784
--- /dev/null
+++ b/html/functions.php3
@@ -0,0 +1,218 @@
+" . $addr . "";
+}
+
+function pg_email() {
+ mlink("proofgen@dcs.ed.ac.uk");
+}
+
+
+/* Style sheet element for dt doesnt work in
+ Netscape, so hack it here.
+*/
+
+function dt($string) {
+ print "
";
+ print $string;
+ print "
";
+}
+
+/* Automatic footnotes! */
+
+/* FIXME: for now, do nothing. */
+
+function footnote ($text) {
+ print "";
+
+}
+
+/* A hyper-link with optional mouse over text.
+ Could be made more sophisticated to do roll-overs,
+ or whatever.
+*/
+
+function hlink ($url,$text,$mouseover="") {
+ print "" . $text . "";
+}
+
+/* Determining download sizes (print broken message if file not found) */
+
+function download_size($filename) {
+ if (file_exists($filename)) {
+ $size = filesize($filename);
+ $sizek = (int) ($size/1024);
+ print " (";
+ if ($sizek == 0) {
+ print $size . " bytes)";
+ } else {
+ print $sizek . "k)";
+ }
+ } else {
+ print " (link broken)";
+ }
+}
+
+function download_link($filename,$linkname = "") {
+ print "";
+ if ($linkname == "") {
+ print $filename;
+ } else {
+ print $linkname;
+ };
+ print "";
+ print download_size($filename);
+}
+
+function date_modified($filename) {
+ $time = filemtime($filename);
+ if ($time) {
+ print "Last modified " . strftime("%d %B %Y",$time) . ".\n";
+ }
+}
+
+/* Nav bar separator */
+
+$separator = '
';
+
+/* A link to one of the main pages (must appear in navbar menu) */
+
+function link_root($page,$text) {
+ print "";
+ print $text;
+ print "\n";
+}
+
+function small_header($title) {
+ include('smallheader.phtml');
+ print "" . $title . "
\n\n\n";
+}
+
+function footer($filemodified=".") {
+ include('footer.phtml');
+ date_modified($filemodified);
+ print "\n";
+ print "