[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: role.php
<?php include("../admin/includes/functions/functions.php");?> <?php include("../admin/db/db.php");?> <?php if(!isset($_SESSION['username_Xw211qAAsq4'])) { header('Location: ../auth/'); exit(); } else{ $pageTitle1 = 'Role Permissions'; $shopname = $_SESSION['business_name_Xw211qAAsq4']; // if(isset($_POST['submit'])){ // $check2 = $_POST['check2']; // $check = $_POST['check']; // foreach($check as $value){ // $sql = "UPDATE role_permissions SET add = '$check2' WHERE page_name = '$value' and business_name = '$shopname'"; // $conn->query($sql); // } // } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title> <?php echo $shopname;?> - <?php echo $pageTitle1;?></title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> <link rel="shortcut icon" href="../assets/icon.png" type="image/x-icon"> <link rel="icon" href="../assets/icon.png" type="image/x-icon"> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <!-- 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" /> <style> /* The container */ .container { display: block; position: relative; padding-left: 35px; margin-bottom: 12px; cursor: pointer; font-size: 18px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /* Hide the browser's default checkbox */ .container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } /* Create a custom checkbox */ .checkmark { position: absolute; top: 0; left: 0; height: 18px; width: 18px; background-color: #eee; } /* On mouse-over, add a grey background color */ .container:hover input ~ .checkmark { background-color: #ccc; } /* When the checkbox is checked, add a blue background */ .container input:checked ~ .checkmark { background-color: #2196F3; } /* Create the checkmark/indicator (hidden when not checked) */ .checkmark:after { content: ""; position: absolute; display: none; } /* Show the checkmark when checked */ .container input:checked ~ .checkmark:after { display: block; } /* Style the checkmark/indicator */ .container .checkmark:after { left: 9px; top: 5px; width: 5px; height: 10px; border: solid white; border-width: 0 3px 3px 0; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); } /*table, th, td { border: 1px solid black; }*/ </style> </head> <body> <!-- Begin page --> <div id="layout-wrapper"> <div class="header-border"></div> <?php include("includes/template/head.php");?> <?php include("includes/template/side.php");?> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-flex align-items-center justify-content-between"> <h4 class="mb-0 font-size-18">Role Permissions</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);"><?= $shopname;?></a></li> <li class="breadcrumb-item active"><?php echo $pageTitle;?></li> </ol> </div> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="col-xl-12"> <h6>Admin role</h6> <div id="message" style="color: green;"></div> <br /> <form method="POST" id="registration-form"> <div class="table-responsive"> <!--Table--> <table class="table table-striped"> <tr> <th>Page</th> <th>Activate</th> <th>Allow Add</th> <th>Allow Update</th> <th>Allow Delete</th> </tr> <tr> <td> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck1" value="Dashboard Analytics">Dashboard Analytics <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck2" value="Service Category">Service Category <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck3" value="Service"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck4" value="In-House Sales"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck5" value="Online Appointments"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck6" value="Suppliers"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck7" value="Product Stock"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck8" value="POS"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck9" value="Product Sales"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck10" value="Product Out of Stock"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck11" value="Add New Stock"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck12" value="Products Report"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck13" value="Vendors"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck14" value="Employee"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck15" value="Payroll"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck16" value="Manage Users"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck17" value="Customers"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck18" value="Customers Report"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck19" value="Todays-service"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck20" value="Sales Report"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck21" value="Commission"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck22" value="Commission Report"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck23" value="Expenses"> <input type="checkbox" checked name="checkbox_values[]" class="custom-control-input" id="customCheck24" value="Expenses Report"> </td> <td> <label class="container"> <input type="checkbox" name="check[]" value="<?php echo $dbdash;?>" <?php if($status == 1) echo 'checked';?>> <span class="checkmark"></span> </label> </td> <td> <label class="container"> <input type="checkbox" name="check2[]" value="<?php echo $dbdash;?>" <?php if($add == 1) echo 'checked';?>> <span class="checkmark"></span> </label> </td> <td> <label class="container"> <input type="checkbox" name="check3" value="<?php echo $dbdash;?>" <?php if($updaterecord == 1) echo 'checked';?>> <span class="checkmark"></span> </label> </td> <td> <label class="container"> <input type="checkbox" name="check4" value="<?php echo $dbdash;?>" <?php if($deleterecord == 1) echo 'checked';?>> <span class="checkmark"></span> </label> </td> </tr> </table> </div> <!-- <center> <input type="submit" class="btn btn-success" value="Submit"> </center> --> </form> </div> </div> </div> </div> </div> </div> <!--end row--> </div> <!-- container-fluid --> </div> <!-- End Page-content --> <?php include("includes/template/newfooter.php");?> </div> <!-- end main content--> </div> <!-- END layout-wrapper --> <!-- Overlay--> <div class="menu-overlay"></div> <?php include("includes/modals/CustomersModal.php");?> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.bundle.min.js"></script> <script src="assets/js/metismenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/simplebar.min.js"></script> <script src="plugins/raphael/raphael.min.js"></script> <script src="assets/pages/dashboard-demo.js"></script> <script src="assets/js/theme.js"></script> <script src="assets/pages/datatables-demo.js"></script> <script type="text/javascript"> document.onreadystatechange = function() { if (document.readyState !== "complete") { document.querySelector("#preloader").style.display = "block"; } else { document.querySelector("#preloader").style.display = "none"; } }; </script> <!-- <script type="text/javascript"> $('input[name="check[]"]').change(function(){ var values = []; $('input[name="check[]"]').each(function(){ var value = $(this).prop('checked') ? 1 : 0; values.push({id: $(this).val(), value: value}); }); $.ajax({ url: 'update_checkboxes.php', type: 'POST', data: {values: values}, dataType: 'json', success: function(response) { if (response.status == 'success') { swal("Success!", response.message, "success").then(() => { location.reload(); }); //window.location.href = response.redirect; $('#registration-form')[0].reset(); } else { swal("Error!", response.message, "error").then(() => { location.reload(); }); } } }); }); </script> <script type="text/javascript"> $(document).ready(function() { $('input[type=checkbox]').change(function() { var check2 = $('input[type=checkbox]:checked').map(function() { return $(this).val(); }).get(); $.ajax({ type: 'POST', url: 'allow_add.php', data: { check2: check2 }, success: function(response) { if (response.status == 'success') { swal("Success!", response.message, "success").then(() => { location.reload(); }); //window.location.href = response.redirect; //$('#registration-form')[0].reset(); } else { swal("Error!", response.message, "error").then(() => { location.reload(); }); } } }); }); }); </script> --> </body> </html>
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: 60.07 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