csrtechnew.ohctech.in/attendence_list_excel.php
2025-04-14 13:28:09 +05:30

43 lines
1.3 KiB
PHP

<?php
include('pdf_header.php');
include('includes/config/config.php');
//include('pop_up_top.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=attendence_list_excel.xls');
?>
<table border="1" width="100%">
<?php
$id = $_REQUEST['id'];
$sql = "SELECT * FROM attendance_batch where ohc_type_id = '".$_SESSION['current_ohcttype']."'";
//echo $sql;
$result = mysqli_query($conn, $sql);
// $rowOfEmployee = mysqli_fetch_array($result);
?>
<tr bgcolor='#eeeeee' >
<th width=33%>Batch Name </th>
<th width=33%>Attendance Date</th>
<th width=33%>Remarks</th>
</tr>
<?php
while($rowOfEmployee = mysqli_fetch_array($result)) {
$batch_name = getFieldFromTable('batch_name', 'training_batch_master', 'batch_id', $rowOfEmployee['batch_id']);
$attendence_date = date_format(date_create($rowOfEmployee['attendence_date']),"d-m-Y");
?>
<tr>
<td align="center"><?php echo $batch_name ?></td>
<td align="center"><?php echo $attendence_date ?></td>
<td align="center"><?php echo $rowOfEmployee['remarks'] ?></td>
</tr>
<?php } ?>
</table>
<?php
//include('pdf_footer.php');
?>