ESH/work_area_sample_level_pdf.php

97 lines
3.3 KiB
PHP
Raw Permalink Normal View History

2024-10-23 18:28:06 +05:30
<?php
//include('pdf_header.php');
include ('pdf_header_reverse.php');
//include ('includes/config/config.php');
//include ('includes/functions.php');
error_reporting(E_ERROR | E_PARSE);
// include('pop_up_top.php');
?>
<html>
<body>
<h3 align="center" >Work Area Sample Level Report</h3>
<div class="container">
<table border="1" align="center">
<?php
$Id=$_REQUEST['Id'];
//echo $Id;
$sql="select * from work_area_sample_level where sample_id = '$Id'";
//echo $sql;
$result = mysqli_query($conn,$sql);
// echo $result;
$count = 1;
?><tr bgcolor="#eeeeee" >
<th width=30%>Sample Name</th>
<th width=30%>Sample Date</th>
</tr>
<?php
$count = 0;
while ($rowOfEmpHygiene = mysqli_fetch_array($result)) {
$hyg_sample_id = $rowOfEmpHygiene['hyg_sample_id'];
// echo $hyg_sample_id;
$commentsAndRecommendations = $rowOfEmpHygiene['commentsAndRecommendations'];
$department_ids = $rowOfEmpHygiene['department_ids'];
$sqlEmp1 = "select sbu_name from sub_business_unit where sbu_id = '$department_ids'";
// echo $sqlEmp1;
$sqlEmp = "select sample_name from hygiene_sample where hyg_sample_id = '$hyg_sample_id'";
//echo $sqlEmp;
$sql_hyg_param_id="select * from work_area_hyg_parameter where hyg_parameter_id='$hyg_sample_id'";
// $empHygId = $rowOfEmpHygiene['emp_hyg_id'];
// echo $sql_hyg_param_id;
// $hygieneParameter = "select * from emp_checkup_hyg_parameter where emp_hyg_id = '$empHygId'";
// echo $hygieneParameter;
$resultHygieneParameter = mysqli_query($conn,$sql_hyg_param_id);
// $hygieneParameters = null;
$hygiene_currentValue=null;
//echo sdbhdfhd;
while($rowOfhygieneParameter = mysqli_fetch_array($resultHygieneParameter)){
$hygiene_id = $rowOfhygieneParameter['hyg_parameter_id'];
$sqlParameterName = "select * from hygiene where hygiene_id ='$hygiene_id' ";
// echo $sqlParameterName;
$resultParameterName = mysqli_query($conn,$sqlParameterName);
$rowParameterName = mysqli_fetch_array($resultParameterName);
$hygieneParameters = $hygieneParameters.$rowParameterName['hygiene_parameter'].'<br>';
$hygiene_currentValue = $hygiene_currentValue.$rowOfhygieneParameter['hyg_param_val'].'<br>';
$work_area_min_range=$rowParameterName['work_area_min_range'];
$work_area_max_range=$rowParameterName['work_area_max_range'];
$range=$work_area_min_range."-".$work_area_max_range;
}
$resultEmp = mysqli_query($conn,$sqlEmp);
$rowemp = mysqli_fetch_array($resultEmp);
$resultEmp1 = mysqli_query($conn,$sqlEmp1);
$rowemp1 = mysqli_fetch_array($resultEmp1);
// echo $rowemp['fname'];
?><tr><td align="center" ><?php echo $rowemp['sample_name']?></td><td align="center" ><?php echo date_format(date_create($rowOfEmpHygiene['sample_date']),"d-M-Y h:i:sa")?></td>
</tr>
</table>
<table border="1" align="center">
<tr>
<th width=10%>Sr. No</th>
<th width=25%>Department</th>
<th width=25%> Comments And Recommendations</th>
<th width=25%>Reference Range</th>
</tr>
<tr><td align="center" ><?php echo ++$count ?></td><td align="center" ><?php echo $rowemp1['sbu_name']?></td><td align="center" ><?php echo $commentsAndRecommendations?></td>
<td align="center" ><?php echo $range?></td>
</tr><?php
}
?>
</table>
</div>
<?php
include('pdf_footer.php');
?>