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

82 lines
2.8 KiB
PHP

<?php
include('pdf_header_reverse.php');
$type = isset($_GET['type']) ? $_GET['type'] : ''; // Get the type parameter
error_log("Check_type : " . $type);
if ($type === 'excel') {
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=item_rate_list_pdf.xls");
header("Pragma: no-cache");
header("Expires: 0");
// Ensure no further output is sent to the browser
ob_clean(); // Clear output buffer
flush(); // Flush system output buffer
}
if ($type !== 'excel') {
include('pdf_ohc_header.php');
}
?>
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
<body>
<table width="100%">
<tr>
<div style="font-size:12px">
<td width="25%" align="left"> Run Date : <?php echo date("d-M-Y"); ?></td>
<td width="50%" align="center" style="font-size:20px;padding-bottom: 20px;"><strong>Course Changed Beneficiary List</strong></td>
<td width="25%" align="left"> User : <?php echo $username ?></td>
</tr>
</table>
<table border="1" width="100%">
<tr bgcolor="#eeeeee">
<td align="left" width="2%">Sr.</td>
<td align="left" width="10%">Batch Name</td>
<td align="left" width="10%">Beneficiary Name</td>
<td align="left" width="10%">Previous Course Name</td>
<td valign="top" width="15%" align="left">Current Course Name</td>
<td valign="top" align="left" width="25%">Apply Date</td>
<td width="10%" valign="top" align="left">Approval Status</td>
<td valign="top" align="left" width="15%">Remarks</td>
</tr>
<?php
// $sql = base64_decode($filterkey);
$sql = "SELECT * from course_change WHERE ohc_type_id = '".$_SESSION['current_ohcttype']."'";
$results = mysqli_query($conn, $sql);
$count = 1;
while ($row1 = mysqli_fetch_assoc($results)) {
$beneficiary_name = getFieldFromTable('beneficiary_name', 'beneficiary_enquiry', 'patient_id', $row1['beneficiary_id']);
$batch_name = getFieldFromTable('batch_name', 'training_batch_master', 'batch_id', $row1['batch_name']);
$old_course = getFieldFromTable('name', 'courses', 'id', $row1['old_course']);
$new_course = getFieldFromTable('name', 'courses', 'id', $row1['new_course']);
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo $batch_name; ?></td>
<td><?php echo $beneficiary_name; ?></td>
<td><?php echo $old_course; ?></td>
<td><?php echo $new_course; ?></td>
<td><?php echo $row1['apply_date']; ?></td>
<td><?php echo $row1['status']; ?></td>
<td><?php echo $row1['remarks']; ?></td>
</tr>
<?php
$count++;
}
?>
</table>
</body>
<?php
if ($type !== 'excel') {
include('pdf_footer.php');
}
?>