?
Current Path : /home1/savoy/public_html/oscarerp.com/application/views/report/ |
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/public_html/oscarerp.com/application/views/report/xls_monthly_statistics_report.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $total_qm1=$this->reportmodel->get_children('Qatari','Male','0','1',$postdata); $total_qm2=$this->reportmodel->get_children('Qatari','Male','1','2',$postdata); $total_qm3=$this->reportmodel->get_children('Qatari','Male','2','3',$postdata); $total_qm4=$this->reportmodel->get_children('Qatari','Male','4','20',$postdata); $total_qf1=$this->reportmodel->get_children('Qatari','Female','0','1',$postdata); $total_qf2=$this->reportmodel->get_children('Qatari','Female','1','2',$postdata); $total_qf3=$this->reportmodel->get_children('Qatari','Female','2','3',$postdata); $total_qf4=$this->reportmodel->get_children('Qatari','Female','4','20',$postdata); $total_fm1=$this->reportmodel->get_children('Foreign','Male','0','1',$postdata); $total_fm2=$this->reportmodel->get_children('Foreign','Male','1','2',$postdata); $total_fm3=$this->reportmodel->get_children('Foreign','Male','2','3',$postdata); $total_fm4=$this->reportmodel->get_children('Foreign','Male','4','20',$postdata); $total_ff1=$this->reportmodel->get_children('Foreign','Female','0','1',$postdata); $total_ff2=$this->reportmodel->get_children('Foreign','Female','1','2',$postdata); $total_ff3=$this->reportmodel->get_children('Foreign','Female','2','3',$postdata); $total_ff4=$this->reportmodel->get_children('Foreign','Female','4','20',$postdata); $total1=$total_qm1+$total_qm2+$total_qm3+$total_qm4; $total2=$total_qf1+$total_qf2+$total_qf3+$total_qf4; $total3=$total_fm1+$total_fm2+$total_fm3+$total_fm4; $total4=$total_ff1+$total_ff2+$total_ff3+$total_ff4; $total_q= $designation=$this->mastermodel->getdatas('designation','designation_id'); $html = '<html><head><body>'; $html.='<table width="100%"> <tr><td colspan="7" style="text-align:center"><b>Nursery Statistics Report for the period: '.$postdata['from_date'].' to '.$postdata['to_date'].'</b></td></tr> </table><br><br>'; $html.='<table width="100%" > <tr> <td></td> <td><b>Name of Nursery:</b> </td><td>'.$nursery->nursery_name.'</td> <td></td> <td></td> <td><b>The Muncipality:</b> </td><td>'.$nursery->municipality.'</td> </tr> <tr> <td></td> <td><b>The type of nursery curriculum:</b> </td><td colspan="5">'.$nursery->curriculum.'</td> </tr> </table><br><br>'; $html.='<table cellspacing="-1" style="width:100%;text-align:left" border="1"> <thead> <tr><td colspan="7" style="text-align:center"><b>The numbers of age groups in the nursery</b></td></tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">Children Age</th> <th style="text-align:left" bgcolor="#7FCEFF">Less than a year</th> <th style="text-align:left" bgcolor="#7FCEFF">1 to 2</th> <th style="text-align:left" bgcolor="#7FCEFF">2 to 3</th> <th style="text-align:left" bgcolor="#7FCEFF">Over 4</th> <th style="text-align:left" bgcolor="#7FCEFF">Total</th> </tr> <tr> </thead> <tbody> <th rowspan="2" style="text-align:left" bgcolor="#7FCEFF">Qatari</th> <th style="text-align:left" bgcolor="#7FCEFF">Boys</th> <td>'.$total_qm1.'</td> <td>'.$total_qm2.'</td> <td>'.$total_qm3.'</td> <td>'.$total_qm4.'</td> <td>'.$total1.'</td> </tr><tr> <th style="text-align:left" bgcolor="#7FCEFF">Girls</th> <td>'.$total_qf1.'</td> <td>'.$total_qf2.'</td> <td>'.$total_qf3.'</td> <td>'.$total_qf4.'</td> <td>'.$total2.'</td> </tr> </tr> <th rowspan="2" style="text-align:left" bgcolor="#7FCEFF">Non Qatari</th> <th style="text-align:left" bgcolor="#7FCEFF">Boys</th> <td>'.$total_fm1.'</td> <td>'.$total_fm2.'</td> <td>'.$total_fm3.'</td> <td>'.$total_fm4.'</td> <td>'.$total3.'</td> </tr> </tr> <th style="text-align:left" bgcolor="#7FCEFF">Girls</th> <td>'.$total_ff1.'</td> <td>'.$total_ff2.'</td> <td>'.$total_ff3.'</td> <td>'.$total_ff4.'</td> <td>'.$total4.'</td> </tr> '; $html.='</tbody></table><br/><br/>'; $html.='<table cellspacing="-1" style="width:100%;text-align:left" border="1"> <thead> <tr><td colspan="7" style="text-align:center"><b>Rooms used for children</b></td></tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">Children Age</th> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">No of rooms</th> </tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">Less than a year</th> <td></td> </tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">1 to 2r</th> <td></td> </tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">2 to 3</th> <td></td> </tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">Over 4</th> <td></td> </tr> <tr> <th colspan="2" style="text-align:left" bgcolor="#7FCEFF">Total</th> <td></td> </tr> </thead> </table><br/><br/>'; $html.='<table cellspacing="-1" style="width:100%;text-align:left" border="1"> <thead> <tr><td colspan="7" style="text-align:center"><b>Staff of nursery</b></td></tr> <tr> <th colspan="2" rowspan="2" style="text-align:center" bgcolor="#7FCEFF">Staff of nursery</th> <th colspan="3" style="text-align:center" bgcolor="#7FCEFF">Nationality</th> <th rowspan="2" style="text-align:center" bgcolor="#7FCEFF">Total</th> </tr> <tr> <th style="text-align:center" bgcolor="#7FCEFF">Qatari</th> <th style="text-align:center" bgcolor="#7FCEFF">Arabic</th> <th style="text-align:center" bgcolor="#7FCEFF">Foreign</th> </tr> </thead> <tbody>'; $t=0; $tq=0; $ta=0; $tf=0; foreach($designation as $list) { $td=0; $html.='<tr> <td colspan="2" bgcolor="#7FCEFF">'.$list['designation_name'].'</td>'; $q=$this->reportmodel->get_employee($list['designation_id'],'Qatari'); $a=$this->reportmodel->get_employee($list['designation_id'],'Arabic'); $f=$this->reportmodel->get_employee($list['designation_id'],'Foreign'); $td=$q+$a+$f; $tq+=$q; $ta+=$a; $tf+=$f; $t+=$td; $html.='<td>'.$q.'</td><td>'.$a.'</td><td>'.$f.'</td><td>'.$td.'</td> </tr>'; } $html.='<tr> <td colspan="2" bgcolor="#7FCEFF">Total</td>'; $html.='<td>'.$tq.'</td><td>'.$ta.'</td><td>'.$tf.'</td><td>'.$t.'</td> </tr>'; $html.='</tbody> </table><br/><br/>'; $html.='</body></html>'; $filename = $postdata['report_name']; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$filename.".xls"); header("Pragma: no-cache"); header("Expires: 0"); print $html; exit; ?>