180 lines
7.8 KiB
PHP
180 lines
7.8 KiB
PHP
|
|
<?php
|
||
|
|
include('includes/config/config.php');
|
||
|
|
include('includes/functions.php');
|
||
|
|
|
||
|
|
|
||
|
|
?>
|
||
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
||
|
|
<style>
|
||
|
|
@page {
|
||
|
|
margin: 15px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn {
|
||
|
|
background-color: #4CAF50;
|
||
|
|
border-radius: 5%;
|
||
|
|
border: none;
|
||
|
|
color: white;
|
||
|
|
padding: 5px 8px;
|
||
|
|
text-align: center;
|
||
|
|
text-decoration: none;
|
||
|
|
display: inline-block;
|
||
|
|
font-size: 12px;
|
||
|
|
margin: 4px 2px;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
@media print {
|
||
|
|
#printPageButton {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
th{
|
||
|
|
font-size: 7px;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
td{
|
||
|
|
font-size: 10px;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<body>
|
||
|
|
<?php include('pdf_ohc_header.php'); ?>
|
||
|
|
<div style="text-align: center; margin-bottom: 20px;">
|
||
|
|
<h2 style="font-size: 24px; margin: 0;">Placement Pool Report</h2>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<br>
|
||
|
|
<table border="1" width="100%" cellspacing="0" style="border-collapse: collapse; font-size: large;">
|
||
|
|
|
||
|
|
|
||
|
|
<thead>
|
||
|
|
<tr class="highlight">
|
||
|
|
<th rowspan="3" width="5%">Sr.</th>
|
||
|
|
<th rowspan="3" width="10%">Employer Name</th>
|
||
|
|
<th rowspan="3" width="10%">Placement Officer Co ordinating</th>
|
||
|
|
<th rowspan="3" width="10%">Address</th>
|
||
|
|
<th rowspan="3" width="10%">Owner/MD Name</th>
|
||
|
|
<th rowspan="3" width="10%">HR/Representative Name</th>
|
||
|
|
<th rowspan="3" width="10%">Contact No.</th>
|
||
|
|
<th rowspan="3" width="10%">Whats App No.</th>
|
||
|
|
<th rowspan="3" width="10%">Salary Offereing</th>
|
||
|
|
<th rowspan="3" width="10%">Food</th>
|
||
|
|
<th rowspan="3" width="8%">Accomodations</th>
|
||
|
|
<th rowspan="3" width="8%">Salary accordance to the standard (for GDA 12000 & for rest 15000)</th>
|
||
|
|
<th rowspan="3" width="8%">PF/MC and other benefits</th>
|
||
|
|
<th rowspan="3" width="8%">Placement Proof (Written Document)</th>
|
||
|
|
<th rowspan="3" width="8%">No. of visits of employer</th>
|
||
|
|
<th rowspan="3" width="8%">MOU</th>
|
||
|
|
<th rowspan="3" width="8%">Other facilities like TOT, Knowledge sharing, etc. pls mention in details</th>
|
||
|
|
<th rowspan="3" width="8%">Brand</th>
|
||
|
|
<th rowspan="3" width="8%">Trainees Feedback/Work Culture</th>
|
||
|
|
<th rowspan="3" width="8%">Retention</th>
|
||
|
|
<th rowspan="3" width="8%">Infrastructure Support</th>
|
||
|
|
<th rowspan="3" width="8%">Total(12)</th>
|
||
|
|
<th rowspan="3" width="8%">Category</th>
|
||
|
|
<th rowspan="3" width="8%">Job Position offering</th>
|
||
|
|
<th rowspan="3" width="15%">Skill Set Requirement</th>
|
||
|
|
<th rowspan="3" width="15%">Remarks</th>
|
||
|
|
<th rowspan="3" width="15%">No. of our trainees working</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
|
||
|
|
<tbody style="font-size: 14px;">
|
||
|
|
<?php
|
||
|
|
$sql = "SELECT * FROM placement_pool";
|
||
|
|
$result = mysqli_query($conn, $sql);
|
||
|
|
$count = 1;
|
||
|
|
while ($rowOfrecord = mysqli_fetch_array($result)) {
|
||
|
|
$partner = $rowOfrecord['partner_name'];
|
||
|
|
$get_pid_from_pr = getFieldFromTable('partner_name', 'partners', 'partner_id', $partner);
|
||
|
|
$partner_location = getFieldFromTable('partner_location', 'partners', 'partner_id', $partner);
|
||
|
|
$partner_id = getFieldFromTable('partner_name', 'partners', 'partner_id', $partner);
|
||
|
|
$partner_name = getFieldFromTable('client_name', 'client_master', 'id', $partner_id) . " ( " . $parnter_location . " )";
|
||
|
|
$total = $rowOfrecord['food'] + $rowOfrecord['accommodation'] + $rowOfrecord['standard_salary'] + $rowOfrecord['PF'] + $rowOfrecord['proof'] + $rowOfrecord['visits'] + $rowOfrecord['mou'] + $rowOfrecord['o_facilities'] + $rowOfrecord['brand'] + $rowOfrecord['culture'] + $rowOfrecord['retention'] + $rowOfrecord['support'];
|
||
|
|
?>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
<td style="text-align: center;"><?= $count++ ?></td>
|
||
|
|
<td><?= getFieldFromTable('client_name', 'client_master', 'id', $partner_id) ?></td>
|
||
|
|
<td><?=getFieldFromTable('contact_person', 'partners', 'partner_id', $partner); ?></td>
|
||
|
|
<td><?= $partner_location ?></td>
|
||
|
|
<td><?= $rowOfrecord['md_name'] ?></td>
|
||
|
|
<td><?= $rowOfrecord['hr_name'] ?></td>
|
||
|
|
<td><?=getFieldFromTable('partner_phone', 'partners', 'partner_id', $partner); ?></td>
|
||
|
|
<td><?= $rowOfrecord['w_number'] ?></td>
|
||
|
|
<td><?= $rowOfrecord['salary_offering'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['food'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['accommodation'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['standard_salary'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['PF'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['proof'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['visits'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['mou'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['o_facilities'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['brand'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['culture'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['retention'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $rowOfrecord['support'] ?></td>
|
||
|
|
<td style="text-align: center;"><?= $total ?></td>
|
||
|
|
<td style="text-align: center;"><?php
|
||
|
|
if ($total >= 9) {
|
||
|
|
echo "A";
|
||
|
|
} else if ($total >= 5 && $total <= 8) {
|
||
|
|
echo "B";
|
||
|
|
} else {
|
||
|
|
echo "C";
|
||
|
|
} ?></td>
|
||
|
|
<td><?= $rowOfrecord['position'] ?></td>
|
||
|
|
<td><?php echo getFieldFromTable('skill_name', 'skill_get', 'id', getFieldFromTable('skill_set', 'partners','partner_id', $partner)); ?></td>
|
||
|
|
<td><?= $rowOfrecord['remarks'] ?></td>
|
||
|
|
<td style="text-align: center;"><?=getCount('placement_records', 'partner_id', $partner,'')?></td>
|
||
|
|
</tr>
|
||
|
|
<?php } ?>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</body>
|
||
|
|
|
||
|
|
|
||
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||
|
|
<script>
|
||
|
|
// $(document).ready(function() {
|
||
|
|
// window.print();
|
||
|
|
// });
|
||
|
|
</script>
|
||
|
|
<?php
|
||
|
|
function getCount($table, $idfield, $id, $status)
|
||
|
|
{
|
||
|
|
global $conn; // Access the global $conn variable
|
||
|
|
|
||
|
|
// Escape input parameters
|
||
|
|
$table = mysqli_real_escape_string($conn, $table);
|
||
|
|
$id = mysqli_real_escape_string($conn, $id);
|
||
|
|
$idfield = mysqli_real_escape_string($conn, $idfield);
|
||
|
|
$status = mysqli_real_escape_string($conn, $status);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// Correct SQL query
|
||
|
|
if ($status == '') {
|
||
|
|
$sql = "SELECT COUNT(*) AS count FROM $table WHERE $idfield = '$id' ";
|
||
|
|
} else {
|
||
|
|
$sql = "SELECT COUNT(*) AS count FROM $table WHERE $idfield = '$id' AND status = '$status'";
|
||
|
|
}
|
||
|
|
error_log("check_sql : " . $sql);
|
||
|
|
|
||
|
|
// Execute the query
|
||
|
|
$result = mysqli_query($conn, $sql);
|
||
|
|
|
||
|
|
// Check for query success and fetch the result
|
||
|
|
if ($result) {
|
||
|
|
$row = mysqli_fetch_assoc($result);
|
||
|
|
return (int) ($row ? $row['count'] : 0);
|
||
|
|
} else {
|
||
|
|
// Handle SQL error
|
||
|
|
error_log("SQL Error: " . mysqli_error($conn));
|
||
|
|
return 0; // Or handle it as needed
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|