78 lines
2.0 KiB
PHP
78 lines
2.0 KiB
PHP
<?php
|
|
header("Content-type:application/octet-stream");
|
|
|
|
header("Content-type: application/x-msdownload");
|
|
header("Content-Disposition: attachment; filename=excel_visitor_details.xls");
|
|
header("Pragma: no-cache");
|
|
header("Expires: 0");
|
|
error_reporting(E_ALL & ~ E_NOTICE & ~ E_DEPRECATED);
|
|
?>
|
|
<?php
|
|
include ('includes/config/config.php');
|
|
include ('includes/functions.php');
|
|
// include('pop_up_top.php');
|
|
?>
|
|
<table width="100%" border="1" cellspacing="0" cellpadding="0"
|
|
style="font: Arial, Helvetica, sans-serif; font-size: XX-SMALL;">
|
|
<?php
|
|
|
|
// echo $filterkey;
|
|
$sql_visitor = base64_decode($filterkey);
|
|
// echo $sql_visitor;
|
|
error_log($filterkey);
|
|
error_log($sql_visitor);
|
|
$results_visitor = mysqli_query ($sql_visitor);
|
|
|
|
?>
|
|
<style>
|
|
td {
|
|
font-size: 8px;
|
|
}
|
|
</style>
|
|
<tr bgcolor="#eeeeee">
|
|
<td width="2%">Sr.</td>
|
|
<td width="10%">Visitor Date</td>
|
|
<td width="12%">Visitor's Name</td>
|
|
<td width="12%">Father's Name</td>
|
|
<td width="5%">Age</td>
|
|
<td width="5%">Gender</td>
|
|
<td width="9%">Gate Pass No.</td>
|
|
<td width="9%">Phone</td>
|
|
<td width="13%">Remarks</td>
|
|
<td width="13%">Doctor's Remarks</td>
|
|
</tr>
|
|
|
|
<?php
|
|
$count = 0;
|
|
|
|
while ( $row_visitor = mysqli_fetch_assoc ( $results_visitor ) ) {
|
|
// extract ( $row_visitor );
|
|
$age = date_diff(date_create($row_visitor['dob']), date_create('now'))->y;
|
|
$appointment_date = date('d-m-Y g:i a', strtotime($row_visitor['appointment_date']));
|
|
|
|
?>
|
|
<?php
|
|
$count = $count + 1;
|
|
?>
|
|
|
|
|
|
|
|
<tr>
|
|
<td><?php echo $count?></td>
|
|
<td><?php echo $appointment_date?></td>
|
|
<td><?php echo $row_visitor['patient_name']?></td>
|
|
<td><?php echo $row_visitor['father_name']?></td>
|
|
<td><?php echo $age?></td>
|
|
<td><?php echo $row_visitor['gender']?></td>
|
|
<td><?php echo $row_visitor['emp_code']?></td>
|
|
<td><?php echo $row_visitor['personal_phone']?></td>
|
|
<td><?php echo $row_visitor['remarks']?></td>
|
|
<td><?php echo $row_visitor['reviewer_comment']?></td>
|
|
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
</body>
|