ESH/excel_section.php
2024-10-23 18:28:06 +05:30

29 lines
1.1 KiB
PHP

<?php //include('pdf_header.php');
include('includes/config/config.php');
include('includes/functions.php');
//include('pop_up_top.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=excel_section.xls');
?>
<table border="1">
<?php
$sql="select section_id,section_name,firm_id,sbu_id,head_emp_id from section";
// echo $sql;
$result = mysqli_query($conn,$sql);
// echo $result;
//echo $result;
?><tr><th>Section Name</th><th>Bussiness Unit</th><th>Department Name</th><th>Section Head</th></tr><?php
while($rowOfEmployee=mysqli_fetch_array($result)){
$firm_id=getTableFieldValue('tbl_firms','firm_name','firm_id',$rowOfEmployee['firm_id'],'');
$sbu_id=getTableFieldValue('sub_business_unit','sbu_name','sbu_id',$rowOfEmployee['sbu_id'],'');
$head_emp_id=getTableFieldValue('employee','fname','id',$rowOfEmployee['head_emp_id'],'');
?><tr><td><?php echo $rowOfEmployee['section_name']?></td><td><?php echo $firm_id?></td><td><?php echo $sbu_id?></td>
<td><?php echo $head_emp_id?></td>
</tr><?php
}
?>
</table>
<?php
//include('pdf_footer.php');
?>