/
var
/
www
/
html
/
stengineers
/
admin
/
Upload FileeE
HOME
<?php header('Access-Control-Allow-Origin: *'); require_once('dbconnection.php'); error_reporting(0); $crmenu_active = "active"; include 'header.php'; ?> <!-- Begin Page Content --> <div class="container-fluid"> <!-- Page Heading --> <h1 class="h3 mb-2 text-gray-800">Job List</h1> <p> <a href="job-add.php" class="btn btn-success btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-check"></i> </span> <span class="text">Add Job</span> </a> </p> <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3"> <!-- <h6 class="m-0 font-weight-bold text-primary">DataTables Example</h6> --> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>Designation</th> <th>Experience</th> <th>Job Type</th> <th>Education</th> <th>Action</th> </tr> </thead> <tbody id="table_id"> <?php $s = "select * from job_details"; $res = mysqli_query($con, $s); $num = mysqli_num_rows($res); if ($num == 0) { echo '<tr> <td colspan="5">No Datas Found</td> </tr>'; } else { $carr = array(); $sql = "select * from job_details"; $selected = mysqli_query($con, $sql); while($row = mysqli_fetch_array($selected)) { $id = $row['id']; $designation = $row['designation']; $experience = $row['experience']; $jobtype = $row['jobtype']; $education = $row['education']; echo "<tr> <td>$designation</td> <td>$experience</td> <td>$jobtype</td> <td>$education</td> <td style='white-space: nowrap;'> <a href='job-edit.php?id=$id' class='btn btn-info btn-circle btn-sm'> <i class='fas fa-edit'></i> </a> <a class='btn btn-danger btn-circle btn-sm' onclick='deleteData($id)'> <i class='fas fa-trash'></i> </a> </td> </tr>"; } } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> <script type="text/javascript"> function refreshData(){ $("#table_id").load(window.location + " #table_id"); } function deleteData(id){ var id = id; var getData; if(confirm('Are you sure you want to delete?')) { $.ajax({ url: 'api/career.php', type: 'POST', data:{id:id,action:"delete", referer:"ezioaws"}, success: function (response) { var data = JSON.parse(response); console.log(data); if (data.status == 'success') { alert("Deleted Successfully") window.location.href="job-list.php"; } else { alert("Failed, Please try again later") } } }); } } </script> <?php include 'footer.php'?>