ok
Direktori : /home2/selectio/public_html/y1jobportal.in/admin/ |
Current File : /home2/selectio/public_html/y1jobportal.in/admin/recruitment_edit.php |
<?php include 'header.php'; $ids = $_GET['id']; $statement = $pdo->prepare("SELECT * FROM `tbl_job_vacancy` WHERE id=$ids"); $statement->execute(); $query = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); ?> <div class="page-wrapper" > <div class="page-content"> <form id="form_details"> <input type="hidden" class="form-control" id="ids" name="ids" value="<?=$ids?>" required> <div class="row" id="content-div"> <div class="col-lg-12"> <div class="card" style="margin: 0px 10px 30px 10px; box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"> <div class="card-body"> <div class="row g-3" style="padding: 0px 0px 20px 0px;"> <div class="col-12 col-lg-12"> <a href="job_recruitment.php" class="btn btn-danger btn-sm" style="float: right;"><i class="bi bi-arrow-left-circle"></i> Back to List</a> <b style="font-weight: bolder;font-size: 17px;">Update Recruitment Details</b> <hr> </div> <div class="col-sm-4"> <div class="form-group"> <label for="category_id" class="form-label required">Select Subcategory</label> <select class="form-control select2" id="category_id" name="category_id" > <option value="">All Subcategory</option> <?php $statement = $pdo->prepare("SELECT * FROM `sub_category` WHERE status=1"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option value="<?=$result['id']?>" <?php if($query[0]['sub_category']==$result['id']){ echo 'selected'; } ?> ><?=$result['name']?></option> <?php } ?> </select> </div> </div> <div class="col-12 col-lg-4"> <label for="vacancy" class="form-label required">How Many Vacancy</label> <input type="text" class="form-control" id="vacancy" value="<?=$query[0]['job_vacancy']?>" name="vacancy" placeholder="Enter Job Vacancy" required> </div> <div class="col-12 col-lg-4"> <label for="minimum_experience" class="form-label required">Minimum Experience</label> <input type="text" class="form-control" id="minimum_experience" value="<?=$query[0]['minimum_experience']?>" name="minimum_experience" placeholder="Enter Minimum Mxperience" required> </div> <div class="col-12 col-lg-4"> <label for="salary" class="form-label required">Salary</label> <input type="text" class="form-control" value="<?=$query[0]['salary']?>" id="salary" name="salary" placeholder="Enter Salary" required> </div> <div class="col-12 col-lg-4"> <label for="status" class="form-label required">Status</label> <select class="form-control" id="status" name="status" required> <option value="1" <?php if($query[0]['status']==1){echo "selected";}?>>Active</option> <option value="0" <?php if($query[0]['status']==0){echo "selected";}?>>In-Active</option> </select> </div> <div class="col-12 col-lg-4"> <label for="job_description" class="form-label required">Job Description</label> <textarea class="form-control" id="job_description" name="job_description" placeholder="Enter Job Description" rows="4" cols="50"><?=$query[0]['job_description']?></textarea> </div> </div> </div> </div> <div class="col text-center"> <button type="submit" class="btn btn-primary px-5">Update Details</button> </div> </div> </div> </form> <div class="container" id="loading-div" style="display: none;"> <center> <img src="image/loading.gif" style="width: 250px;"><br><b class="blinking">Processing Please Wait...</b></center> </div> <div class="container" id="success-div" style="display: none; margin-top: 40px;"> <center><b class="blinking" style="font-size:22px;">Recruitment Details Updated Successfully...</b><br> <img src="image/success.gif" style="width: 250px;"> <br><br><a href="job_recruitment.php"><button class="btn btn-warning"><i class="fa fa-list"></i> Back to Recruitment List </button></a> <a href="recruitment_edit.php"><button class="btn btn-success"><i class="fa fa-plus"></i> Back to Recruitment Edit Details</button></a> </center> </div> </div> </div> <?php include 'footer.php'; ?> <script> $(document).ready(function(){ $('#form_details').on('submit', function(e){ e.preventDefault(); $('#loading-div').show(); $('#content-div').hide(); var formData = new FormData(this); formData.append('type', 'update_vacancy'); $.ajax({ url: 'apis/subcategory.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { //console.log(response); if(response['status']==200){ success(response['message']); $('#loading-div').hide(); $('#form_details').trigger("reset"); $('#success-div').show(); }else{ warning(response['message']); $('#loading-div').hide(); $('#content-div').show(); } } }); }); }); </script>