29 lines
1.2 KiB
PHP
29 lines
1.2 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_sub_section.xls');
|
|
?>
|
|
<table border="1">
|
|
<?php
|
|
$sql="select sub_section_id,sub_section_name,firm_id,sbu_id,sub_section_head_emp_id from sub_section";
|
|
//echo $sql;
|
|
$result = mysqli_query($conn,$sql);
|
|
//echo $result;
|
|
?><tr><th>Sub Section Name</th><th>Business Unit</th><th>Department Name</th><th>Head Emp ID</th></tr><?php
|
|
while($rowOfEmployee=mysqli_fetch_array($result)){
|
|
$emp_id=getTableFieldValue('employee','fname','id',$rowOfEmployee['sub_section_head_emp_id'],'');
|
|
$sbu_id=getTableFieldValue('sub_business_unit','sbu_name','sbu_id',$rowOfEmployee['sbu_id'],'');
|
|
$firm_id=getTableFieldValue('tbl_firms','firm_name','firm_id',$rowOfEmployee['firm_id'],'');
|
|
$section_name=getTableFieldValue('section','section_name','section_id',"'". $rowOfEmployee['section_id']."'");
|
|
|
|
?><tr><td><?php echo $rowOfEmployee['sub_section_name']?></td><td><?php echo $firm_id?></td><td><?php echo $sbu_id?></td><td><?php echo $emp_id?></td>
|
|
</tr><?php
|
|
|
|
}
|
|
?>
|
|
</table>
|
|
<?php
|
|
//include('pdf_footer.php');
|
|
?>
|