Changeset 4131
- Timestamp:
- 2003-04-11T17:55:03+12:00 (21 years ago)
- Location:
- trunk/gsdl/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/perl.cgi
r4088 r4131 35 35 print "</head><body onLoad=\"if(parseInt(navigator.appVersion)>3)\{window.resizeTo(420,300);\}\" bgcolor=\"#FFFFFF\">\n"; 36 36 37 ($imageloc) = usabcgi::get_config_info("httpimg"); 38 if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;} 39 print "<table width=\"400px\"><tr>\n<td><h1>Greenstone Usability - Thank you</h1></td>\n"; 40 print "<td align=\"right\">"; 41 if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstone koru design\" title=\"Greenstone koru design\">"; } 42 print "</td>\n</tr></table>"; 37 38 usabcgi::printbanner("Thank You"); 43 39 44 40 ($fileoutloc) = usabcgi::get_config_info("gsdlhome"); … … 54 50 55 51 usabcgi::printaplinks; 56 print "<p>Your comments have been noted. <p>Thank you for helping us make Greenstone more usable. ";52 print "<p>Your comments have been noted. <p>Thank you for helping us make Greenstone more usable.</p>\n"; 57 53 print "<table width=\"400px\"><tr>\n"; 58 54 print "<td class=\"sans\"><a href=\"readresults.cgi?$idno\" target=\"_blank\">View report details</a></td>\n"; 59 print "<td class=\"sans\"><a href=\" http://nzdl2.cs.waikato.ac.nz/dana/gsdl/test.html\" target=\"_blank\">Track report</a></td>";60 print "<td align=\"right\"><form action=\"\"><button type=\"button\" onClick=\"window.close();\">< b>Close Window</b></button></form></td>\n";55 print "<td class=\"sans\"><a href=\"trackreport.cgi?$idno\" target=\"_blank\">Track report</a></td>"; 56 print "<td align=\"right\"><form action=\"\"><button type=\"button\" onClick=\"window.close();\"><strong>Close Window</strong></button></form></td>\n"; 61 57 print"</tr></table>\n"; 62 58 -
trunk/gsdl/cgi-bin/readresults.cgi
r4114 r4131 12 12 print "</head><body bgcolor=\"#ffffff\">\n"; 13 13 14 ($imageloc) = usabcgi::get_config_info("httpimg"); 15 if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;} 16 17 print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - Report Details</h1></td>\n"; 18 print "<td align=\"right\">"; 19 if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstonekoru design\" title=\"Greenstone koru design\">"; } 20 print "</td>\n</tr></table>"; 14 usabcgi::printbanner("Report Details"); 21 15 usabcgi::printaplinks; 22 16 23 if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) { 24 print "<h2>Each report sent has an ID number. This page needs one of those numbers to work.</h2></body></html>"; 25 die; 26 } 17 usabcgi::checkidno; 27 18 28 ($etcfileloc) = usabcgi::get_config_info("gsdlhome"); 29 if(!($etcfileloc =~/\/$/)) {$etcfileloc.="/";} 30 $etcfileloc .= "etc/usability.txt"; 31 open (FILEIN, $etcfileloc) or die "could not open usability.txt\n"; 32 while(<FILEIN>){ 33 $etcfile.=$_; 34 } 35 close(FILEIN); 36 37 if(!($etcfile=~ /$ENV{QUERY_STRING}/)) { 38 print "<h2>Each report sent has an ID number. This program needs one of those ID numbers to work, and the ID number provided wans't found</h2></body></html>"; 39 die; 40 } 41 42 #get the report for whjich details are to be viewed. 43 $etcfile=~/report-id := $ENV{QUERY_STRING}\&usabend\;\n/; 44 $report = $&; 45 $tmp=$'; 46 $tmp=~/----------------------?/; 47 $report.=$`; 48 @pairs=split(/\&usabend\;\n/,$report); 49 foreach $pair (@pairs) { 50 ($name, $value)= split(/ := /,$pair); 51 #this adds html tags for breaks 52 $value =~ s/\n/\<br\>/g; 53 $reportvals{$name}=$value; 54 } 55 56 57 19 %reportvals=usabcgi::getusabreportdetails; 58 20 59 21 print "<p>Your automatically generated report ID number is: <b>$reportvals{\"report-id\"}</b>"; … … 93 55 94 56 foreach $key (keys(%reportvals)){ 95 $key=~/-/; 96 print "<tr><td>$`</td><td>$'</td><td>$reportvals{$key}</td></tr>\n"; 57 if($key ne "update"){ 58 $key=~/-/; 59 print "<tr><td>$`</td><td>$'</td><td>$reportvals{$key}</td></tr>\n"; 60 } 97 61 } 98 62 print "</table>\n"; … … 106 70 sub make_table_entry { 107 71 local ($desc, $entry) = @_; 108 print "<tr><td class=\"sans\" width=\"50%\">< b>$desc:</b></td>";72 print "<tr><td class=\"sans\" width=\"50%\"><strong>$desc:</strong></td>"; 109 73 print "<td>$reportvals{$entry}</td></tr>\n"; 110 74 delete $reportvals{$entry}; -
trunk/gsdl/cgi-bin/usabcgi.pm
r4113 r4131 28 28 } 29 29 30 sub printbanner { 31 ($title)=@_; 32 ($imageloc) = usabcgi::get_config_info("httpimg"); 33 if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;} 34 print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - $title</h1></td>\n"; 35 print "<td align=\"right\">"; 36 if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstone koru design\" title=\"Greenstone koru design\">"; } 37 print "</td>\n</tr></table>"; 38 } 39 30 40 sub printaplinks { 31 41 print "<p class=\"sans\">\n"; … … 42 52 print "\th2 {font-family: sans-serif; font-size: 14px; font-weight: bold; color: #009966}\n"; 43 53 print "\tp.sans {font-family: sans-serif}\n"; 44 print "\ttd.sans {font-family: sans-serif; width: 50%; vertical-align: top}\n"; 54 print "\ttd {vertical-align: top}\n"; 55 print "\ttd.sans {font-family: sans-serif; width: 50%}\n"; 45 56 print "</style>\n"; 46 57 } … … 48 59 } 49 60 61 sub checkidno { 62 if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) { 63 print "<h2>Each report sent has an ID number. This page needs one of those numbers to work.</h2>\n"; 64 print "<br><br><p class=\"sans\"><a href=\"mailto:dmn@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n"; 65 print "</body></html>\n"; 66 die; 67 } 68 } 50 69 70 sub getusabreportdetails { 71 ($etcfileloc) = usabcgi::get_config_info("gsdlhome"); 72 if(!($etcfileloc =~/\/$/)) {$etcfileloc.="/";} 73 $etcfileloc .= "etc/usability.txt"; 74 open (FILEIN, $etcfileloc) or die "could not open usability.txt\n"; 75 while(<FILEIN>){ 76 $etcfile.=$_; 77 } 78 close(FILEIN); 51 79 80 if(!($etcfile=~ / $ENV{QUERY_STRING}\&usabend;/)) { 81 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"; 82 print "<br><br><p class=\"sans\"><a href=\"mailto:dmn@cs.waikato.ac.nz\">Contact us</a> with any queries about this.\n"; 83 print "</body></html>"; 84 die; 85 } 86 87 #get the report for whjich details are to be viewed. 88 $etcfile=~/report-id := $ENV{QUERY_STRING}\&usabend\;\n/; 89 $report = $&; 90 $tmp=$'; 91 $tmp=~/----------------------?/; 92 $report.=$`; 93 @pairs=split(/\&usabend\;\n/,$report); 94 foreach $pair (@pairs) { 95 ($name, $value)= split(/ := /,$pair); 96 #this adds html tags for breaks 97 $value =~ s/\n/\<br\>\n/g; 98 $reportvals{$name}=$value; 99 } 100 return %reportvals; 101 102 } 52 103 53 104 1;
Note:
See TracChangeset
for help on using the changeset viewer.