Changeset 11656 for trunk


Ignore:
Timestamp:
2006-04-19T15:42:57+12:00 (18 years ago)
Author:
kjdon
Message:

changed email address to greenstone instead of dmn, moved the html files into greenstone/usability, using httpimg to work out the address

File:
1 edited

Legend:

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

    r7958 r11656  
    33
    44sub get_config_info {
    5     open FILEIN, ("gsdlsite.cfg")
    6     || die "ERROR: Could not open site configuration file\n";
     5    open FILEIN, ("gsdlsite.cfg")   || die "ERROR: Could not open site configuration file\n";
    76
    87    my $configfile;
     
    2221}
    2322
     23sub get_httpimg {
     24    my ($imageloc) = usabcgi::get_config_info("httpimg");
     25    if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;}
     26    return $imageloc;
     27}
     28
     29sub get_httpusab {
     30    my ($htmlloc) = usabcgi::get_config_info("httpimg");
     31    if(!($htmlloc =~ "http")) {$htmlloc="http://".$ENV{HTTP_HOST}.$htmlloc;}
     32    $htmlloc =~ s/images/usability/;
     33    return  $htmlloc;
     34
     35}
     36
    2437sub printscript {
    2538   
     
    3346sub printbanner {
    3447    ($title)=@_;
    35     ($imageloc) = usabcgi::get_config_info("httpimg");
    36     if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;}
     48    ($imageloc) = usabcgi::get_httpimg();
    3749    print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - $title</h1></td>\n";
    3850    print "<td align=\"right\">";
    39     if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstone koru design\" title=\"Greenstone koru design\">"; }
     51    if ($imageloc) { print "<img src=\"$imageloc\/usabbnr.gif\" alt=\"Greenstone koru design\" title=\"Greenstone koru design\">"; }
    4052    print "</td>\n</tr></table>";
    4153}
    4254
    4355sub printaplinks {
     56    # this is a hack
     57    ($htmlloc) = usabcgi::get_httpusab();
    4458    print "<p class=\"sans\">\n";
    45     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";
     59    print "<a href=\"javascript:showaboutprivacy('$htmlloc/about.html')\">About</a>\n &#8226; <a href=\"javascript:showaboutprivacy('$htmlloc/privacy.html')\">Privacy</a>\n";
    4660
    4761}
     
    6579    if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) {
    6680    print "<h2>Each report sent has an ID number.  This page needs one of those numbers to work.</h2>\n";
    67     print "<br><br><p class=\"sans\"><a href=\"mailto:dmn&#064;cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";
     81    print "<br><br><p class=\"sans\"><a href=\"mailto:greenstone&#064;cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";
    6882    print "</body></html>\n";
    6983    die;
     
    8397    if(!($etcfile=~ / $ENV{QUERY_STRING}\&usabend;/)) {
    8498    print "<h2>Each report has an ID number.  This program needs one of those ID numbers to work, and the ID number provided wasn't found.</h2>\n";
    85     print "<br><br><p class=\"sans\"><a href=\"mailto:dmn&#064;cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";
     99    print "<br><br><p class=\"sans\"><a href=\"mailto:greenstone&#064;cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";
    86100    print "</body></html>"; 
    87101        die;
Note: See TracChangeset for help on using the changeset viewer.