74 lines
2.9 KiB
PHP
74 lines
2.9 KiB
PHP
<?php
|
|
include('pdf_header.php');
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
|
|
?>
|
|
<table width="100%" >
|
|
<tr><div style="font-size:12px">
|
|
<td width="25%" align="left"> Run Date : <?php echo date("d-M-Y"); ?></td>
|
|
<td width="50%" align="center" style="font-size:40px"><strong>Checkup List</strong></td>
|
|
<td width="25%" align="left"> User : <?php echo $username ?></td>
|
|
</tr>
|
|
</table>
|
|
<table border="1">
|
|
<?php
|
|
$sql = "select * from employee_assign_checkup ";
|
|
//echo $sql;
|
|
|
|
|
|
$result = mysqli_query($conn,$sql);
|
|
|
|
//echo $result;
|
|
|
|
?><tr bgcolor='#eeeeee'><th width=5%>Id</th><th width=15%>Employee Name</th><th width=20%>Checkup Name</th><th width=20%>From Date</th><th width=20%>To Date</th><th width=20%>Checkup Location</th><th width=20%>Checkup By</th><th width=20%>Status</th>
|
|
</tr><?php
|
|
while($row_checkup=mysqli_fetch_array($result)){
|
|
if($row_checkup['status']=="N"){
|
|
$status="Not Completed";
|
|
}else if($row_checkup['status']=="Y"){
|
|
$status="Completed";
|
|
}
|
|
$emp_name=getTableFieldValue('employee',"CONCAT(fname,' ',lname)",'id',$row_checkup['emp_id']);
|
|
|
|
|
|
|
|
$employee_categories="";
|
|
$emp_cat_ids=array();
|
|
if($row_checkup['emp_cat_id']!=null && $row_checkup['emp_cat_id']!=""){
|
|
$emp_cat_ids= explode(",",$row_checkup['emp_cat_id']);
|
|
|
|
for($i=0;$i<count($emp_cat_ids);$i++){
|
|
if($i==count($emp_cat_ids)-1)
|
|
$employee_categories.=getTableFieldValue('employee_category','emp_cat_name','emp_cat_id',$emp_cat_ids[$i]);
|
|
else
|
|
$employee_categories.=getTableFieldValue('employee_category','emp_cat_name','emp_cat_id',$emp_cat_ids[$i]).",";
|
|
}
|
|
}
|
|
|
|
$query_schedule = "select * from checkup_list_mgmt where checkup_mgmt_id='".$row_checkup['checkup_schedule_id']."' ";
|
|
//echo $query_schedule;
|
|
$result_schedule = @mysqli_query($conn,$query_schedule);
|
|
|
|
while($rows_schedule = mysqli_fetch_assoc($result_schedule)){
|
|
|
|
|
|
$checkup_name=getTableFieldValue('checkup_master','checkup_name','checkup_master_id',$rows_schedule['checkup_mgmt_name']);
|
|
// echo $checkup_name;
|
|
$from_date= date_format(date_create($rows_schedule['from_date']),"d-M-Y");
|
|
$to_date=date_format(date_create($rows_schedule['to_date']),"d-M-Y");
|
|
$checkup_by=$rows_schedule['checkup_by'];
|
|
//echo
|
|
$checkup_location=$rows_schedule['checkup_location'];
|
|
//$training_schedule= $training_name.'('.$rows_schedule['trainer_name'].','.date_format(date_create($row_training['from_date']),"d-M-Y").' '.date_format(date_create($row_training['to_date']),"d-M-Y").')';
|
|
|
|
}
|
|
?><tr><td><?=$row_checkup['assign_checkup_id']?></td><td><?= $emp_name?></td><td><?= $checkup_name?></td><td><?=$from_date?></td><td><?=$to_date?></td><td><?=$checkup_by?></td><td><?=$checkup_location?></td><td><?=$status?></td>
|
|
</tr><?php
|
|
}
|
|
?>
|
|
</table>
|
|
<?php
|
|
include('pdf_footer.php');
|
|
?>
|