- Timestamp:
- 2006-04-19T15:42:57+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/usabcgi.pm
r7958 r11656 3 3 4 4 sub 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"; 7 6 8 7 my $configfile; … … 22 21 } 23 22 23 sub 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 29 sub 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 24 37 sub printscript { 25 38 … … 33 46 sub printbanner { 34 47 ($title)=@_; 35 ($imageloc) = usabcgi::get_config_info("httpimg"); 36 if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;} 48 ($imageloc) = usabcgi::get_httpimg(); 37 49 print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - $title</h1></td>\n"; 38 50 print "<td align=\"right\">"; 39 if ($imageloc) { print "<img src=\"$imageloc\/usabb anner.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\">"; } 40 52 print "</td>\n</tr></table>"; 41 53 } 42 54 43 55 sub printaplinks { 56 # this is a hack 57 ($htmlloc) = usabcgi::get_httpusab(); 44 58 print "<p class=\"sans\">\n"; 45 print "<a href=\"javascript:showaboutprivacy(' http://nzdl2.cs.waikato.ac.nz/dana/gsdl/about.html')\">About</a>\n • <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 • <a href=\"javascript:showaboutprivacy('$htmlloc/privacy.html')\">Privacy</a>\n"; 46 60 47 61 } … … 65 79 if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) { 66 80 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@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";81 print "<br><br><p class=\"sans\"><a href=\"mailto:greenstone@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n"; 68 82 print "</body></html>\n"; 69 83 die; … … 83 97 if(!($etcfile=~ / $ENV{QUERY_STRING}\&usabend;/)) { 84 98 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@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n";99 print "<br><br><p class=\"sans\"><a href=\"mailto:greenstone@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n"; 86 100 print "</body></html>"; 87 101 die;
Note:
See TracChangeset
for help on using the changeset viewer.