File: /home/thehunarfound/www/sms/initial-query-IH-10-jul-23
<?php
include('lib/config.php');
$role=$_SESSION["Role"];
// print_r($_POST);
// exit;
if(isset($_POST['fullname'])){
// die;
// print_r($_POST); die;
extract($_POST);
$querytype = $query_type == 'Other' ? $query_type_other : $query_type;
$queryfor = $query_for == 'Other' ? $query_for_other : $query_for;
$interestedtrade1 = $interested_trade1 == 'Other' ? $interested_trade1_other : $interested_trade1;
$interestedtrade2 = $interested_trade2 == 'Other' ? $interested_trade2_other : $interested_trade2;
$interestedtrade3 = $interested_trade3 == 'Other' ? $interested_trade3_other : $interested_trade3;
$hearaboutus = $hear_about_us == 'Other' ? $hear_about_us_other : $hear_about_us;
$othercity = $city == 'Other' ? $other_city : $city;
// $form_no=($db->GetSingleRecord("Select id from query_log Order By id DESC LIMIT 1"));
// echo $form_no; die;
if($_POST['form_no'] == ""){
$form_no=($db->GetSingleRecord("Select id from query_log Order By id DESC LIMIT 1") + 1);
$sql = "INSERT into query_log(`fullname`,`phone`, `query_type`,`query_for`, `interested_trade1`, `interested_trade2`, `interested_trade3`,`batch_no`, `hear_about_us`, `form_no`, `address`, `city`, `area`, `email`, `dob`, `qualification`, `ssc_per`, `shift_interested`, `campus`, `user_id`)
values('".$fullname."','".$phone."','".$querytype."','".$queryfor."','".$interestedtrade1."','".$interestedtrade2."','".$interestedtrade3."','".$batch_no."','".$hearaboutus."','".$form_no."','".$address."','".$othercity."','".$area."','".$email."','".$dob."','".$qualification."','".$ssc_per."','".implode(",",$shift_interested)."','".$campus."',".$_SESSION['userid'].")";
$db->ExecuteQuery($sql);
$form_no=$db->getLastInsertId();
// echo $formno; die;
echo '<script type="text/javascript">alert("Your form has been submitted and your form num is '.$form_no.'");</script>';
// echo "<script>alert('Form has been saved & your form # is "'.$formno.'");</script>";
$sql1 = "INSERT into log(`name`,`activity`)
values('".$_SESSION['USER']."','Initial Query form submitted')";
$db->ExecuteQuery($sql1);
}else{
// $form_no=$db->getLastInsertId();
$delsql = "delete from query_log where form_no = '".$form_no."'";
$db->ExecuteQuery($delsql);
$sql = "INSERT into query_log(`id`,`fullname`,`phone`, `query_type`, `query_for`, `interested_trade1`, `interested_trade2`, `interested_trade3`,`batch_no`, `hear_about_us`, `form_no`, `address`, `city`, `area`, `email`, `dob`, `qualification`, `ssc_per`, `shift_interested`, `campus`, `user_id`)
values(".$form_no.",'".$fullname."','".$phone."','".$querytype."','".$queryfor."','".$interestedtrade1."','".$interestedtrade2."','".$interestedtrade3."','".$batch_no."','".$hearaboutus."','".$form_no."','".$address."','".$othercity."','".$area."','".$email."','".$dob."','".$qualification."','".$ssc_per."','".implode(",",$shift_interested)."','".$campus."',".$_SESSION['userid'].")";
$db->ExecuteQuery($sql);
$form_no=$db->getLastInsertId();
// echo $form_no; die;
echo '<script>alert("Your form has been updated and your form num is '.$form_no.'"
now resubmit of application form again of this form no);</script>';
$sql2 = "INSERT into log(`name`,`activity`)
values('".$_SESSION['USER']."','Initial Query form Modified')";
$db->ExecuteQuery($sql2);
}
}
if(isset($_GET['form_no'])){
$sql = "SELECT `fullname`,`phone`, `query_type`, `query_for`, `interested_trade1`, `interested_trade2`, `interested_trade3`, `batch_no`, `hear_about_us`, `form_no`, `address`, `city`, `area`, `email`, `dob`, `qualification`, `ssc_per`, `shift_interested`, `campus`, `user_id` from query_log Where form_no = '".$_GET['form_no']."'" ;
$res = $db->ExecuteQuery($sql);
// print_r($res->FetchAsArray());die;
list($fullname,$phone,$querytype,$queryfor,$interestedtrade1,$interestedtrade2,$interestedtrade3,$batch_no,$hearaboutus,$form_no,$address,$othercity,$area,$email,$dob,$qualification,$ssc_per,$shift_interested,$campus,$user_id) = $res->FetchAsArray();
}
// echo $qualification; die;
// echo '<pre>';
// print_r($hearaboutus);
// exit;
?>
<script>
function forreq(isreq){
if(isreq.checked){
checked = document.querySelector('.shift_interested:checked');
if(!checked){
document.getElementById('shift-required-label').style="display:block;color:red;font-weight:bold;";
return false;
}
document.getElementById('address').required = true;
document.getElementById('campus').required = true;
// document.getElementById('city').required = true;
document.getElementById('area').required = true;
// document.getElementById('email').required = true;;
document.getElementById('dob').required = true;
document.getElementById('qualification').required = true;
document.getElementById('ssc_per').required = true
document.getElementById('address').disabled = false;
// document.getElementById('city').disabled = false;
document.getElementById('area').disabled = false;
document.getElementById('email').disabled = false;
document.getElementById('dob').disabled = false;
document.getElementById('qualification').disabled = false;
document.getElementById('ssc_per').disabled = false;
document.getElementById('campus').disabled = false;
document.getElementById('form_no').disabled = false;
}else{
document.getElementById('Afternoon').required = false;
document.getElementById('Weekend').required = false;
document.getElementById('Evening').required = false;
document.getElementById('Customized').required = false;
document.getElementById('Morning').required = false;
document.getElementById('campus').required = false;
document.getElementById('address').required = false;
// document.getElementById('city').required = false;
document.getElementById('area').required = false;
// document.getElementById('email').required = false;
document.getElementById('dob').required = false;
document.getElementById('qualification').required = false;
document.getElementById('ssc_per').required = false;
document.getElementById('address').disabled = true;
// document.getElementById('city').disabled = true;
document.getElementById('area').disabled = true;
document.getElementById('email').disabled = true;
document.getElementById('dob').disabled = true;
document.getElementById('qualification').disabled = true;
document.getElementById('ssc_per').disabled = true;
document.getElementById('campus').disabled = true;
document.getElementById('form_no').disabled = true;
}
}
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- head scripts -->
<?php include('includes/head-scripts.php')?>
<style>
#otherResult{display: none;}
#queryResult2{display: none;}
#cityResult3{display: none;}
#otherResult, #otherResult2{
display: none;
}
#programResult1, #programResult2, #programResult3, #programResult4{
display: none;
}
</style>
<script>
// $(".selectTo").select2();
// 5th Onchange hide/show trade1
function proChange1() {
if (document.getElementById("program1").value == "Other"){
document.getElementById("programResult1").style.display= "block";
}
else if
( document.getElementById("program1").value != "Other" ){
document.getElementById("programResult1").style.display = "none";
}
}
// 6th Onchange hide/show trade2
function proChange2() {
if (document.getElementById("program2").value == "Other"){
document.getElementById("programResult2").style.display= "block";
}
else if
( document.getElementById("program2").value != "Other" ){
document.getElementById("programResult2").style.display = "none";
}
}
// 7th Onchange hide/show trade3
function proChange3() {
if (document.getElementById("program3").value == "Other"){
document.getElementById("programResult3").style.display= "block";
}
else if
( document.getElementById("program3").value != "Other" ){
document.getElementById("programResult3").style.display = "none";
}
}
// 7th Onchange hide/show Query For
function proChange4() {
if (document.getElementById("program4").value == "Other"){
document.getElementById("programResult4").style.display= "block";
}
else if
( document.getElementById("program4").value != "Other" ){
document.getElementById("programResult4").style.display = "none";
}
}
function queryChange2() {
if (document.getElementById("other2").value == "Other"){
document.getElementById("queryResult2").style.display= "block";
}
else if
( document.getElementById("other2").value != "Other" ){
document.getElementById("queryResult2").style.display = "none";
}
}
function cityChange3() {
if (document.getElementById("city").value == "Other"){
document.getElementById("cityResult3").style.display= "block";
}
else if
( document.getElementById("city").value != "Other" ){
document.getElementById("cityResult3").style.display = "none";
}
}
function openInNewTab(url) {
var win = window.open(url, '_blank');
win.focus();
}
// function myFunction() {
// document.getElementById("myDropdown").classList.toggle("show");
// }
// Close the dropdown if the user clicks outside of it
// window.onkeyup = function(event) {
// if (!event.target.matches('.dropbtn')) {
// var dropdowns = document.getElementsByClassName("dropdown-content");
// var i;
// for (i = 0; i < dropdowns.length; i++) {
// var openDropdown = dropdowns[i];
// if (openDropdown.classList.contains('show')) {
// openDropdown.classList.remove('show');
// }
// }
// }
// }
// searchbox("cakes","https://www.tohfay.com");
function searchbox(keyword)
{
// alert('sidra');
// var c = document.getElementById('cat').value;
if(keyword.length > 0 )
{
document.getElementById('smt-search').style.display = "block";
document.getElementById('pcat').style.display = "none";
document.getElementById('smartloader').style.display = "block";
}
else
{
document.getElementById('smt-search').style.display = "none";
}
$.ajax
({
type: "POST",
url: "area.php",
data: "q="+ encodeURI(keyword) + "&action=check",
success: function(option)
{
var obj = JSON.parse(option);
console.log(Object.keys(obj.Response).length);
document.getElementById("productli0").style.display = "none";
document.getElementById("productli1").style.display = "none";
document.getElementById("productli2").style.display = "none";
document.getElementById("productli3").style.display = "none";
document.getElementById("productli4").style.display = "none";
for (var i = 0;i < Object.keys(obj.Response).length; i++)
{
document.getElementById("productli" + i).style.display = "block";
document.getElementById("productli" + i).innerHTML = obj.Response[i];
}
document.getElementById('pcat').style.display = "block";
document.getElementById('smartloader').style.display = "none";
}
});
return true;
}
function allhide()
{
document.getElementById("productli0").style.display = "none";
document.getElementById("productli1").style.display = "none";
document.getElementById("productli2").style.display = "none";
document.getElementById("productli3").style.display = "none";
document.getElementById("productli4").style.display = "none";
}
</script>
</head>
<body>
<!-- <script type="text/javascript" src="js/alertify.js"></script>
<link rel="stylesheet" type="text/css" href="css/alertify.css">
<link rel="stylesheet" type="text/css" href="css/default.css"> -->
<!-- <script>alertify.alert('Success','Form has been submitted');</script> -->
<div id="sb-site">
<!-- chat sidebar -->
<?php include('includes/chat-drawer.php')?>
<div id="loading">
<div class="svg-icon-loader">
<img src="https://agileui.com/demo/delight/assets/images/svg-loaders/bars.svg" width="40" alt=""></div>
</div>
<!-- page-wrapper -->
<div id="page-wrapper">
<div id="mobile-navigation"><button id="nav-toggle" class="collapsed" data-toggle="collapse" data-target="#page-sidebar"><span></span></button>
</div>
<!-- left Nav -->
<?php include('includes/sidebar.php'); ?>
<!-- Right Content Area -->
<div id="page-content-wrapper">
<div id="page-content">
<!-- Header -->
<?php include('includes/header.php'); ?>
<!-- initial query --->
<div id="page-title">
<h2>Initial Query Form</h2>
</div>
<div class="panel">
<div class="panel-body">
<div class="example-box-wrapper">
<form class="form-horizontal bordered-row" id="demo-form" method="post" data-parsley-validate="">
<div class="row">
<!-- lft -->
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-3 control-label">Name *</label>
<div class="col-sm-6"><input type="text" name="fullname" required class="form-control" value="<?=$fullname?>" onkeyup="this.value = this.value.replace(/[^a-z, '', A-Z, '']/, '')"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Interested Program 1* </label>
<div class="col-sm-6">
<select name="interested_trade1" class="form-control" id="program1" onChange="proChange1()" required>
<option value="" disabled selected>--select--</option>
<?php
// $sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
if($role=='admin'){
$sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
}else{
$sql = "SELECT DISTINCT program FROM `admission_setup` WHERE campus= '".$_SESSION["Role"]."'";
}
$res = $db->ExecuteQuery($sql);
while(list($available_prog) = $res->FetchAsArray())
{
?>
<option value="<?=$available_prog?>" <?php if($interestedtrade1 == $available_prog){ echo "selected"; } ?>><?=$available_prog?></option>
<?php } ?>
<option value="Other" <?php if($interestedtrade1 == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- other -->
<div class="form-group" id="programResult1">
<input type="text" name="interested_trade1_other" maxlength="25" placeholder="Type Other" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Interested Program 2 </label>
<div class="col-sm-6">
<select name="interested_trade2" class="form-control" id="program2" onChange="proChange2()">
<option value="" disabled selected>--select--</option>
<?php
if($role=='admin'){
$sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
}else{
$sql = "SELECT DISTINCT program FROM `admission_setup` WHERE campus= '".$_SESSION["Role"]."'";
}
// $sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
$res = $db->ExecuteQuery($sql);
while(list($available_prog) = $res->FetchAsArray())
{
?>
<option value="<?=$available_prog?>" <?php if($available_prog == $interestedtrade2){ echo "selected"; } ?>><?=$available_prog?></option>
<?php } ?>
<option value="Other" <?php if($interestedtrade2 == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- other -->
<div class="form-group" id="programResult2">
<input type="text" name="interested_trade2_other" maxlength="25" placeholder="Type Other" class="form-control" >
</div>
</div>
</div>
<input type="hidden" id="form_no" name="form_no" value="<?=$form_no?>" class="form-control">
<!-- <input type="hidden" id="form_no" name="form_no" value="<?=$_GET['form_no']?>" class="form-control"> -->
<div class="form-group">
<label class="col-sm-3 control-label">Interested Program 3 </label>
<div class="col-sm-6">
<select name="interested_trade3" class="form-control" id="program3" onChange="proChange3()">
<option value="" disabled selected>--select--</option>
<?php
if($role=='admin'){
$sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
}else{
$sql = "SELECT DISTINCT program FROM `admission_setup` WHERE campus= '".$_SESSION["Role"]."'";
}
// $sql = "SELECT `value` FROM `add_setup` WHERE name='program'" ;
$res = $db->ExecuteQuery($sql);
while(list($available_prog) = $res->FetchAsArray())
{
?>
<option value="<?=$available_prog?>" <?php if($available_prog == $interestedtrade3){ echo "selected"; } ?>><?=$available_prog?></option>
<?php } ?>
<option value="Other" <?php if($interestedtrade3 == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- other -->
<div class="form-group" id="programResult3">
<input type="text" name="interested_trade3_other" maxlength="25" placeholder="Type Other" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Batch No *</label>
<div class="col-sm-6">
<select name="batch_no" class="form-control" required>
<option value="" disabled selected>--select--</option>
<?php
if($role == 'admin'){
$sql = "SELECT `value` FROM add_setup WHERE name='batch'";
}else{
$sql = "SELECT DISTINCT batch FROM admission_setup WHERE campus = '".$_SESSION["Role"]."'";
}
// $sql = "SELECT `value` FROM add_setup WHERE name='batch' order by id desc" ;
$res = $db->ExecuteQuery($sql);
while(list($batch_no_val) = $res->FetchAsArray())
{
?>
<option value="<?=$batch_no_val?>" <?php if($batch_no_val == $batch_no){ echo "selected"; } ?>><?=$batch_no_val?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Form Required</label>
<div class="col-sm-6">
<label style="margin-top: 7px;">
<input id="chkformreq" type="checkbox" name="terms" data-parsley-multiple="terms"
data-parsley-id="7404" onChange="showfrm();forreq(this);"> Yes
</label>
</div>
</div>
</div>
<!-- rgt -->
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-3 control-label">Phone *</label>
<div class="col-sm-6"><input name="phone" type="tel" pattern="^\d{4}-\d{7}$" required placeholder="xxxx-xxxxxxx" class="form-control" value="<?=$phone?>"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Query Type</label>
<div class="col-sm-6">
<select name="query_type" class="form-control" id="other" onChange="otherChange()" >
<option value="Walk In" <?php if($query_type == "Walk In"){ echo "selected"; } ?>>Walk In</option>
<option value="Phone" <?php if($query_type == "Phone"){ echo "selected"; } ?>>Phone</option>
<option value="Email" <?php if($query_type == "Email"){ echo "selected"; } ?>>Email</option>
<option value="Other" <?php if($query_type == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- other -->
<div class="form-group" id="otherResult">
<input type="text" name="query_type_other" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Query For</label>
<div class="col-sm-6">
<select name="query_for" class="form-control" id="program4" onChange="proChange4()">
<option value="Self" <?php if($query_for == "Self"){ echo "selected"; } ?>>Self</option>
<option value="Friend" <?php if($query_for == "Friend"){ echo "selected"; } ?>>Friend</option>
<option value="Son" <?php if($query_for == "Son"){ echo "selected"; } ?>>Son</option>
<option value="Daughter" <?php if($query_for == "Daughter"){ echo "selected"; } ?>>Daughter</option>
<option value="Relative" <?php if($query_for == "Relative"){ echo "selected"; } ?>>Relative </option>
<option value="Other" <?php if($query_for == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- other -->
<div class="form-group" id="programResult4">
<input type="text" name="query_for_other" maxlength="25" placeholder="Type Other" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Where did you hear about us</label>
<div class="col-sm-6">
<select name="hear_about_us" class="form-control" id="other2" onChange="queryChange2()" >
<option value="BillBoard" <?php if($hearaboutus == "BillBoard"){ echo "selected"; } ?>>BillBoard</option>
<option value="Newspaper" <?php if($hearaboutus == "Newspaper"){ echo "selected"; } ?>>Newspaper</option>
<option value="Camp" <?php if($hearaboutus == "Camp"){ echo "selected"; } ?>>Camp</option>
<option value="Friend" <?php if($hearaboutus == "Friend"){ echo "selected"; } ?>>Friend</option>
<option value="Internet" <?php if($hearaboutus == "Internet"){ echo "selected"; } ?>>Internet</option>
<option value="Rikshaw Campaign" <?php if($hearaboutus == "Rikshaw Campaign"){ echo "selected"; } ?>>Rikshaw Campaign</option>
<option value="TV Ticker" <?php if($hearaboutus == "TV Ticker"){ echo "selected"; } ?>>TV Ticker</option>
<option value="Other" <?php if($hearaboutus == "Other"){ echo "selected"; } ?>>Other</option>
</select>
<br />
<!-- <!-- other -->
<div class="form-group" id="queryResult2">
<input type="text" id="hear" name="hear_about_us_other" value="<?=$hearaboutus?>" maxlength="50" placeholder="Type Other" class="form-control" >
</div>
</div>
</div>
</div>
</div>
<!-- form required fields -->
<div class="row" id="showFields">
<hr class="hr-gray">
<div class="form-group">
<label class="col-sm-2 control-label text-left" style="padding-top: 15px;">Download Form</label>
<div class="col-sm-2 pull-right" style="margin-top:12px;">
<a href="javascript:void(0);" class="btn-info btn btn-md display-block growl-example-4" onclick="openInNewTab('form/Admission_Form_Front_final.jpg');openInNewTab('form/Admission _Form _back _final.jpg');">Download<div class="ripple-wrapper"></div></a>
</div>
</div>
<!-- lft -->
<!-- <p><b>Note:</b> Form Number will be provided after form submission</p> -->
<div class="col-md-6">
<div class="form-group">
<div class="col-sm-6">
<!-- <input type="hidden" name="form_no" value=""> -->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">City </label>
<div class="col-sm-6">
<!-- <select style="display: none;" class="form-control" data-size="15" data-none-results-text="No results matched" name="city" id="city" onChange="cityChange3()" data-live-search="true" data-parsley-id="1353" disabled>
</select> -->
<!-- <br> -->
<!-- other -->
<!-- <div class="form-group" id="cityResult3">
<input type="text" placeholder="Type Other" name="other_city" class="form-control" >
</div> -->
<!-- select assending order --
<select id="madina">
<option value="volvo">Cars</option>
<option value="saab">------------</option>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<script>
function sortlist()
{
var cl = document.getElementById('madina');
var clTexts = new Array();
for(i = 2; i < cl.length; i++)
{
clTexts[i-2] =
cl.options[i].text.toUpperCase() + "," +
cl.options[i].text + "," +
cl.options[i].value;
}
clTexts.sort();
for(i = 2; i < cl.length; i++)
{
var parts = clTexts[i-2].split(',');
cl.options[i].text = parts[1];
cl.options[i].value = parts[2];
}
}
sortlist();
</script>
<!-- /select assending order -->
<style>
.custom-combobox-toggle {
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
</style>
<!-- <div style="margin-top: -12px;"> -->
<select id="combobox" class="form-control selectTo" name="city" id="city" onChange="cityChange3()" >
<option value="">-Select-</option>
<?php
$sql = "SELECT `id`, `fkDataCountryId`, `fkDataStateId`, `cityName`, `cityCode`, `active`, `archive`, `order`, `dateCreated`, `dateUpdated` FROM `datacities` ORDER BY cityName ASC" ;
$res = $db->ExecuteQuery($sql);
while(list($id,$fkDataCountryId,$fkDataStateId,$cityName,$cityCode,$active,$archive,$order,$dateCreated,$dateUpdated) = $res->FetchAsArray())
{
?>
<option value="<?=$cityName?>" <?php if($cityName == $othercity){ echo "selected"; }?>><?=$cityName?></option>
<?php } ?>
<option value="Other">Other</option>
</select>
<br />
<div class="form-group" id="cityResult3">
<input type="text" placeholder="Type Other" name="other_city" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email</label>
<div class="col-sm-6">
<input type="text" name="email" id="email" value="<?=$email?>" data-parsley-type="email" placeholder="Email address" class="form-control" data-parsley-id="8336" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Qualification </label>
<div class="col-sm-6">
<!-- <input style="display: none;" type="text" id="qualification" name="qualification" value="<?=$qualification?>" class="form-control" disabled> -->
<select class="form-control" id="qualification" name="qualification">
<option value="" disabled selected>-Select-</option>
<option value="8th(Middle)" <?php if("8th(Middle)" == $qualification){ echo "selected"; }?>>8th(Middle)</option>
<option value="1-7(lower)" <?php if("1-7(lower)" == $qualification){ echo "selected"; }?>>1-7(lower)</option>
<option value="Illiterate" <?php if("IlliterateL" == $qualification){ echo "selected"; }?>>Illiterate</option>
<option value="MATRIC/ O-LEVEL" <?php if("MATRIC/ O-LEVEL" == $qualification){ echo "selected"; }?>>Matric/ O-level</option>
<option value="INTERMEDIATE / A-LEVEL" <?php if("INTERMEDIATE / A-LEVEL" == $qualification){ echo "selected"; }?>>Intermediate / A-level</option>
<option value="BACHELOR" <?php if("BACHELOR" == $qualification){ echo "selected"; }?> >Bachelor</option>
<option value="MASTER (MA / MSc)" <?php if("MASTER (MA / MSc)" == $qualification){ echo "selected"; }?>>Master (ma / Msc)</option>
<option value="MS / M.PHIL (18 years)" <?php if("MS / M.PHIL (18 years)" == $qualification){ echo "selected"; }?>>Ms / M.phil (18 Years)</option>
<option value="CERTIFICATE" <?php if("CERTIFICATE" == $qualification){ echo "selected"; }?>>Certificate</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Shift Interested* <span style="font-weight:bold;color:red;display:none;" id="shift-required-label"> This field is required </span></label>
<div class="col-sm-6" style="margin-top:7px">
<?php $shifts = explode(",",$shift_interested);?>
<?php
$sql = "SELECT `value` FROM `add_setup` WHERE name='shift'" ;
$res = $db->ExecuteQuery($sql);
while(list($available_shift) = $res->FetchAsArray())
{
?>
<label>
<input name="shift_interested[]" id="shift_interested" class="shift_interested" value="<?=$available_shift?>" type="checkbox" <?php if(in_array($available_shift,$shifts)){ echo "checked"; } ?>><?=$available_shift?>
</label>
<?php } ?>
<!-- <label>
<input name="shift_interested[]" value="Afternoon" type="checkbox" <?php // if(in_array("Afternoon",$shifts)){ echo "checked"; } ?>> Afternoon
</label>
<label>
<?php // $shifts = explode(",",$shift_interested);?>
<input name="shift_interested[]" value="Evening" type="checkbox" <?php // if(in_array("Evening",$shifts)){ echo "checked"; } ?>> Evening
</label>
<label>
<?php // $shifts = explode(",",$shift_interested);?>
<input name="shift_interested[]" value="Weekend" type="checkbox" <?php //if(in_array("Weekend",$shifts)){ echo "checked"; } ?>> Weekend
</label>
<label>
<?php // $shifts = explode(",",$shift_interested);?>
<input name="shift_interested[]" value="Customized" type="checkbox" <?php // if(in_array("Customized",$shifts)){ echo "checked"; } ?>> Customized
</label> -->
</div>
</div>
</div>
<!-- rgt -->
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-3 control-label">Address *</label>
<div class="col-sm-6"><input type="text" name="address" value="<?=$address?>" id="address" class="form-control" ></div>
</div>
<style>
.sloader,
.sloader:before,
.sloader:after {
border-radius: 50%;
width: 2.5em;
height: 2.5em;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation: load7 1.8s infinite ease-in-out;
animation: load7 1.8s infinite ease-in-out;
}
.sloader {
color: #74a3ec;
font-size: 10px;
margin: 0px 0px 45px 108px;
position: relative;
text-indent: -9999em;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation-delay: -0.16s;
animation-delay: -0.16s;
}
.sloader:before,
.sloader:after {
content: '';
position: absolute;
top: 0;
}
.sloader:before {
left: -3.5em;
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
}
.sloader:after {
left: 3.5em;
}
@-webkit-keyframes load7 {
0%,
80%,
100% {
box-shadow: 0 2.5em 0 -1.3em;
}
40% {
box-shadow: 0 2.5em 0 0;
}
}
@keyframes load7 {
0%,
80%,
100% {
box-shadow: 0 2.5em 0 -1.3em;
}
40% {
box-shadow: 0 2.5em 0 0;
}
}
</style>
<div class="form-group">
<label class="col-sm-3 control-label">Area</label>
<div class="col-sm-6 dropdown">
<input type="text" autocomplete="off" id="q" name="area" class="form-control dropbtn" autocomplete="off" value="<?=$area?>" onkeyup="searchbox(this.value)" >
<div class="smt-search" id="smt-search" style="display: block;">
<span id="smartloader" class="sloader" style="display: none;">Loading...</span>
<div id="pcat" style="display: block;">
<ul style="padding-left: 10px; line-height: 1.6em; font-weight: 500; font-size: 14;" onClick="allhide();">
<li id="productli0" style="display:none; cursor: pointer; border-bottom: 1.5px solid #74a3ec;" onClick="document.getElementById('q').value = this.innerHTML;" ></li>
<li id="productli1" style="display:none; cursor: pointer; border-bottom: 1.5px solid #74a3ec;" onClick="document.getElementById('q').value = this.innerHTML;"></li>
<li id="productli2" style="display:none; cursor: pointer; border-bottom: 1.5px solid #74a3ec;" onClick="document.getElementById('q').value = this.innerHTML;"></li>
<li id="productli3" style="display:none; cursor: pointer; border-bottom: 1.5px solid #74a3ec;" onClick="document.getElementById('q').value = this.innerHTML;"></li>
<li id="productli4" style="display:none; cursor: pointer; border-bottom: 1.5px solid #74a3ec;" onClick="document.getElementById('q').value = this.innerHTML;"></li>
</ul>
</div>
</div>
<!-- <div id="myDropdown" class="dropdown-content">
<ul>
<li id="anameli"><a id="anamehref" href="#"><?=$area?></a></li>
</ul>
</div> -->
<!-- <input type="text" name="area" value="<?=$area?>" class="form-control" /> -->
<select style="display:none" id="cat" class="form-control" data-size="15" onchange="searchbox(document.getElementById('q').value);">
<option value="">-Select-</option>
<?php
$sql = "SELECT area FROM query_log" ;
$res = $db->ExecuteQuery($sql);
while(list($areaa) = $res->FetchAsArray())
{
?>
<option value="<?=$areaa?>" <?php if("$area" == $areaa){ echo "selected"; }?>><?=$areaa?></option>
<?php } ?>
</select>
<!-- <select name="area" id="area" class="form-control" disabled>
<option value="">-Select-</option>
<option value="Adamjee Nagar" <?php //if("Adamjee Nagar" == $area){ echo "selected"; }?>>Adamjee Nagar</option>
<option value="Alhamra Society" <?php //if("Alhamra Society" == $area){ echo "selected"; }?>>Alhamra Society</option>
<option value="Bahadurabad" <?php // if("Bahadurabad" == $area){ echo "selected"; }?>>Bahadurabad</option>
<option value="Baloch Colon" <?php //if("Baloch Colon" == $area){ echo "selected"; }?>>Baloch Colony</option>
<option value="Bangalore Town" <?php // if("Bangalore Town" == $area){ echo "selected"; }?>>Bangalore Town</option>
<option value="Bufferzone" <?php // if("Bufferzone" == $area){ echo "selected"; }?>>Bufferzone</option>
<option value="Clifton" <?php // if("Clifton" == $area){ echo "selected"; }?>>Clifton</option>
<option value="CP Brar Society" <?php // if("CP Brar Society" == $area){ echo "selected"; }?>>CP Brar Society</option>
<option value="Dalmia" <?php // if("Dalmia" == $area){ echo "selected"; }?>>Dalmia</option>
<option value="Defence Housing Authority-DHA" <?php //if("Defence Housing Authority-DHA" == $area){ echo "selected"; }?>>Defence Housing Authority-DHA</option>
<option value="Delhi Colony" <?php // if("Delhi Colony" == $area){ echo "selected"; }?>>Delhi Colony</option>
<option value="Delhi Mercantile Society" <?php // if("Delhi Mercantile Society" == $area){ echo "selected"; }?>>Delhi Mercantile Society</option>
<option value="Dhoraji Colony" <?php // if("Dhoraji Colony" == $area){ echo "selected"; }?>>Dhoraji Colony</option>
<option value="F.B Area" <?php // if("F.B Area" == $area){ echo "selected"; }?>>F.B Area</option>
<option value="Garden East" <?php //if("Garden East" == $area){ echo "selected"; }?>>Garden East</option>
<option value="Garden West" <?php //if("Garden West" == $area){ echo "selected"; }?>>Garden West</option>
<option value="Gizri" <?php //if("Gizri" == $area){ echo "selected"; }?>>Gizri</option>
<option value="Gulistan-e-Johar" <?php // if("Gulistan-e-Johar" == $area){ echo "selected"; }?>>Gulistan-e-Johar</option>
<option value="Gulshan-e-Iqbal" <?php // if("Gulshan-e-Iqbal" == $area){ echo "selected"; }?>>Gulshan-e-Iqbal</option>
<option value="Hill Park" <?php // if("Hill Park" == $area){ echo "selected"; }?>>Hill Park</option>
<option value="I.I.Chundrigar Road" <?php //if("I.I.Chundrigar Road" == $area){ echo "selected"; }?>>I.I.Chundrigar Road</option>
<option value="Jamshed Town" <?php // if("Jamshed Town" == $area){ echo "selected"; }?>>Jamshed Town</option>
<option value="Jinnah Society" <?php //if("Jinnah Society" == $area){ echo "selected"; }?>>Jinnah Society</option>
<option value="Karsaz" <?php //if("Karsaz" == $area){ echo "selected"; }?>>Karsaz</option>
<option value="Korangi Creek" <?php //if("Korangi Creek" == $area){ echo "selected"; }?>>Korangi Creek</option>
<option value="Korangi Residential Area" <?php //if("Korangi Residential Area" == $area){ echo "selected"; }?>>Korangi Residential Area</option>
<option value="Kutchi Memon Society" <?php// if("Kutchi Memon Society" == $area){ echo "selected"; }?>>Kutchi Memon Society</option>
<option value="Malir Halt" <?php // if("Malir Halt" == $area){ echo "selected"; }?>>Malir Halt</option>
<option value="Mehmoodabad" <?php // if("Mehmoodabad" == $area){ echo "selected"; }?>>Mehmoodabad</option>
<option value="Muhammad Ali Society" <?php // if("Muhammad Ali Society" == $area){ echo "selected"; }?>>Muhammad Ali Society</option>
<option value="Nazimabad Town" <?php // if("Nazimabad Town" == $area){ echo "selected"; }?>>Nazimabad Town</option>
<option value="North Karachi" <?php // if("North Karachi" == $area){ echo "selected"; }?>>North Karachi</option>
<option value="North Nazimabad" <?php // if("North Nazimabad" == $area){ echo "selected"; }?>>North Nazimabad</option>
<option value="Nursery" <?php // if("Nursery" == $area){ echo "selected"; }?>>Nursery</option>
<option value="Overseas Cooperative Housing Society" <?php // if("Overseas Cooperative Housing Society" == $area){ echo "selected"; }?>>Overseas Cooperative Housing Society</option>
<option value="PECHS" <?php // if("PECHS" == $area){ echo "selected"; }?>>PECHS</option>
<option value="Punjab Colony" <?php // if("Punjab Colony" == $area){ echo "selected"; }?>>Punjab Colony</option>
<option value="Saddar" <?php // if("Saddar" == $area){ echo "selected"; }?>>Saddar</option>
<option value="Shadman Town" <?php// if("Shadman Town" == $area){ echo "selected"; }?>>Shadman Town</option>
<option value="Shah Faisal town" <?php //if("Shah Faisal town" == $area){ echo "selected"; }?>>Shah Faisal town</option>
<option value="Shara-e-faisal" <?php// if("Shara-e-faisal" == $area){ echo "selected"; }?>>Shara-e-faisal</option>
<option value="Sindhi Muslim Society-SMCHS" <?php //if("Sindhi Muslim Society-SMCHS" == $area){ echo "selected"; }?>>Sindhi Muslim Society-SMCHS</option>
<option value="Tariq Road" <?php //if("Tariq Road" == $area){ echo "selected"; }?>>Tariq Road</option>
</select> -->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Date of Birth </label>
<div class="col-sm-6">
<!-- Date -->
<div class="input-prepend input-group">
<span class="add-on input-group-addon">
<i class="glyph-icon icon-calendar"></i>
</span>
<input id="dob" name="dob" value="<?=$dob?>" type="text" class="bootstrap-datepicker form-control"
data-date-format="dd/mm/yy" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">SSC % </label>
<div class="col-sm-6"><input id="ssc_per" name="ssc_per" value="<?=$ssc_per?>" type="text" class="form-control" ></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Campus *</label>
<div class="col-sm-6">
<select id="campus" name="campus" class="form-control" data-parsley-id="0001">
<?php if($role=='admin'){ ?>
<option value="N/A" disabled selected>-Select-</option>
<option value="DMSTI" <?php if("DMSTI" == $campus){ echo "selected"; }?>>DMSTI</option>
<option value="CVI" <?php if("CVI" == $campus){ echo "selected"; }?>>CVI</option>
<option value="FAASTI" <?php if("FAASTI" == $campus){ echo "selected"; }?>>FAASTI</option>
<option value="SDAMKTI" <?php if("SDAMKTI" == $campus){ echo "selected"; }?>>SDAMKTI</option>
<option value="HAKTI" <?php if("HAKTI" == $campus){ echo "selected"; }?>>HAKTI </option>
<option value="PATTI" <?php if("PATTI" == $campus){ echo "selected"; }?>>PATTI</option>
<option value="THF-SNTI" <?php if("THF-SNTI" == $campus){ echo "selected"; } ?>>THF-SNTI</option>
<?php } else { ?>
<option value="<?=$_SESSION["Role"]?>" selected><?=$_SESSION["Role"]?></option>
<?php } ?>
</select>
</div>
</div>
</div>
</div>
<div class="bg-default content-box text-center pad20A mrg25T">
<button class="btn btn-lg btn-primary" id="checkBtn">Submit</button>
</div>
</form>
</div>
</div>
</div>
<!-- /initial query --->
</div>
</div>
<!-- Right Content Area -->
</div>
<!-- page-wrapper -->
<!-- foot Scripts -->
<?php include('includes/foot-scripts.php')?>
</div>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script> -->
</body>
</html>
<?php
if($form_no != ""){
?>
<script>
document.getElementById('chkformreq').checked = true;
showfrm();
forreq(document.getElementById('chkformreq'));
</script>
<?php
}
?>
<?php
if($hearaboutus != "BillBoard" && $hearaboutus != "Newspaper" && $hearaboutus != "Camp" && $hearaboutus != "Friend" && $hearaboutus != "Internet" && $hearaboutus != "Rikshaw Campaign" && $hearaboutus != "TV Ticker" && $hearaboutus != "Other"){
?>
<script>
document.getElementById('queryResult2').style.display = 'block';
document.getElementById('hear').value;
document.getElementById('other2').value = 'Other';
</script>
<?php
}
?>
<?php
// if($area == ""){
?>
<!-- <script>
$("#chkformreq").click(function(){
document.getElementById('chkformreq') = disabled;
}); -->
</script>
<?php // } ?>