?
Current Path : /home1/savoy/www/savoyglobal.net/horeitia/application/views/Reports/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/horeitia/application/views/Reports/xls_report_employeestatus.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $html='<html><head><body>'; $html.='<table width="100%"> <tr><td colspan="2"></td><td align="right"><img src="'.base_url().'assets/images/logo.gif" style="float:right"/></td> <tr><td colspan="3" style="font-size:16px;" align="center"><b><u>Employee Status Report</u></b></td></tr> <tr><td colspan="3">Printout Date : '.date('d-m-Y').', '.date('h:i:s a').'</td></tr> </table><br><br>'; $html.='<hr>'; $html.='<table cellspacing="-1" style="width:100%;text-align:left"> <thead> <tr bgcolor="#7FCEFF"><th style="text-align:left" bgcolor="#7FCEFF">Sl No</th> <th style="text-align:left" bgcolor="#7FCEFF">Old Employee No</th> <th style="text-align:left" bgcolor="#7FCEFF">Employee No</th> <th style="text-align:left" bgcolor="#7FCEFF">Employee Name</th> <th style="text-align:left" bgcolor="#7FCEFF">Passport No</th> <th style="text-align:left" bgcolor="#7FCEFF">Joining Date</th> <th style="text-align:left" bgcolor="#7FCEFF">DOB</th> <th style="text-align:left" bgcolor="#7FCEFF">Trade</th> <th style="text-align:left" bgcolor="#7FCEFF">Employee Basic</th> <th style="text-align:left" bgcolor="#7FCEFF">Camp</th> <th style="text-align:left" bgcolor="#7FCEFF">Site</th> <th style="text-align:left" bgcolor="#7FCEFF">Status</th> </tr></thead><tbody>'; $i=1; foreach($report as $rep) { $empname=$rep['emp_non_full_name']; $empno=$this->mastermodel->correctempno($rep['emp_non_no']); $joining_date=$this->mastermodel->convertdatenormalformat($rep['emp_non_date_joining']); $dob=$this->mastermodel->convertdatenormalformat($rep['emp_non_personal_dob']); $campname = $this->mastermodel->get_employee_current_camp($rep['emp_non_id']); $sitename = $this->mastermodel->get_employee_current_site($rep['emp_non_id']); $basic_salary = $this->mastermodel->get_employee_current_basic($rep['emp_non_id']); $status = $rep['active'] ? 'Active' : 'Inactive'; if($status=='Active') { $num_missing=$this->mastermodel->get_num_missing('leave','employee_id',$rep['emp_non_id'],'missing_id','0'); if($num_missing>0) $status="Missing / Absconding"; } $html.='<tr style="color:#555555"> <td>'.$i.'</td> <td>'.$rep['emp_non_no_old'].'</td> <td>'.$empno.'</td> <td>'.$empname.'</td> <td>⁣'.$rep['emp_non_passport_no'].'</td> <td>'.$joining_date.'</td> <td>'.$dob.'</td> <td>'.$rep['trade_name'].'</td> <td>'.$basic_salary.'</td> <td>'.$campname.'</td> <td>'.$sitename.'</td> <td>'.$status.'</td> </tr>'; $i++; } $html.='</tbody></table>'; $html.='<hr>'; $filename = "Employee Status Report"; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$filename.".xls"); header("Pragma: no-cache"); header("Expires: 0"); print $html; exit; ?>