csrtechnew.ohctech.in/parents_metting_pdf.php
2025-10-16 15:19:10 +05:30

223 lines
5.2 KiB
PHP

<?php include('pdf_header.php');
include('includes/config/config.php');
// include('pop_up_top.php');
?>
<style>
/* General Table Styling */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
th,
td {
/* border: 1px solid #ddd; */
padding: 10px;
text-align: center;
}
th {
background-color: #f4f4f4;
font-size: 16px;
color: #333;
}
td {
font-size: 14px;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #e2e2e2;
}
/* Logo and Header Styling */
.logo-container {
width: 100%;
margin-bottom: 20px;
}
.logo-container img {
margin: 0;
padding: 0;
height: 60px;
}
.header-center {
text-align: center;
}
.header-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
.header-subtitle {
font-size: 14px;
}
/* Result Table Styling */
.result-table th {
background-color: #eeeeee;
}
.result-table td {
background-color: #ffffff;
}
.total-row {
background-color: #d4edda;
font-weight: bold;
}
</style>
<?php
$queryc = "select * from company_profile ";
//echo $query;
$resultc = mysqli_query($conn, $queryc);
$row_company = mysqli_fetch_array($resultc);
@extract($row_company);
?>
<table>
<tr>
<td width="20%">
<?php if (isset($row_company['company_logo']) && $row_company['company_logo'] != null) { ?>
<img src="data:<?php echo $row_company['image_type'] ?>;base64,<?php echo base64_encode($row_company['company_logo']) ?>" style="width: 150px; height: 60px; margin: 0px; padding: 0px;">
<?php } ?>
</td>
<td width="60%">
<div style="margin-left: 20px;">
<center style="font-size: 15px ;"><b>
<?php echo $row_company['company_name'] ?>
<?php echo $row_for_ohc['ohc_type_name'] ?><br><br>
<span style="font-size: 12px; ;">Vocational Training Institute</span>
</b></center>
</div>
</td>
<td width="25%" align="left"> User :
<?php echo $username ?>
</td>
</tr>
</table>
<table width="100%">
<tr>
<div style="font-size:12px">
<td align="center" style="font-size:15px"><strong>Parents Metting</strong></td>
</tr>
</table>
<br>
<table border="1" width="100%">
<?php
$id = $_REQUEST['id'];
$sql = "SELECT a.*, b.*
FROM child_parents_meeting a
LEFT JOIN primary_parents_meeting b
ON a.ppm_id = b.ppm_id
WHERE a.ppm_id = '" . $id . "' ";
$result = mysqli_query($conn, $sql);
// $num_rows = @mysqli_num_rows($result);
$row = @mysqli_fetch_array($result);
$batch_name = getFieldFromTable('batch_name', 'training_batch_master', 'batch_id', $row['batch_name']);
$meeting_date = date_format(date_create($row['meeting_date']), "d-m-Y");
$arr = explode(',', $row['teacher_name']);
//echo $result;
?>
<tr bgcolor='#eeeeee'>
<th width=33%>Batch Name </th>
<th width=33%>Metting Date</th>
<th width=33%>Teacher Name</th>
</tr>
<tr>
<td align="center"><?php echo $batch_name ?></td>
<td align="center"><?php echo $meeting_date ?></td>
<td align="center">
<?php
// Check if $arr is defined and is an array
if (isset($arr) && is_array($arr)) {
foreach ($arr as $i) {
// Assuming $i is the staff_id
$staff_name = getFieldFromTable('staff_name', 'staff_master', 'staff_id', $i);
// Ensure the result is safe for output
echo htmlspecialchars($staff_name) . ",";
}
} else {
echo "No staff members found.";
}
?>
</td>
</tr>
</tr>
</table>
<hr>
<table border="1" width="100%">
<tr bgcolor='#eeeeee'>
<td align="center">Beneficiary Name </td>
<td align="center">Metting Status </td>
<td align="center">Parent Name </td>
<td align="center">Mobile No </td>
<td align="center">Relation </td>
<td align="center">Discussion Remark </td>
<td align="center">Signature</td>
</tr>
<?php
do {
?>
<tr>
<td bgcolor='#F8F0F0' align="center" width="20%"> <?php echo $row['beneficiary_name'] ?></td>
<td align="center" width="20%"> <?php echo $row['meeting_status'] ?></td>
<td align="center" width="20%"><?php echo $row['parent_name'] ?></td>
<td align="center" width="20%"><?php echo $row['mobile_no'] ?></td>
<td align="center" width="20%"><?php echo $row['relation'] ?></td>
<td align="center" width="20%"><?php echo $row['discussion_remark'] ?></td>
<td align="center" width="20%"></td>
</tr>
<?php
} while ($row = @mysqli_fetch_array($result));
?>
</table>
<?php
include('pdf_footer.php');
?>