Changeset 3961
- Timestamp:
- 2003-03-24T17:18:23+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/readresults.cgi
r3905 r3961 32 32 33 33 34 if($ENV{QUERY_STRING}=~/\D/) { die "invalid report ID"; }35 36 37 34 print "<html><head><title>Greenstone Usability - Report Details</title>\n"; 38 35 $ENV{HTTP_USER_AGENT}=~/([^\/]*)\/([0-9]+\.[0-9]+)/; … … 46 43 print "</head><body>\n"; 47 44 45 print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - Report Details</h1></td>\n"; 46 print "<td align=\"right\">"; 47 if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstonekoru design\" title=\"Greenstone koru design\">"; } 48 print "</td>\n</tr></table>"; 49 50 if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) { 51 print "<h2>Each report sent has an ID number. This page needs one of those numbers to work.</h2></body></html>"; 52 die; 53 } 54 48 55 open (FILEIN, $etcfileloc) or die "could not open usability.txt\n"; 49 56 while(<FILEIN>){ 50 57 $etcfile.=$_; 58 } 59 close(FILEIN); 60 61 if(!($etcfile=~ /$ENV{QUERY_STRING}/)) { 62 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>"; 63 die; 51 64 } 52 print "<table width=\"100%\"><tr>\n<td><h1>Greenstone Usability - Report Details</h1></td>\n"; 53 print "<td align=\"right\">"; 54 if ($imageloc) { print "<img src=\"$imageloc\/usabbanner.gif\" alt=\"Greenstone 55 koru design\" title=\"Greenstone koru design\">"; } 56 print "</td>\n</tr></table>"; 57 58 59 close(FILEIN); 65 66 #get the report for whjich details are to be viewed. 60 67 $etcfile=~/report-id := $ENV{QUERY_STRING}\n/; 61 68 $report =$&; … … 69 76 } 70 77 78 79 71 80 print "<p>Your automatically generated report ID number is: <b>$reportvals{\"report-id\"}</b>"; 72 81 delete $reportvals{"report-id"}; … … 75 84 print "<table><width=\"100%\">\n"; 76 85 77 print "<tr><td class=\"sans\" width=\"50%\"><b>The URL of the page where you were having problems:</b></td><td>$reportvals{\"URL\"}</td></tr>\n"; 78 delete $reportvals{"URL"}; 79 80 delete $reportvals{"report-id"}; 81 print "<tr><td class=\"sans\" width=\"50%\"><b>Time you opened the usability window:</b></td><td>$reportvals{\"opentime\"}</td></tr>\n"; 82 delete $reportvals{"opentime"}; 83 84 print "<tr><td class=\"sans\" width=\"50%\"><b>Time you sent the usability report:</b></td><td>$reportvals{\"sendtime\"}</td></tr>\n"; 85 delete $reportvals{"sendtime"}; 86 87 print "<tr><td class=\"sans\" width=\"50%\"><b>Time the server received the usability report:</b></td><td>$reportvals{\"time\"}</td></tr>\n"; 88 delete $reportvals{"time"}; 89 90 print "<tr><td class=\"sans\" width=\"50%\"><b>Your browser as it identifies itself:</b></td><td>$reportvals{\"browser\"}</td></tr>\n"; 91 delete $reportvals{"browser"}; 92 93 print "<tr><td class=\"sans\" width=\"50%\"><b>Your browser as identified by the server:</b></td><td>$reportvals{\"browser-read-by-server\"}</td></tr>\n"; 94 delete $reportvals{"browser-read-by-server"}; 95 96 print "<tr><td class=\"sans\" width=\"50%\"><b>The IP number of your browser:</b></td><td>$reportvals{\"browser-ip-no\"}</td></tr>\n"; 97 delete $reportvals{"browser-ip-no"}; 98 99 print "<tr><td class=\"sans\" width=\"50%\"><b>The IP number of ther server:</b></td><td>$reportvals{\"server-ip-no\"}"; 100 delete $reportvals{"server-ip-no"}; 101 102 print "<tr><td class=\"sans\" width=\"50%\"><b>Your language as recorded by your web browser:</b></td><td>$reportvals{\"language\"}</td></tr>\n"; 103 delete $reportvals{"language"}; 104 105 print "<tr><td class=\"sans\" width=\"50%\"><b>The resolution of your screen:</b></td><td>$reportvals{\"resolution\"}</td></tr>\n"; 106 delete $reportvals{"resolution"}; 107 108 print "<tr><td class=\"sans\" width=\"50%\"><b>The colour of your screen (if any):</b></td><td>$reportvals{\"screencolour\"}</td></tr>\n"; 109 delete $reportvals{"screencolour"}; 110 111 print "<tr><td class=\"sans\" width=\"50%\"><b>The number of bits per pixel your display uses to represent colour:</b></td><td>$reportvals{\"pixeldpeth\"}</td></tr>\n"; 112 delete $reportvals{"pixeldepth"}; 86 make_table_entry("The URL of the page where you were having problems","URL"); 87 make_table_entry("Time you opened the usability report window","opentime"); 88 make_table_entry("Time you sent the usability report","sendtime"); 89 make_table_entry("Time the report was received by the server","time"); 90 make_table_entry("Your browser as it identifies itself","browser"); 91 make_table_entry("Your browser as the server identifies it","browser-read-by-server"); 92 make_table_entry("Your browser's IP number","browser-ip-no"); 93 make_table_entry("The server's IP number","server-ip-no"); 94 make_table_entry("Your language as recorded by your browser","language"); 95 make_table_entry("The resolution of your screen","resolution"); 96 make_table_entry("The colour of your screen","screencolour"); 97 make_table_entry("The number of bits per pixel your display uses to represent colour","pixeldepth"); 113 98 print"</table>"; 114 99 115 print "<h2>You provided us with the following information about the problem</h2>\n";100 print "<h2>You provided us with the following extra information about the problem</h2>\n"; 116 101 117 102 print"<table>\n"; 118 119 print "<tr><td class=\"sans\" width=\"50%\"><b>How bad the problem was:</b></td><td>$reportvals{\"severity\"}</td></tr>\n"; 120 delete $reportvals{"severity"}; 121 122 print "<tr><td class=\"sans\" width=\"50%\"><b>What kind of problem it was:</b></td><td>$reportvals{\"probtype\"}</td></tr>\n"; 123 delete $reportvals{"probtype"}; 124 125 print "<tr><td class=\"sans\" width=\"50%\"><b>Other details:</b></td><td>$reportvals{\"moredetails\"}</td></tr>\n"; 126 delete $reportvals{"moredetails"}; 127 128 print"</table>\n"; 103 make_table_entry("How bad the problem was","severity"); 104 make_table_entry("What kind of problem it was","probtype"); 105 make_table_entry("Other details","moredetails"); 106 print "</table>\n"; 129 107 130 108 print "<h2>The following data was automatically collected from the form on the greenstone interface</h2>\n"; … … 141 119 print "</body></html>"; 142 120 121 #This function takes a key into the report values interface, and a desription 122 # of what that entry means, and makes a properly formatted html table entry 123 sub make_table_entry { 124 local ($desc, $entry) = @_; 125 print "<tr><td class=\"sans\" width=\"50%\"><b>$desc:</b></td>"; 126 print "<td>$reportvals{$entry}</td></tr>\n"; 127 delete $reportvals{$entry}; 128 } 143 129 144 130 … … 153 139 154 140 141
Note:
See TracChangeset
for help on using the changeset viewer.