Stress Test Result
if( !is_array( $_REQUEST ) ) { $_REQUEST = array_merge( $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS ); }
foreach( $_REQUEST as $key => $value ) { $$key = $value; }
function stripscript( $mystring ) {
if( get_magic_quotes_gpc() ) { $mystring = stripslashes( $mystring ); }
return htmlspecialchars( $mystring );
}
?>
print stripscript( $questiontitle )."\n";
?>
$max = 0;
$total = 0;
for( $x = 1; $x <= count( $qtot ) + 1; $x++ ) {
//the hidden input gives the maximum for each question
$max += $qtot[$x];
if( $q[$x] && gettype( $q[$x] ) == 'array' ) {
//if it is a checkbox input, add the number that have been checked
$total += count( $q[$x] );
} else {
//if it is a radio input, add its value
$total += $q[$x];
}
}
$score = floor( 100 * ( $total / $max ) );
print stripscript( $questionreplystart ) ." ". $score ."% ". stripscript( $questionreplyend )."
\n”;
if( count( $customresponse ) ) {
//if they have chosen custom responses, find the highest valued one that works.
$got_one = “”;
for( $x = 0; $x <= $score; $x++ ) {
if( $customresponse[$x] && $score >= $x ) {
$got_one = $customresponse[$x];
}
}
print “
“.stripscript( $got_one ).” check out our recommended resource for beating stress here
\n”;
}
?>