?
Current Path : /home1/savoy/www/savoyglobal.net/sibs_draft/system/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/www/savoyglobal.net/sibs_draft/system/application/views/Report/dailyactivityxls.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php if ($search == "") $search = 'search'; if($fromdate == '') $fromdate = 'fromdate'; if($todate=='') $todate = 'todate'; $cov=$this->mastermodel->get_data_srow('staffpersonaldetails',$search,'id'); $bran_id=$this->customermodel->getSingleFieldValue('customer_account','branch_id','customer_id',$search); $bra_name=$this->customermodel->getSingleFieldValue('ourbranch','branchname','id',$bran_id); $csv_output=''; $csv_output.=" <table> <tr><th>Employee Daily Activity Report</th></tr> <tr><th></th></tr> <tr><td>Employee Name:</td><td>$cov->name</td></tr> <tr><td>Branch:</td><td>$bra_name</td></tr> <tr><td>Period:</td><td>"; if ($todate != 'todate'){ $csv_output .= "$fromdate to $todate"; } $csv_output.="</td> </tr> </table> <table width='90%' class='sort' border='1' cellpadding='1' cellspacing='-1'><thead> <tr> <th>Sl No</th> <th>Date</th> <th>Time</th> <th>Customer Name</th> <th>Contact Person</th> <th>Designation</th> <th>Tel No</th> <th>Remarks</th> </tr>"; $i=1; foreach($viewinfo as $updata) { $csv_output .= "<tr> <td>".$i++."</td> <td>".$this->mastermodel->convdatformat($updata['date'])."</td> <td>".$updata['time']."</td> <td>".$updata['name']."</td> <td>".$updata['contact_person']."</td> <td>".$updata['designation']."</td> <td>".$updata['tel_no']."</td> <td>".$updata['remarks']."</td> </tr>"; } $csv_output .= "</table>"; $filename = "Report"; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$filename.".xls"); header("Pragma: no-cache"); header("Expires: 0"); print $csv_output; exit; ?>