Available Trainings
"; $qq=mysql_query("SELECT * FROM `pod_training_list` WHERE `status`='1' ORDER by `date` DESC "); //echo "
"; echo "

"; echo ""; echo ""; echo ""; echo ""; echo "
"; //=============================================================================================================================================================== echo ""; while($row = mysql_fetch_array($qq)){ $trainingID=$row['id']; $checkMyTrainingStatus=mysql_result(mysql_query("SELECT `status` FROM `pod_training_enrollees` WHERE `employee_id`='$empID' AND `training_id`='$trainingID'"),0); //CHECK IF TRAINING IS COMPLETE SO WE CAN REMOVED TRAINING IN THE LIST if($checkMyTrainingStatus==='1' || empty($checkMyTrainingStatus)){ //echo $empID. "
TID"; //echo $row['grouping'].'
'; if($row['grouping']==='OPEN'){ //LOAD ALL OPEN TRAINING echo ""; if(empty($row['cover_pic'])){ echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ $chkInvites = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `pod_training_invites` WHERE `training_id`='$trainingID' AND `employee_id`='$empID'"),0); //echo "COUNT:".$chkInvites,""; //LOAD INVITES //echo $chkInvites. "
ID
"; if($chkInvites > 0){ echo ""; if(empty($row['cover_pic'])){ echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } } } echo "
"; ?>
'>




"; }else{ echo "

".$row['title']."

".ucfirst(strtolower($row['description']))."

".ucfirst(strtolower($row['grouping']))." Training

"; echo "

Date Created: ".ucfirst(strtolower($row['date']))."
Created By: ".ucfirst(strtolower($row['created_by']))."

"; $chkIfStatus = mysql_result(mysql_query("SELECT `status` FROM `pod_training_enrollees` WHERE `training_id`='$trainingID' AND `employee_id`='$empID'"),0); if($chkIfStatus==='1'){ $myStatus='Incomplete - Please complete the training'; }else if(empty($chkIfStatus)){ $myStatus='You are required to take this training'; }else { $myStatus='Closed'; } echo "

".$myStatus."

"; echo "
"; ///======================================================================================================================================== //CHECK IF TRAINING HAS BEEN VIEWED OR OPEN $chkIfEnroll = mysql_result(mysql_query("SELECT COUNT('id') FROM `pod_training_enrollees` WHERE `training_id`='$trainingID' AND `employee_id`='$empID'"),0); if($chkIfEnroll > 0){ $chkPreExamExist = mysql_result(mysql_query("SELECT COUNT('id') FROM `pod_exam_taken` WHERE `training_id`='$trainingID' AND `employee_id`='$empID' AND `type`='PRE'"),0); //echo "TEST ".$chkPreExamExist; if($chkPreExamExist > 0){ echo "

You can now proceed with the proper training....

"; //echo " "; }else{ echo "

You can only start your training after you have completed the required pre-test assessment.

"; } }else { echo "

You can only start your training after you have completed the required pre-test assessment.

"; } ///======================================================================================================================================== echo "

"; ?>
'>




"; }else{ echo "

".$row['title']."

".ucfirst(strtolower($row['description']))."

".ucfirst(strtolower($row['grouping']))." Training

"; echo "

Date Created: ".ucfirst(strtolower($row['date']))."
Created By: ".ucfirst(strtolower($row['created_by']))."

"; $chkIfStatus = mysql_result(mysql_query("SELECT `status` FROM `pod_training_enrollees` WHERE `training_id`='$trainingID' AND `employee_id`='$empID'"),0); if($chkIfStatus==='1'){ $myStatus='Incomplete - Please complete the training'; }else if(empty($chkIfStatus)){ $myStatus='You are invited and required to take this training'; }else { $myStatus='Closed'; } echo "

".$myStatus."

"; echo "
"; ///============================================================================================================================================================================================================ //CHECK IF TRAINING HAS BEEN VIEWED OR OPEN $chkIfEnroll = mysql_result(mysql_query("SELECT COUNT('id') FROM `pod_training_enrollees` WHERE `training_id`='$trainingID' AND `employee_id`='$empID'"),0); if($chkIfEnroll > 0){ $chkPreExamExist = mysql_result(mysql_query("SELECT COUNT('id') FROM `pod_exam_taken` WHERE `training_id`='$trainingID' AND `employee_id`='$empID' AND `type`='PRE'"),0); //echo "TEST ".$chkPreExamExist; if($chkPreExamExist > 0){ echo " "; //echo " "; }else{ echo "

You can only start your training after you have completed the required pre-test assessment.

"; } }else { echo "

You can only start your training after you have completed the required pre-test assessment.

"; } ///============================================================================================================================================================================================================ echo "

"; //=============================================================================================================================================================== echo "
"; echo "
"; // echo "
"; //echo ""; ?>