MINI Sh3ll
<?php
include('include/session.php');
include('config/mysql_crud.php');
$db = new Database();
$db->connect();
$db->select('resource_type_enquiries','*',NULL,"resource_type_type='press release' AND flag=0",'id DESC');
$resource_type_enquiries = $db->getResult();
?>
<!DOCTYPE html>
<html lang="en">
<?php include('header.php');?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php include('nav.php');?>
<?php include('top_navigation.php');?>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<div class="col-md-8 col-lg-8">
<h2> Press Release Enquiries </h2>
</div>
<div class="clearfix"></div>
</div> <br/>
<?php if(isset($_SESSION['message'])) { ?>
<div class="col-lg-12">
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">×</a>
<strong><?php echo $_SESSION["message"]; ?></strong>
</div>
</div>
<?php unset($_SESSION['message']); } ?>
<div class="x_content">
<table id="datatable-checkbox" class="table table-striped table-bordered bulk_action">
<thead>
<tr>
<th>Sr.</th>
<th>Name</th>
<th>Email </th>
<th>Contact Number</th>
<th>Company Name</th>
<th>Job Title</th>
<th>Enquiry For</th>
<th>Delete</th>
</tr>
</thead>
<tbody id="test-list" style="list-style:none; padding-top:20px;">
<?php
$i=1;
foreach($resource_type_enquiries as $enquiries){
?>
<tr id="listItem_<?php echo $enquiries['id']; ?>">
<td> <?php echo $i; ?> </td>
<td> <?php echo html_entity_decode($enquiries['name'],ENT_QUOTES) ?> </td>
<td> <?php echo html_entity_decode($enquiries['email'],ENT_QUOTES) ?> </td>
<td> <?php echo html_entity_decode($enquiries['contact'],ENT_QUOTES) ?> </td>
<td> <?php echo html_entity_decode($enquiries['company_name'],ENT_QUOTES) ?> </td>
<td> <?php echo html_entity_decode($enquiries['job_title'],ENT_QUOTES) ?> </td>
<td>
<?php
$db->select('press_releases','*',NULL,"id='".$enquiries['resource_type_id']."' AND flag=0");
$row = $db->getResult();
echo $row[0]['title'];
?>
</td>
<td><a class="btn btn-danger global_delete del<?php echo $enquiries['id']; ?>" rel="<?php echo $enquiries['id']; ?>" bel="resource_type_enquiries" href="javascript:void(0)">Delete</a></td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<!-- footer content -->
<?php include('footer.php');?>
<!-- /footer content -->
</div>
</div>
<script>
$(document).ready(function() {
$('body').on('click','.global_delete',function(){
var table=$(this).attr('bel');
var id=$(this).attr('rel');
if(confirm('Are you sure you want to delete it?')==true) {
$.ajax({
type:'POST',
url:'delete.php',
data:'table='+table+'&id='+id,
success:function(){
$('.del'+id).parent().parent().fadeOut('slow');
}
})
}
})
});
</script>
</body>
</html>
OHA YOOOO