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

132 lines
3.3 KiB
PHP

<?php
include('pdf_header.php');
include('includes/config/config.php');
// include('pop_up_top.php'); // Uncomment if needed
?>
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
h2 {
text-align: center;
font-size: 24px;
margin: 20px 0;
color: #333;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background-color: #fff;
}
th, td {
border: 1px solid #ddd;
padding: 10px;
text-align: left;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f1f1f1;
}
.container {
width: 90%;
margin: 0 auto;
}
</style>
</head>
<body>
<?php
$max_total =0;
$max_scored =0;
$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>
<div class="container">
<h2>Course List</h2>
<table border="1" cellspacing="0" cellpadding="5">
<?php
$ohc_type_id = "ohc_type_id = ".$_SESSION['current_ohcttype'];
$sql = "SELECT name, code, subjects FROM courses where $ohc_type_id";
$result = mysqli_query($conn, $sql);
?>
<tr>
<th>Course Name</th>
<th>Course Code</th>
<th>Subjects</th>
</tr>
<?php
while ($rowOfprograme = mysqli_fetch_array($result)) {
$subjects = getCommaSeperatedValuesForInClause("SELECT subject_name FROM subjects", "subject_id", $rowOfprograme['subjects']);
?>
<tr>
<td><?php echo htmlspecialchars($rowOfprograme['name']); ?></td>
<td><?php echo htmlspecialchars($rowOfprograme['code']); ?></td>
<td><?php echo htmlspecialchars($subjects); ?></td>
</tr>
<?php
}
?>
</table>
</div>
<?php
include('pdf_footer.php');
?>
</body>
</html>