OverLord Shell
<?php
session_start();
if(!isset($_SESSION['company_id']) || !isset($_SESSION['company_name'])){session_destroy();header("location:login/");}
include("db/conn.php");
include_once("headerdash.inc.php");
include("sidebar.php");
$loggedin = (!empty($_SESSION['loggedin'])) ? $_SESSION['loggedin'] : null;
$companyid = (!empty($_SESSION['company_id'])) ? $_SESSION['company_id'] : null;
$companyname = (!empty($_SESSION['company_name'])) ? $_SESSION['company_name'] : null;
isAuthorized($companyid ,$companyname,$loggedin);
$editrow = getData('busdir_mst_jobprofile','company_id',$companyid,null,null);
if(empty($editrow))header("location:404.php");
?>
<section>
<div class="second-page-container" style="padding-top: 30px;ba">
<div class="container">
<div class=" row " >
<div class="col-md-8">
<div class=" well col-lg-6 col-sm-6" style="width: 121%; padding-top: 3%;
border-top-color: red;border-top-width: 7px;">
<fieldset><legend>
<h4 class="wow fadeInRight animated" data-wow-duration="1s" style="color:red;padding-top:2%"> Add Details</h4></legend><br>
<form role="form" id="updateform" >
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Higher Education <span class="require">*</span></label>
<?php
$listq1="SELECT * FROM busdir_mst_education where active='1'";
$listr1=$connection->query($listq1);
?>
<div class="form-group ">
<select class="form-control" name="edu_id" id="edu_id" data-validation="required" >
<option >Select</option>
<?php
while($listrow1=$listr1->fetch_assoc()){
?>
<option style="width: 98%;" value="<?php echo $listrow1['edu_id'];?>" <?php if($editrow['higher_edu']==$listrow1['edu_id'])echo "Selected";?>><?php echo $listrow1['edu'];?>
</option>
<?php
}?></select></div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Course <span class="require">*</span></label>
<input type="text" class="form-control" name="course" id="course" maxlength="100" data-validation="required" data-validation-error-msg="Invalid " value="<?php echo $editrow['course'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Specialization <span class="require">*</span></label>
<input type="text" class="form-control" name="specialization" id="specialization" maxlength="100" data-validation="required" data-validation-error-msg="Invalid " value="<?php echo $editrow['specialization'];?>">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>University / College <span class="require">*</span></label>
<input type="text" class="form-control" name="college" id="college" maxlength="100" data-validation="required" data-validation-error-msg="Invalid " value="<?php echo $editrow['college'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Course Type <span class="require">*</span></label>
<select class="form-control" name="course_type" id="course_type">
<option >Select</option>
<option value="full_time" <?php if(trim($editrow['course_type'])=='full_time') echo "Selected";?>>Full Time</option>
<option value="part_time"<?php if(trim($editrow['course_type'])=='part_time') echo "Selected";?>>Part Time</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Passing Year <span class="require">*</span></label>
<input type="text" class="form-control" name="passing_year" id="passing_year" maxlength="100" data-validation="required" data-validation-error-msg="Invalid " value="<?php echo $editrow['passing_year'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Resume <span class="require"></span> <small class="text-muted">(max size: 1MB)</small></label>
<div class="input-group">
<input type="file" class="form-control" name="resume" id="resume" ><?php if(!empty($editrow['resume'])){?>
<a href="<?php echo"uploads/resume/".$editrow['resume'];?>" class="fancybox input-group-addon " title="Logo" target="_blank"><i class="fa fa-eye"></i></a>
<?php }?>
</div> <input type="hidden" name="old_resume" id="old_resume" value="<?php echo $editrow['resume']; ?>">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Skill <span class="require">*</span></label>
<input type="text" class="form-control" name="skill" id="skill" maxlength="250" data-validation="required" data-validation-error-msg="Invalid " value="<?php echo $editrow['skill'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Description <span class="require">*</span></label>
<textarea class="form-control" name="job_description" id="job_description" rows="5" maxlength="500" data-validation="required" data-validation-error-msg="Invalid Description"><?php echo $editrow['job_description'];?></textarea>
</div>
</div>
<div class="note note-danger displaynone"></div>
<div class="col-sm-6" style="float:right;padding-top: 11%; padding-left: 23%;">
<button type="submit" class="btn btn-primary" data-loading-text="Submitting...">Add</button>
<button type="reset" class="btn btn-default" onClick="$('.note-danger').hide()">Reset</button>
<a href="javascript:void(0)" class="btn btn-link" onclick="history.back()"><i class="fa fa-angle-left mrm"></i>Go Back</a>
</div>
</div>
</form>
</fieldset>
</div>
</div><!--col-md-8-->
</div>
</div>
</div>
</div>
</section>
<link type="text/css" rel="stylesheet" href="css/jquery.fancybox.css">
<script>
function valEdit() {
$.validate({
modules: 'file,security',
form: '#updateform',
scrollToTopOnError: false,
onSuccess: function() {
$('#updateform button[type=submit]').button('loading');
$('#updateform button[type=reset]').attr('disabled', 'disabled');
$('.note-danger').html('').hide();
$.ajax({
type: 'POST',
url: 'candidatebedit_save.php',
data: new FormData($('#updateform')[0]),
contentType: false,
processData: false,
success: function(data) {
alert(data);
if (data == 'success') {
location = 'candidatec.php?msg=update_success';
} else if (data.substr(data.length - 4) == '.php') location = data;
else {
$('.note-danger').html(data).show();
$('#updateform button[type=submit]').button('reset');
$('#updateform button[type=reset]').removeAttr('disabled');
}
}
});
return false;
}
});
}
valEdit();
</script>
<script src="js/jquery.fancybox.pack.js"></script>
</script>
<?php include_once("footer.inc.php");connClose();?>
xRyukZ - Copyright 2k19