Changeset 4084


Ignore:
Timestamp:
2003-04-02T21:56:28+12:00 (21 years ago)
Author:
dana
Message:

added a little functionality for printing stuff used by all cgi scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/usabcgi.pm

    r4071 r4084  
    1818    return ($loc);
    1919}
     20
     21sub printscript {
     22   
     23    print "<script type=\"text/javascript\">\n";
     24    print "\tfunction showaboutprivacy(url){\n";
     25    print "\t\tinfowin=window.open(url,'infowin','toolbars=0, height=600, width=600')\n";
     26    print "\t}\n";
     27    print "</script>\n";
     28}
     29
     30sub printaplinks {
     31    print "<p class=\"sans\">\n";
     32    print "<a href=\"javascript:showaboutprivacy('http://nzdl2.cs.waikato.ac.nz/dana/gsdl/about.html')\">About</a>\n &#8226; <a href=\"javascript:showaboutprivacy('http://nzdl2.cs.waikato.ac.nz/dana/gsdl/privacy.html')\">Privacy</a>\n";
     33
     34}
     35
     36sub printstyle {
     37    ($browser) = @_;
     38    $browser=~/([^\/]*)\/([0-9]+\.[0-9]+)/;
     39    if(($1 ne "Netscape")||($2 > 4.77)){
     40    print "<style type=\"text/css\">\n";
     41    print "\th1 {font-family: sans-serif; font-size: 20px}\n";
     42    print "\th2 {font-fanily: sans-serif; font-size: 14px; font-weight: bold; color: #009966}\n";
     43    print "\tp.sans {font-family: sans-serif}\n";
     44    print "\ttd.sans {font-family: sans-serif; vertical-align:top}\n";
     45    print "</style>\n";
     46    }
     47
     48}
     49
     50
     51
    2052
    21531;
Note: See TracChangeset for help on using the changeset viewer.