Pages colored to be white-on-black
authorshort <>
Thu, 16 Aug 2001 02:30:45 +0000 (02:30 +0000)
committershort <>
Thu, 16 Aug 2001 02:30:45 +0000 (02:30 +0000)
common.php

index 94e1a70..3640ecf 100644 (file)
        if (isset($detect_js) && !$have_js)
                $head.='<script type="text/javascript" src="have_js.js"></script>'."\n";
 
-       if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$HTTP_SERVER_VARS["HTTP_USER_AGENT"],$msie_major_a))
+       $user_agent=$HTTP_SERVER_VARS["HTTP_USER_AGENT"];
+       if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$user_agent,$msie_major_a))
                $msie_major=$msie_major_a[1];
+       else if (ereg("[[:<:]]Mozilla/([0-9]+)\\.",$user_agent,$mozilla_major_a))
+               $mozilla_major=$mozilla_major_a[1];
 
 function addpercents($url)
 {
@@ -147,7 +150,7 @@ function footer()
 
 function heading()
 {
-       global $msie_major,$title_tail,$head_css,$head;
+       global $msie_major,$mozilla_major,$title_tail,$head_css,$head;
 
        header("Content-type: text/html; charset=iso-8859-2");
        if (!isset($msie_major) || $msie_major>=4)
@@ -160,15 +163,25 @@ function heading()
                print(": $title_tail");
 ?></title>
 <style type="text/css"><!--
-.cvs-id { font-family: monospace; }
-.error  { color: red; }
-.quote  { font-family: monospace; }
+.cvs-id  { font-family: monospace; }
+.error   { color: red; }
+.quote   { font-family: monospace; }
+body {
+               background-color: black;
+               color: white;
+               }
+:link    { color: cyan; }
+:visited { color: teal; }
+h1,h2    { color: yellow; }
 <?php
        if (isset($head_css))
                print(trim($head_css)."\n");
        print("--></style>\n");
        if (isset($head))
                print($head);
-       print("</head><body>\n");
+       print("</head><body");
+       if (isset($mozilla_major) && $mozilla_major==4)
+               print(" bgcolor=\"black\" text=\"white\" link=\"cyan\" vlink=\"teal\"");
+       print(">\n");
 }
 ?>