File: /var/www/nclive/technc/exam_details.php
<?php
include 'header.php';
$urlSlug = $_REQUEST['slug'];
//$urlSlug = 'state-bank-sbi-po';
if ($urlSlug != "") {
error_reporting(E_ALL);
ini_set('display_errors', 'on');
// Exam Query
$examQuery = $db->prepare("SELECT e.exam_id,e.exam_name,e.exam_year,e.post_name,e.url_slug,e.fee_desc,e.qualification_desc,e.age_desc,e.sp_exam_id,e.exam_summary,e.important_notes,e.physical,e.total_vacancy,e.off_web_link,e.display_order,e.top_display_order,e.status,e.cat_id,e.type_id,et.type,e.age_id,e.age_to,e.age_from,a.age,e.qualification_id,q.quali_name,s.state_name,e.status,e.state_commission,sc.comm_name,e.total_time,e.total_marks,e.exam_mode,e.negative_marking, e.other_info,e.other_info_tabname,ec.name as category_name,e.fee,e.add_date, e.add_by, e.update_date, e.update_by, e.active_date FROM sp_exam AS e
LEFT JOIN sp_exam_category AS ec ON ec.cat_id=e.cat_id
LEFT JOIN sp_exam_type AS et ON et.type_id=e.type_id
LEFT JOIN sp_age_limit AS a ON a.age_lim_id=e.age_id
LEFT JOIN sp_qualification AS q ON q.qualification_id=e.qualification_id
LEFT JOIN sp_states AS s ON s.state_id=e.state_id
LEFT JOIN sp_state_commission AS sc ON sc.id=e.state_commission
WHERE e.url_slug='$urlSlug'");
$examQuery->execute();
$examRow = $examQuery->fetch();
$exam_id = $examRow['exam_id']; // Exam ID by URL Slug
// Exam Link Query
$linkQuery = "SELECT l.id, l.exam_id, l.entity_id, l.display_text, l.display_text_dates, l.description, l.links, l.date_type, l.date, l.display_entity, l.add_by, l.add_date, l.update_by, l.update_date, l.status, ee.name as entity_name FROM sp_exam_links as l LEFT JOIN sp_exam_entity as ee on ee.id=l.entity_id WHERE exam_id ='$exam_id' ";
$linkData = $db->prepare($linkQuery);
$linkData->execute();
$linkCount = $linkData->rowCount();
// Exam Cutoff Query
$cutoffQuery = $db->prepare("SELECT id, exam_id, type_name, year, ur, obc, sc, st, oh, vh, hh, ex_servicemen, comment, display_order, status, added_by, added_date FROM sp_exam_cutoff WHERE exam_id ='$exam_id' ");
$cutoffQuery->execute();
$cutoffRow = $cutoffQuery->fetch();
$cutoffCount = $cutoffRow;
// Pattern Link Query
$patternQuery = "SELECT id, exam_id, subject_name, no_of_question, marks_for_subject, date_added, status FROM sp_exam_pattern WHERE exam_id ='$exam_id' ";
$patternData = $db->prepare($patternQuery);
$patternData->execute();
$patternCount = $patternData->rowCount();
// Vacancy Link Query
$vacancyQuery = "SELECT id, exam_id, type_id, type_name, gen, obc, sc, st, ebc, wbc, total_vac, age_limit, eligibility, status, date_added FROM sp_vacancy_detail WHERE exam_id ='$exam_id' ";
$vacancyData = $db->prepare($vacancyQuery);
$vacancyData->execute();
$vacancyCount = $vacancyData->rowCount();
// Physical Link Query
$physicalQuery = "SELECT id, exam_id, gender, categories, height, chest, race, time, long_jump, high_jump, short_put, chances, status FROM sp_physical_eligibility WHERE exam_id ='$exam_id' ";
$physicalData = $db->prepare($physicalQuery);
$physicalData->execute();
$physicalCount = $physicalData->rowCount();
// Uploads Link Query
$uploadsQuery = "SELECT id, exam_id, title, tabname, upload_file, showing_image, status, add_by, add_date FROM sp_exam_uploads WHERE exam_id ='$exam_id' ";
$uploadsData = $db->prepare($uploadsQuery);
$uploadsData->execute();
$uploadsCount = $uploadsData->rowCount();
// Notification Link Query
$notificationQuery = "SELECT n.id, n.title, n.exam_id, n.state_id, n.expiry_date, n.added_by, n.status, n.display_order, n.add_date, s.state_name FROM sp_notification AS n LEFT JOIN sp_states AS s ON s.state_id=n.state_id WHERE n.exam_id ='$exam_id' ";
$notificationData = $db->prepare($notificationQuery);
$notificationData->execute();
$notificationCount = $notificationData->rowCount();
// Exam Page Seo Query
$seoQuery = $db->prepare("SELECT ps.id, ps.exam_id, ps.category_id, ps.title, ps.keywords, ps.meta_description, ps.meta_keywords, ps.status, ps.added_date, ec.name AS cat_name FROM sp_pages_seo AS ps LEFT JOIN sp_exam_category AS ec ON ec.cat_id=ps.category_id WHERE ps.exam_id='$exam_id' ");
$seoQuery->execute();
$seoRow = $seoQuery->fetch();
$seoCount = $seoRow;
?>
<style type="text/css">
/* *********************************** EXAM DETAILS ACCORDIAN CSS */
.exam-accordian-section {
padding: 3em;
background: #fff;
}
.exam-accordian-section button {
background: #abe0f1;
text-align: left;
color: #000000;
font-size: 18px;
border: 1px solid #ffffff;
padding: 12px 20px;
font-weight: 600;
width: 100%;
}
.exam-accordian-section button .fa-arrow-down {
float: right;
background: #ffffff;
color: #00c1ff;
font-size: 10px;
padding: 6px 6px 6px 6px;
text-align: center;
border-radius: 50%;
}
.exam-accordian-section .collapse h6 {
text-align: center;
font-size: 20px;
letter-spacing: 0.5px;
background: #2c343f;
padding: 10px;
color: #fff;
}
.exam-accordian-section .collapse {
overflow: auto;
}
.exam-accordian-section .collapse table tr th {
border: 1px solid #cccccc;
padding: 10px;
color: #000;
font-weight: 600;
background: #f5f5f5;
}
.exam-accordian-section .collapse table tr td {
border: 1px solid #cccccc;
padding: 10px;
}
</style>
<main id="main-container">
<div class="row exam-accordian-section">
<div class="col-md-8 col-sm-8 col-xs-12">
<!-- Exam Data Box -->
<button type="button" data-toggle="collapse" data-target="#examData" aria-expanded="true" aria-controls="examData"> Exam Data <i class="fa fa-arrow-down"></i></button>
<div id="examData" class="collapse" aria-labelledby="examData" data-parent="#accordionExample">
<h6>Exam Details</h6>
<table class="table">
<tbody>
<tr>
<th>Exam ID</th>
<td><?php echo $examRow['exam_id']; ?></td>
<th>Exam Name</th>
<td><?php echo $examRow['exam_name']; ?></td>
</tr>
<tr>
<th>Post Name</th>
<td><?php echo $examRow['post_name']; ?></td>
<th>Exam Year</th>
<td><?php echo $examRow['exam_year']; ?></td>
</tr>
<tr>
<th>Exam Summary</th>
<td><?php echo $examRow['exam_summary']; ?></td>
<th>URL Slug</th>
<td><?php echo $examRow['url_slug']; ?></td>
</tr>
<tr>
<th>Type</th>
<td><?php echo $examRow['type']; ?></td>
<th>Category</th>
<td><?php echo $examRow['category_name']; ?></td>
</tr>
<tr>
<th>State</th>
<td><?php echo $examRow['state_name']; ?></td>
<th>State Commission</th>
<td><?php echo $examRow['comm_name']; ?></td>
</tr>
<tr>
<th>Qualification</th>
<td><?php echo $examRow['quali_name']; ?></td>
<th>Qualification Desc</th>
<td><?php echo $examRow['qualification_desc']; ?></td>
</tr>
<tr>
<th>Age</th>
<td><?php echo $examRow['age']; ?></td>
<th>Age To</th>
<td><?php echo $examRow['age_to']; ?></td>
</tr>
<tr>
<th>Age From</th>
<td><?php echo $examRow['age_from']; ?></td>
<th>Age Description</th>
<td><?php echo $examRow['age_desc']; ?></td>
</tr>
<tr>
<th>Fee</th>
<td><?php echo $examRow['fee']; ?></td>
<th>Fee Desc</th>
<td><?php echo $examRow['fee_desc']; ?></td>
</tr>
<tr>
<th>Physical</th>
<td><?php echo $examRow['physical']; ?></td>
<th>Total Vacancy</th>
<td><?php echo $examRow['total_vacancy']; ?></td>
</tr>
<tr>
<th>Total Time</th>
<td><?php echo $examRow['total_time']; ?></td>
<th>Total Marks</th>
<td><?php echo $examRow['total_marks']; ?></td>
</tr>
<tr>
<th>Exam Mode</th>
<td><?php echo $examRow['exam_mode']; ?></td>
<th>Negative Marking</th>
<td><?php echo $examRow['negative_marking']; ?></td>
</tr>
<tr>
<th>Other Info</th>
<td><?php echo $examRow['other_info']; ?></td>
<th>Other Info TabName</th>
<td><?php echo $examRow['other_info_tabname']; ?></td>
</tr>
<tr>
<th>Sp Exam ID</th>
<td><?php echo $examRow['sp_exam_id']; ?></td>
<th>Official link</th>
<td><?php echo $examRow['off_web_link']; ?></td>
</tr>
<tr>
<th>Important Notes</th>
<td><?php echo $examRow['important_notes']; ?></td>
<th>Display Order</th>
<td><?php echo $examRow['display_order']; ?></td>
</tr>
<tr>
<th>Top Display Order</th>
<td><?php echo $examRow['top_display_order']; ?></td>
<th>Status</th>
<td><?php echo $examRow['status']; ?></td>
</tr>
<tr>
<th>Add Date</th>
<td><?php echo $examRow['add_date']; ?></td>
<th>Add By</th>
<td><?php echo $examRow['add_by']; ?></td>
</tr>
<tr>
<th>Update Date</th>
<td><?php echo $examRow['update_date']; ?></td>
<th>Update By</th>
<td><?php echo $examRow['update_by']; ?></td>
</tr>
<tr>
<th>Active Date</th>
<td><?php echo $examRow['active_date']; ?></td>
</tr>
</tbody>
</table>
</div>
<button type="button" data-toggle="collapse" data-target="#examLink" aria-expanded="false" aria-controls="examLink"> Exam Link <i class="fa fa-arrow-down"></i></button>
<div id="examLink" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body">
<h6>Exam Link</h6>
<table class="table">
<tbody>
<?php if ($linkCount > 0) { ?>
<tr>
<th>ID</th>
<th>Entity</th>
<th title="Display Text">Text</th>
<th title="Display Text Dates">Text Dates</th>
<th title="Description">Desc.</th>
<th title="Click to open Link">Link</th>
<th>Date Type</th>
<th>Date</th>
<th>Display Entity</th>
<th>Status</th>
</tr>
<?php while ($querydata = $linkData->fetch()) { ?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $querydata['entity_name']; ?></td>
<td><?php echo $querydata['display_text']; ?></td>
<td><?php echo $querydata['display_text_dates']; ?></td>
<td><?php echo $querydata['description']; ?></td>
<td><?php echo $querydata['links']; ?></td>
<td><?php echo $querydata['date_type']; ?></td>
<td><?php echo $querydata['date']; ?></td>
<td><?php echo $querydata['display_entity']; ?></td>
<td><?php echo $querydata['status']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#examCutoff" aria-expanded="false" aria-controls="examCutoff"> Exam Cutoff <i class="fa fa-arrow-down"></i></button>
<div id="examCutoff" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Exam Cutoff</h6>
<table class="table">
<tbody>
<?php if ($cutoffCount > 0) { ?>
<tr>
<th>ID</th>
<td><?php echo $cutoffRow['id']; ?></td>
<th>Exam Name</th>
<td><?php echo $cutoffRow['type_name']; ?></td>
</tr>
<tr>
<th>Year</th>
<td><?php echo $cutoffRow['year']; ?></td>
<th>UR</th>
<td><?php echo $cutoffRow['ur']; ?></td>
</tr>
<tr>
<th>OBC</th>
<td><?php echo $cutoffRow['obc']; ?></td>
<th>SC</th>
<td><?php echo $cutoffRow['sc']; ?></td>
</tr>
<tr>
<th>ST</th>
<td><?php echo $cutoffRow['st']; ?></td>
<th>OH</th>
<td><?php echo $cutoffRow['hh']; ?></td>
</tr>
<tr>
<th>VH</th>
<td><?php echo $cutoffRow['vh']; ?></td>
<th>Ex-servicemen</th>
<td><?php echo $cutoffRow['ex_servicemen']; ?></td>
</tr>
<tr>
<th>Display Order</th>
<td><?php echo $cutoffRow['display_order']; ?></td>
<th>Comment</th>
<td><?php echo $cutoffRow['comment']; ?></td>
</tr>
<tr>
<th>Added By</th>
<td><?php echo $cutoffRow['added_by']; ?></td>
<th>Status</th>
<td><?php echo $cutoffRow['status']; ?></td>
</tr>
<tr>
<th>Added Date</th>
<td><?php echo $cutoffRow['added_date']; ?></td>
</tr>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#examPattern" aria-expanded="true" aria-controls="examPattern"> Exam Pattern <i class="fa fa-arrow-down"></i></button>
<div id="examPattern" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Exam Pattern</h6>
<table class="table">
<tbody>
<?php if ($patternCount > 0) { ?>
<tr>
<th>ID</th>
<th>Suject Name</th>
<th title="Number of Questions">No. of Ques.</th>
<th title="Display Text Dates">Marks</th>
<th title="Description">Date</th>
<th>Status</th>
</tr>
<?php while ($querydata = $patternData->fetch()) { ?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $querydata['subject_name']; ?></td>
<td><?php echo $querydata['no_of_question']; ?></td>
<td><?php echo $querydata['marks_for_subject']; ?></td>
<td><?php echo $querydata['date_added']; ?></td>
<td><?php echo $querydata['status']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#vacancyDetails" aria-expanded="true" aria-controls="vacancyDetails"> Vacancy Details <i class="fa fa-arrow-down"></i></button>
<div id="vacancyDetails" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Vacancy Details</h6>
<table class="table">
<tbody>
<?php if ($vacancyCount > 0) { ?>
<tr>
<th>ID</th>
<th>Type ID</th>
<th>Type Name</th>
<th title="General">Gen.</th>
<th>OBC</th>
<th>SC</th>
<th>ST</th>
<th>EBC</th>
<th>WBC</th>
<th title="Total Vacancy">Total Vac.</th>
<th title="Age Limit">Age</th>
<th>Eligibility</th>
<th>status</th>
<th>Date</th>
</tr>
<?php
while ($querydata = $vacancyData->fetch()) {
if ($querydata['type_id'] == 1) {
$type = "For Post Wise";
} else if ($querydata['type_id'] == 2) {
$type = "For City Wise";
} else if ($querydata['type_id'] == 3) {
$type = "For State Wise";
}
?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $type; ?></td>
<td><?php echo $querydata['type_name']; ?></td>
<td><?php echo $querydata['gen']; ?></td>
<td><?php echo $querydata['obc']; ?></td>
<td><?php echo $querydata['sc']; ?></td>
<td><?php echo $querydata['st']; ?></td>
<td><?php echo $querydata['ebc']; ?></td>
<td><?php echo $querydata['wbc']; ?></td>
<td><?php echo $querydata['total_vac']; ?></td>
<td><?php echo $querydata['age_limit']; ?></td>
<td><?php echo $querydata['eligibility']; ?></td>
<td><?php echo $querydata['status']; ?></td>
<td><?php echo $querydata['date_added']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#physicalEligibility" aria-expanded="true" aria-controls="physicalEligibility"> Physical Eligibility <i class="fa fa-arrow-down"></i></button>
<div id="physicalEligibility" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Physical Details</h6>
<table class="table">
<tbody>
<?php if ($physicalCount > 0) { ?>
<tr>
<th>ID</th>
<th>Gender</th>
<th>Category</th>
<th>Height</th>
<th>Chest</th>
<th>Race</th>
<th>Time</th>
<th>Long Jump</th>
<th>high Jump</th>
<th>Short Put</th>
<th>Chances</th>
<th>Status</th>
</tr>
<?php
while ($querydata = $physicalData->fetch()) {
if ($querydata['gender'] == "M") {
$type = "Male";
} else if ($querydata['gender'] == "F") {
$type = "Female";
} else if ($querydata['gender'] == "O") {
$type = "Other";
}
?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $type; ?></td>
<td><?php echo $querydata['categories']; ?></td>
<td><?php echo $querydata['height']; ?></td>
<td><?php echo $querydata['chest']; ?></td>
<td><?php echo $querydata['race']; ?></td>
<td><?php echo $querydata['time']; ?></td>
<td><?php echo $querydata['long_jump']; ?></td>
<td><?php echo $querydata['high_jump']; ?></td>
<td><?php echo $querydata['short_put']; ?></td>
<td><?php echo $querydata['chances']; ?></td>
<td><?php echo $querydata['status']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#uploadFile" aria-expanded="true" aria-controls="uploadFile"> Uploaded File <i class="fa fa-arrow-down"></i></button>
<div id="uploadFile" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Uploaded File Details</h6>
<table class="table">
<tbody>
<?php if ($uploadsCount > 0) { ?>
<tr>
<th>ID</th>
<th>Title</th>
<th>Tab Name</th>
<th>Upload File</th>
<th>Showing Image</th>
<th>Status</th>
<th>Add By</th>
<th>Add Date</th>
</tr>
<?php while ($querydata = $uploadsData->fetch()) { ?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $querydata['title']; ?></td>
<td><?php echo $querydata['tabname']; ?></td>
<td><?php echo $querydata['upload_file']; ?></td>
<td><?php echo $querydata['showing_image']; ?></td>
<td><?php echo $querydata['status']; ?></td>
<td><?php echo $querydata['add_by']; ?></td>
<td><?php echo $querydata['add_date']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#notification" aria-expanded="true" aria-controls="notification"> Notification <i class="fa fa-arrow-down"></i></button>
<div id="notification" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Notification Details</h6>
<table class="table">
<tbody>
<?php if ($notificationCount > 0) { ?>
<tr>
<th>ID</th>
<th>Title</th>
<th>State</th>
<th>Expiry Date</th>
<th>Added Date</th>
<th>Status</th>
<th title="Display Order">Dis. Order</th>
<th>Add Date</th>
</tr>
<?php while ($querydata = $notificationData->fetch()) { ?>
<tr>
<td><?php echo $querydata['id']; ?></td>
<td><?php echo $querydata['title']; ?></td>
<td><?php echo $querydata['state_name']; ?></td>
<td><?php echo $querydata['expiry_date']; ?></td>
<td><?php echo $querydata['added_by']; ?></td>
<td><?php echo $querydata['status']; ?></td>
<td><?php echo $querydata['display_order']; ?></td>
<td><?php echo $querydata['add_date']; ?></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<button type="button" data-toggle="collapse" data-target="#pageSeo" aria-expanded="true" aria-controls="pageSeo"> Exam Page Seo <i class="fa fa-arrow-down"></i></button>
<div id="pageSeo" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<h6>Exam Page Seo</h6>
<table class="table">
<tbody>
<?php if ($seoCount > 0) { ?>
<tr>
<th>ID</th>
<td><?php echo $seoRow['id']; ?></td>
<th>Category</th>
<td><?php echo $seoRow['cat_name']; ?></td>
</tr>
<tr>
<th>Title</th>
<td><?php echo $seoRow['title']; ?></td>
<th>Keyword</th>
<td><?php echo $seoRow['keywords']; ?></td>
</tr>
<tr>
<th>Meta Description</th>
<td><?php echo $seoRow['meta_description']; ?></td>
<th>Meta Keyword</th>
<td><?php echo $seoRow['meta_keywords']; ?></td>
</tr>
<tr>
<th>Status</th>
<td><?php echo $seoRow['status']; ?></td>
<th>Add Date</th>
<td><?php echo $seoRow['added_date']; ?></td>
</tr>
<?php } else { ?>
<tr>
<th>No Data</th>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<?php
}
include 'footer.php';
?>
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="<?php echo ROOT_LINK; ?>js/jquery-2.1.3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script> -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />