GIF89a
<?php
error_reporting(0);
include("include/admin-main.php");
include("include/header.php");
$obj=new admin();
$reg_details=$obj->select_objData("register","WHERE reg_id IN (SELECT reg_id FROM `cart` WHERE paysts='Success') order by uid DESC");
/* this code is used for inactive */
if($_REQUEST['action']=='Inactive'){
if(mysqli_query($con,"update register set status='Inactive' where uid=".$_REQUEST['uid'])){
?>
<script>
alert("Registration deactive successfully");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
else{
?>
<script type="text/javascript">
alert("Error! Data Not Deactive");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
}
/* this code is used for active */
if($_REQUEST['action']=='Active'){
if(mysqli_query($con,"update register set status='Active' where uid=".$_REQUEST['uid'])){
?>
<script>
alert("Registration active successfully");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
else{
?>
<script type="text/javascript">
alert("Error! Data Not Deactive");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="img/favicon.png">
<title><?php include("include/title.php")?> | Registration Details</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-reset.css" rel="stylesheet">
<!--external css-->
<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />
<!-- DataTables CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap5.min.css">
<!-- DataTables Buttons CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.bootstrap5.min.css">
<style>
div.dt-buttons {
border: 1px solid black !important;
}
</style>
</head>
<body>
<?php include 'popup.php';?>
<!--header end-->
<!--sidebar start-->
<?php include 'menu.php' ?>
<!--sidebar end-->
<section id="main-content">
<section class="wrapper">
<div class="row">
<div class="col-lg-12">
<table id="example" class="table table-striped">
<thead>
<tr>
<th>Seq. No</th>
<th>Name</th>
<th>Email / Phone</th>
<th>Password</th>
<th style="display:none">Sponsor Code</th>
<th style="display:none">Address</th>
<th>Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $a=1;
while($row = mysqli_fetch_array($reg_details)){
@extract($row);
?>
<tr>
<td><?php echo $a; ?></td>
<td><?php echo $cfname;?><br>
( <b><?php echo $reg_id;?></b> )</td>
<td><?php echo $cemail."<br>".$ctel;?></td>
<td><?php echo $cpassword;?></td>
<td style="display:none"><?php echo $alternateno;?></td>
<td style="display:none"><i><?php echo $cadd1;?> , <?php echo $cstate;?> , <?php echo $ccity;?> - <?php echo $cpincode;?></i></td>
<td><?php echo date('d-m-Y H:i:s',$currentDate)?></td>
<td>
<a href="order-details.php?sid=<?php echo $reg_id?>" title="View order">
<button class="btn btn-danger btn-xs" style="padding: 1px 6px;"><i class="icon-user"></i></button>
</a>
<?php if($status=='Active'){?>
<a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Inactive&uid=<?php echo $uid; ?>" title="Active">
<button class="btn btn-danger btn-xs" onclick='return changeSts()'><i class="icon-ok"></i></button>
</a>
<?php } else{?>
<a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Active&uid=<?php echo $uid?>" title="Inactive">
<button class="btn btn-danger btn-xs" onclick='return changeSts()' style="padding: 1px 6px;"><i class="icon-remove"></i></button>
</a>
<?php }?>
<a href="editprofile.php?regId=<?php echo $reg_id;?>" title="Update Profile">
<button class="btn btn-danger btn-xs" style="padding: 1px 6px;"><i class="icon-edit"></i></button>
</a>
</td>
</tr>
<?php $a++; } ?>
</tbody>
</table>
</div>
</div>
</section>
</section>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- DataTables JS -->
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.5/js/dataTables.bootstrap5.min.js"></script>
<!-- DataTables Buttons JS -->
<script src="https://cdn.datatables.net/buttons/2.4.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.bootstrap5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable({
dom: 'lBfrtip', // 'l' includes the length changing input control
buttons: [
{
text: 'Export to Excel',
extend: 'excelHtml5',
exportOptions: {
modifier: {
page: 'current' // Export only the visible data
}
}
}
],
lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ],
pageLength: 10 // Default number of rows to display
});
});
</script>
</body>
</html>