getVars($_POST); $get->getVars($_GET); $s->getVars($_SESSION); } switch($action){ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // gencert //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"gencert": include("../lib/dynamicImageTool.php"); $res = $db->query("SELECT firstname, initial, lastname FROM users WHERE user_id='$s->suser_id'"); $res->fetchInto($row); $res->free(); $name = "$row->firstname $row->initial $row->lastname"; $name = strtoupper($name); $location = $db->getOne("SELECT classes.schoolLocation FROM classes LEFT JOIN grades USING(class_id) WHERE grades.user_id='$s->suser_id' AND classes.class_id='$get->class_id' AND grades.paid='y' AND grades.pass='y'"); if ($get->cert=="co"){ $template="CO.jpg"; }elseif($get->cert=="coxray"){ $template="COXRAY.jpg"; }elseif($get->cert=="nvxray"){ $template="nvxray.jpg"; }elseif($get->cert=="az"){ $template="AZ.jpg"; }elseif($get->cert=="ca"){ $template="CA.jpg"; } elseif($get->cert=="wa"){ $template="WA.jpg"; } elseif($get->cert=="oh"){ $template="OH.jpg"; } elseif($get->cert=="tx"){ $template="TX.jpg"; } elseif($get->cert=="nv"){ $template="NV.jpg"; } $res = $db->query("SELECT * FROM grades WHERE user_id='$s->suser_id' AND class_id='$get->class_id'"); $res->fetchInto($grades); if (($grades->pass!="y")||($grades->paid!="y")){ // no cert for you... include("inc/head.php"); print<<Error

The system shows no available certificates for you to download for this class.

If you feel you should be able to download your certificate(s), please contact the administrators.

Return to classes

eof; }else{ $completedDate = $db->getOne("SELECT endDate FROM classes WHERE class_id='$get->class_id'"); $filename = generateCertificate($name,$location,$template,$get->class_id,$completedDate); garbageCollection(); if (!function_exists('mime_content_type')) { function mime_content_type($f) { $f = escapeshellarg($f); return trim( `file -bi $f` ); } } $mimeType =mime_content_type("../images/temp/$filename.jpg"); $filename="../images/temp/$filename.jpg"; $filesize=filesize("$filename"); header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: $mimeType"); header("Content-Disposition: attachment; filename=".basename($filename).";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: " .$filesize.";"); $fh = fopen( $filename , "r"); fpassthru($fh); } break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // default //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// default: print<<Your Certificates

Below are all the certificates for which you are currently eligible.

eof; $res= $db->query("SELECT classes.* FROM classes LEFT JOIN students USING(class_id) WHERE students.user_id='$s->suser_id' ORDER BY classes.className ASC"); if ($res->numRows()==0){ print<< eof; } $printed=0; while($res->fetchInto($row)){ $schoolLocation=$row->schoolLocation; //check for passing... if ($db->getOne("SELECT count(grade_id) FROM grades WHERE pass='y' AND paid='y' AND user_id='$s->suser_id' AND class_id='$row->class_id'")>0){ print<< eof; $loc = explode(",",$schoolLocation); if ($loc[1]==" CO"){ // CO certs print<< eof; }else if($loc[1]==" CA"){ // CA print<< eof; }else if($loc[1]==" TX"){ // CA print<< eof; }else if($loc[1]==" OH"){ // CA print<< eof; }else if($loc[1]==" WA"){ // CA print<< eof; }else if($loc[1]==" NV"){ // CA print<< eof; }else{ // AZ certs print<< eof; } } } print<<
You have not been enrolled in any classes

$row->className - $row->schoolLocation

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You have successfully completed the Dental Radiological Course at the National School of Denal Assisting consisting of 12 education and course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your X Ray Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

You are now eligible to get your X Ray certificate.
Click here to download your X Ray Certificate.

You have successfully completed the Dental Assisting Course at the National School of Denal Assisting consisting of 152 hours of course work. You are now eligible to get your certificate. Click the below link to generate and download your certificate.
Click here to download your Certificate.

Download and Printing Instructions

1. Click on the link above that states, “Click here to download your...”
2. Choose a location to save the .jpg file
3. Find the file in the folder in which it was saved
4. Double click the .jpg file to automatically open it
(NOTE: .jpg files are a common format that will open with various programs found on your computer)
5. Print the file if a hard copy is desired

eof; break; } include("inc/foot.php"); ?>