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

163 lines
4.8 KiB
PHP

<?php
include('includes/functions.php');
include('pdf_header_reverse.php');
?>
<html>
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
<style>
table {
text-align: center;
text-transform: uppercase;
}
</style>
<body>
<?php
include "pdf_ohc_header.php";
?>
<table width="100%">
<tr>
<div style="font-size:12px">
<td width="50%" align="center" style="font-size:15px"><strong>CSR PROGRAM DETAILS</strong></td>
</tr>
</table>
<br>
<table border="1" style="text-aling: center;" width="100%">
<?php
$i=1;
$sql="SELECT * from csr_program where csr_id ='".$_REQUEST['flex_csr_id']."'";
$result = mysqli_query($conn,$sql);
while($fetchData=mysqli_fetch_array($result)){
$program_name= $fetchData['program_name'];
$program_details= $fetchData['program_details'];
$location= $fetchData['location'];
$start_date_time= $fetchData['start_date_time'];
$end_date_time= $fetchData['end_date_time'];
$coordinator_name= $fetchData['coordinator_name'];
$sub_coordinator_name= $fetchData['sub_coordinator_name'];
$total_participate= $fetchData['total_participate'];
$remarks= $fetchData['remarks'];
}
?>
<tr bgcolor="#eeeeee">
<th width="10%" ;>Program Name</th>
<th width="10%" ;>Program Details</th>
<th width="10%" ;>Program Location</th>
<th width="10%" ;>Start Date</th>
<th width="10%" ;>Start Time</th>
</tr>
<tr>
<td><?php echo $program_name ?></td>
<td><?php echo $program_details ?></td>
<td><?php echo $location ?></td>
<td><?php $date=date_create($start_date_time);
echo date_format($date,"d-M-Y"); ?></td>
<td><?php $date=date_create($start_date_time);
echo date_format($date,"h:i a"); ?></td>
</tr>
</table>
<br>
<table border="1" style="text-aling: center;">
<tr bgcolor="#eeeeee">
<th width="10%" ;>End Date</th>
<th width="10%" ;>End Time</th>
<th width="10%" ;>Coordinator Name</th>
<th width="10%" ;>Sub coordinator Name </th>
<th width="10%" ;>Total Participate </th>
</tr>
<tr>
<td><?php $date=date_create($end_date_time);
echo date_format($date,"d-M-Y"); ?></td>
<td><?php $date=date_create($end_date_time);
echo date_format($date,"h:i a"); ?></td>
<td><?php echo $coordinator_name ?></td>
<td><?php echo $sub_coordinator_name ?></td>
<td><?php echo $total_participate ?></td>
</tr>
</table>
<br>
<table border="1" style="text-aling: center;" width="100%">
<tr bgcolor="#eeeeee">
<th width="5%" ;>Remarks</th>
</tr>
<tr>
<td><?php echo $remarks ?></td>
</tr>
</table>
<br> <br>
<table width="100%">
<tr>
<div style="font-size:12px">
<td width="50%" align="center" style="font-size:20px"><strong>Participate Details</strong></td>
</tr>
</table>
<br>
<table border="1" style="text-aling: center;">
<?php
$i=1;
$sql="SELECT * from participate_csr_program where csr_id = '".$_REQUEST['flex_csr_id']."'";
//echo $sql;
$result = mysqli_query($conn,$sql);
//echo $result;
?>
<tr bgcolor="#eeeeee">
<th width="5%" ;> Sn</th>
<th width="10%" ;> Participant Type</th>
<th width="10%" ;> Participate Name</th>
<th width="10%" ;> Address</th>
<th width="10%" ;> Phone</th>
<th width="10%" ;> Vitals Checked</th>
<th width="20%" ;> Items Given</th>
<th width="10%" ;> Total Cost</th>
<th width="10%" ;> Remarks</th>
</tr>
<?php
while($participate=mysqli_fetch_array($result)){?>
<tr style="text-align: center;">
<td><?php echo $i ?></td>
<?php
if ($participate['participate_type'] == "e") {
$type = "Employee";
}else{
$type = "Guest";
}
if ($participate['patient_id'] == 0) {
$name = $participate['participate_name'];
}else {
$name = getFieldFromTable('patient_name' , 'patient_master' , 'id' , $participate['patient_id'] );
}
?>
<td><?php echo $type ?></td>
<td><?php echo $name ?></td>
<td><?php echo $participate['address']?></td>
<td><?php echo $participate['contact']?></td>
<td><?php echo $participate['vitals_check']?></td>
<td><?php echo $participate['item_id']?></td>
<td><?php echo $participate['total_cost']?></td>
<td><?php echo $participate['remarks']?></td>
</tr>
<?php
$i++;
}
?>
</table>
</body>
<link rel="stylesheet" href="css/select2.min.css">
</html>
<?php
include('pdf_footer.php');
?>