#********************************************************* # Script for getting bug reports #********************************************************* # define the bug file $bugs = "../htdocs/bugs.shtml"; #Call in the CGI library. require "cgi-lib.pl"; if (&MethGet) { # under GET return form. &ReturnForm; } else { # Under POST, process the report. &WriteReport } #********************************************************* # ReturnForm Subroutine #********************************************************* sub ReturnForm { print "Content-type: text/html\r\n\r\n"; print "\n"; print "Bug report\n"; print "\n"; print "\n"; print "

Submit a bug or suggestion

\n"; print "
\n"; print "
\n"; print "

\n"; print "Please, enter your name:\n"; print "\n"; print "

\n"; print "and your e-mail address:\n"; print "\n"; print "

\n"; print "Select the severity of the bug (1=not serious, 5=very serious):\n"; print "

\n"; print " 1 \n"; print " 2 \n"; print " 3 \n"; print " 4 \n"; print " 5 \n"; print "

\n"; print "

Please describe the bug or suggestion: \n"; print "
\n"; print " \n"; print "

\n"; print " \n"; print " \n"; print "

Thank you!

\n"; print "

\n"; print "\n"; } #********************************************************* # WriteReport Subroutine #********************************************************* sub WriteReport { # Open the report file open (REPORT,">>" . $bugs) || die "Could not open the bugs file \n"; # Parse the form pairs into %in, @in, $in &ReadParse; # Write the bug report print REPORT "

\n"; print REPORT "Bug severity: $in{severity} \n"; print REPORT "

\n"; print REPORT "

$in{bugtext}
\n"; print REPORT "

\n"; print REPORT "Submitted by $in{username}, $in{email} \n"; print REPORT "


\n"; close REPORT; # Send acknowledgement back print "Content-type: text/html\r\n\r\n"; print "Bug or suggestion submitted \n"; print "\n"; print "

\n"; print "

Thanks $in{username}

\n"; print "

\n"; print "

Your suggestion or bug report regarding Pebble is much welcome!

\n"; print "

\n"; print "You can see here the bugs and suggestions received.

\n"; print "

\n"; print "\n"; }