[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: admin-user.php
<?php include("includes/functions/functions.php");?> <?php include("db/db.php");?> <?php if(!isset($_SESSION['name_Xw211qAAsq4'])){ header('Location: index'); exit(); }else{ $pageTitle1 = 'Admin Account'; $shopname = $_SESSION['name_Xw211qAAsq4']; $notificationType = "success"; if(isset($_POST['del'])){ $ID = mysqli_real_escape_string($new,$_POST['SID']); $DEL = mysqli_query($new,"DELETE FROM expenses WHERE id = '$ID'"); echo "<script>alert('Record successfully deleted');</script>"; echo "<script>window.location.href='expenses'</script>"; } if(isset($_POST['edit'])){ $admin_id = filter_input(INPUT_POST, 'admin_id', FILTER_SANITIZE_STRING); $admin_id = htmlspecialchars($admin_id, ENT_QUOTES, 'UTF-8'); $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_STRING); $status = htmlspecialchars($status, ENT_QUOTES, 'UTF-8'); $stmt_update_service = $con->prepare("UPDATE barber_admin SET expired = ? WHERE admin_id = ?"); $stmt_update_service->execute(array($status,$admin_id)); echo "<script>window.location.href='admin-user'</script>"; } ?> <div id="layout-wrapper"> <div class="header-border"></div> <header id="page-topbar"> <?php include("includes/template/header.php");?> </header> <!-- Plugins css --> <link href="plugins/datatables/dataTables.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/responsive.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/buttons.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/select.bootstrap4.css" rel="stylesheet" type="text/css" /> <title><?php echo $shopname?> || <?php echo $pageTitle1;?></title> <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js'></script> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css'/> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/theme.min.css" rel="stylesheet" type="text/css" /> <div class="vertical-menu"> <?php include("includes/template/sidebar.php");?> </div> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <h4 class="mb-0 font-size-18">All Owner</h4> <div class="page-title-box d-flex align-items-center justify-content-between"> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <table id="basic-datatable" class="table table-bordered"> <thead> <tr> <th>ID</th> <th>Full name</th> <th>Email </th> <th>Phone </th> <th>Business name</th> <th>Date registered</th> <th>Expired</th> <th>Action</th> </tr> </thead> <tbody> <?php $cont = 1; $type = "Admin"; $stmt = $con->prepare("SELECT * FROM barber_admin WHERE account_type = ?"); $stmt->execute(array($type)); $rows_services = $stmt->fetchAll(); ?> <tr> <?php foreach($rows_services as $service){ ?> <td><?php echo $cont++;?></td> <td><?php echo $service['full_name'];?></td> <td><?php echo $service['email'];?></td> <td><?php echo $service['phone'];?></td> <td><?php echo $service['business_name'];?></td> <td><?php echo $service['forgot_pass_expire_time'];?></td> <td><?php echo $service['expired'];?></td> <td> <?php $edit_data = "edit_".$service["admin_id"];?> <?php $delete_data = "delete_".$service["admin_id"];?> <li class="list-inline-item" data-toggle="tooltip" title="Edit"> <a href="#" data-toggle="modal" data-target="#<?php echo $edit_data; ?>" data-placement="top"><i class="fa fa-edit"></i></a> </li> <li class="list-inline-item" data-toggle="tooltip" title="Delete"> <a href="#" data-toggle="modal" data-target="#<?php echo $delete_data; ?>" data-placement="top"><i class="fa fa-trash-alt" style="color:red"></i></a> </li> <ul> <!-- EDIT Modal --> <div class="modal fade" id="<?php echo $edit_data; ?>" tabindex="-1" role="dialog" aria-labelledby="<?php echo $edit_data; ?>" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Account status</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="form-group"> <form method="POST"> <label for="category_name">Change status</label> <br /> <input type="hidden" name="admin_id" value="<?php echo $service["admin_id"]; ?>"> <select class="form-control" name="status" style="width: 330px;" required> <option value="">Select option</option> <option value="yes">Expired</option> <option value="no">Active</option> <option value="block">Block</option> </select> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" name="edit" class="btn btn-success edit_category_bttn">Save</button> </form> </div> </div> </div> </div> </li> </ul> </td> </tr> <?php };?> </tbody> </table> </div> <!-- end card body--> </div> <!-- end card --> </div><!-- end col--> </div> <!-- end row--> </div> <!-- container-fluid --> </div> <!-- End Page-content --> <?php include("includes/template/footer.php");?> </div> <!-- end main content--> </div> <!-- Overlay--> <div class="menu-overlay"></div> <?php include("includes/modals/ExpensesModal.php");?> <!-- third party js --> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap4.js"></script> <script src="plugins/datatables/dataTables.responsive.min.js"></script> <script src="plugins/datatables/responsive.bootstrap4.min.js"></script> <script src="plugins/datatables/dataTables.buttons.min.js"></script> <script src="plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="plugins/datatables/buttons.html5.min.js"></script> <script src="plugins/datatables/buttons.flash.min.js"></script> <script src="plugins/datatables/buttons.print.min.js"></script> <script src="plugins/datatables/dataTables.keyTable.min.js"></script> <script src="plugins/datatables/dataTables.select.min.js"></script> <!-- third party js ends --> <!-- Datatables init --> <script src="assets/pages/datatables-demo.js"></script> <!-- App js --> <script src="assets/js/theme.js"></script> </body> </html> <?php }?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.73 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002