Changeset 4131 for trunk/gsdl/cgi-bin/readresults.cgi
- Timestamp:
- 2003-04-11T17:55:03+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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};
Note:
See TracChangeset
for help on using the changeset viewer.