Oxygen Sensor Certification Exam Results

“;

$percentage = $correct/10 * 100;
echo “Your score was ” . $percentage . “%, “;

if($percentage < 60) $grade = 'an F'; if($percentage >= 60) $grade = ‘a D’;
if($percentage >= 70) $grade = ‘a C’;
if($percentage >= 80) $grade = ‘a B’;
if($percentage >= 90) $grade = ‘an A’;
echo “which is ” . $grade . “.
“;

if($percentage >= 70) $pass = 1;
else $pass = 0;
?>

You have not scored high enough to become a certified Walker Products Oxygen Sensor Technician.”
?>

‘ . $certName . ‘
‘ . $_SESSION[certDate] . ‘

‘;
}

INCLUDE ‘/home/sites/walkerproducts.com/public_html/wp/timesheet/db-config.php’;
dbConnect();
mysql_select_db(“walkerproducts”) or die(mysql_error());
mysql_query(“INSERT INTO certification_test_results
(name, email, grade, certified) VALUES(‘$certName’, ‘$certEmail’, ‘$percentage’, ‘$pass’) “)
or die(mysql_error());

include ‘Mail.php’;
include ‘Mail/mime.php’ ;
include ‘/home/sites/walkerproducts.com/public_html/wp/wp-content/training-guide/O2Certificate-email-pdf.php’;

$html = ‘‘;
$html .= ‘‘;
if($pass){
$html .= “

Congratulations! You’ve passed!

“;
$html .= “Your score was ” . $percentage . “%, which is ” . $grade;
$html .= ‘
You are now a Certified Walker Products Oxygen Sensor Technician. Your certificate has been attached to this email for your records.’;
$html .= ‘

Congratulations,
The Walker Products Team’;
$file = ‘/home/sites/walkerproducts.com/public_html/wp/wp-content/training-guide/generated-pdfs/’.$_SESSION[‘output-file’];
}
else {
$html .= “

We are sorry, but you have not scored high enough on our Certification Exam to pass.

“;
$html .= “Your score was ” . $percentage . “%, which is ” . $grade;
$html .= ‘
You have not yet become a Certified Walker Products Oxygen Sensor Technician. However, we encourage you to continue studying our Certification Training Manual and take the test again when you are prepared.’;
$html .= ‘

Sincerely,
The Walker Products Team’;
$file = ‘a.txt’;
}
$html .= ‘‘;
$text = strip_tags($html);
$crlf = “\n”;
$hdrs = array(
‘From’ => ‘Walker Products ‘,
‘Subject’ => ‘Walker O2 Sensor Technician Certification’
);

$mime = new Mail_mime(array(‘eol’ => $crlf));

$mime->setTxtBody($text);
$mime->setHTMLBody($html);
$mime->addAttachment($file, ‘application/pdf’, $name=”certification.pdf”);

$body = $mime->get();
$hdrs = $mime->headers($hdrs);

$mail =& Mail::factory(‘mail’);
$mail->send($certEmail, $hdrs, $body);

?>

[google1]
Your First Choice in Quality Products