#!/usr/bin/perl use usabcgi; print "Content-type:text/html\n\n"; print "Greenstone Usability - Report Details\n"; $ENV{HTTP_USER_AGENT}=~/([^\/]*)\/([0-9]+\.[0-9]+)/; if(($1 ne "Netscape")||($2 > 4.77)){ print "\n" } print "\n"; ($imageloc) = usabcgi::get_config_info("httpimg"); if(!($imageloc =~ "http")) {$imageloc="http://".$ENV{HTTP_HOST}.$imageloc;} print "\n\n"; print "\n

Greenstone Usability - Report Details

"; if ($imageloc) { print "\"Greenstonekoru"; } print "
"; if((!($ENV{QUERY_STRING}=~/\d/)) || ($ENV{QUERY_STRING}=~/\D/) ) { print "

Each report sent has an ID number. This page needs one of those numbers to work.

"; die; } ($etcfileloc) = usabcgi::get_config_info("gsdlhome"); if(!($etcfileloc =~/\/$/)) {$etcfileloc.="/";} $etcfileloc .= "etc/usability.txt"; open (FILEIN, $etcfileloc) or die "could not open usability.txt\n"; while(){ $etcfile.=$_; } close(FILEIN); if(!($etcfile=~ /$ENV{QUERY_STRING}/)) { print "

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

"; die; } #get the report for whjich details are to be viewed. $etcfile=~/report-id := $ENV{QUERY_STRING}\&usabend\;\n/; $report = $&; $tmp=$'; $tmp=~/----------------------?/; $report.=$`; @pairs=split(/\&usabend\;\n/,$report); foreach $pair (@pairs) { ($name, $value)= split(/ := /,$pair); #this adds html tags for breaks $value =~ s/\n/\/g; $reportvals{$name}=$value; } print "

Your automatically generated report ID number is: $reportvals{\"report-id\"}"; delete $reportvals{"report-id"}; print "

The following technical information was automatically collected about your problem:

\n"; print "\n"; make_table_entry("The URL of the page where you were having problems","URL"); make_table_entry("Time you opened the usability report window","opentime"); make_table_entry("Time you sent the usability report","sendtime"); make_table_entry("Time the report was received by the server","time"); make_table_entry("Your browser as it identifies itself","browser"); make_table_entry("Your browser as the server identifies it","browser-read-by-server"); make_table_entry("Your browser's IP number","browser-ip-no"); make_table_entry("The server's IP number","server-ip-no"); make_table_entry("Your language as recorded by your browser","language"); make_table_entry("The resolution of your screen","resolution"); make_table_entry("The colour of your screen","screencolour"); make_table_entry("The number of bits per pixel your display uses to represent colour","pixeldepth"); print"
"; print "

You provided us with the following extra information about the problem

\n"; print"\n"; make_table_entry("How bad the problem was","severity"); make_table_entry("What kind of problem it was","probtype"); make_table_entry("Other details","moredetails"); print "
\n"; print "

The following data was automatically collected from the form on the greenstone interface

\n"; print"\n"; print "\n"; foreach $key (keys(%reportvals)){ $key=~/-/; print "\n"; } print "
Type of inputName of inputValue of input
$`$'$reportvals{$key}
\n"; print ""; #This function takes a key into the report values interface, and a desription # of what that entry means, and makes a properly formatted html table entry sub make_table_entry { local ($desc, $entry) = @_; print "$desc:"; print "$reportvals{$entry}\n"; delete $reportvals{$entry}; }