D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
user-permission.php
back
Copy
<?php ob_start(); session_start(); include 'config.php'; $login = $_SESSION['login_email']; if($login == ''){ echo '<script>location.replace("index.php")</script>'; } $id = ""; if(isset($_GET["id"]) && $_GET["id"] != ""){ $id = base64_decode($_GET["id"]); } if(isset($_SESSION["source_id"])){ $source_id = $_SESSION['source_id']; } $contactView = ""; $contactAdd = ""; $contactEdit = ""; $contactDelete = ""; $inventoryView = ""; $inventoryAdd = ""; $inventoryEdit = ""; $inventoryDelete = ""; $financeView = ""; $financeAdd = ""; $financeEdit = ""; $financeDelete = ""; $generalView = ""; $generalAdd = ""; $generalEdit = ""; $generalDelete = ""; $userView = ""; $userAdd = ""; $userEdit = ""; $userDelete = ""; $sqlGetAccess = "SELECT * FROM user_permission WHERE user_email = '$id' AND source_id = '$source_id'"; $result = mysqli_query($conn, $sqlGetAccess); if($result){ if(mysqli_num_rows($result) > 0){ while($rowGetAccess = mysqli_fetch_assoc($result)){ $contactView = $rowGetAccess["contact_view"]; $contactAdd = $rowGetAccess["contact_add"]; $contactEdit = $rowGetAccess["contact_edit"]; $contactDelete = $rowGetAccess["contact_delete"]; $inventoryView = $rowGetAccess["inventory_view"]; $inventoryAdd = $rowGetAccess["inventory_add"]; $inventoryEdit = $rowGetAccess["inventory_edit"]; $inventoryDelete = $rowGetAccess["inventory_delete"]; $financeView = $rowGetAccess["finance_view"]; $financeAdd = $rowGetAccess["finance_add"]; $financeEdit = $rowGetAccess["finance_edit"]; $financeDelete = $rowGetAccess["finance_delete"]; $generalView = $rowGetAccess["general_view"]; $generalAdd = $rowGetAccess["general_add"]; $generalEdit = $rowGetAccess["general_edit"]; $generalDelete = $rowGetAccess["general_delete"]; $userView = $rowGetAccess["user_view"]; $userAdd = $rowGetAccess["user_add"]; $userEdit = $rowGetAccess["user_edit"]; $userDelete = $rowGetAccess["user_delete"]; } } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Endive Media | Invoice</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" /> <meta content="Coderthemes" name="author" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Font Awsome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- App favicon --> <link rel="shortcut icon" href="assets/images/favicon.png"> <!-- Pie Chart Css --> <link href="assets/pie charts/style.css" rel="stylesheet" type="text/css" /> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/metismenu.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/style.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.js"></script> <link href="plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css"> <link href="plugins/jquery-toastr/jquery.toast.min.css" rel="stylesheet" /> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> </head> <body> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include 'top-header.php'; ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include 'left-sidebar.php'; ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="page-title-box"> <h4 class="page-title float-left">Invoice Report</h4> <ol class="breadcrumb float-right"> <li class="breadcrumb-item"><a href="#">Finance Manager</a></li> <li class="breadcrumb-item active">Invoice Report</li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row "> <div class="col-md-12 card-box" style=" margin: 0 auto;padding: 20px;"> <form action="insert-user-permission.php" method="post" role="form"> <input type="hidden" name="userid" value="<?php echo $id; ?>"> <h5>Contact Manager</h5> <div class="row"> <div class="col-md-3"> <div class="checkbox checkbox-info form-check-inline"> <input type="checkbox" id="contactView" name="contactView" value="on" <?php if($contactView == "on"){echo "checked"; } ?>> <label for="contactView">View </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-success form-check-inline"> <input type="checkbox" id="contactAdd" name="contactAdd" value="on" <?php if($contactAdd == "on"){echo "checked"; } ?>> <label for="contactAdd"> Add </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-warning form-check-inline"> <input type="checkbox" id="contactEdit" name="contactEdit" value="on" <?php if($contactEdit == "on"){echo "checked"; } ?>> <label for="contactEdit"> Edit </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-danger form-check-inline"> <input type="checkbox" id="contactDelete" name="contactDelete" value="on" <?php if($contactDelete == "on"){echo "checked"; } ?>> <label for="contactDelete"> Delete </label> </div> </div> </div> <h5>Inventory Manager</h5> <div class="row"> <div class="col-md-3"> <div class="checkbox checkbox-info form-check-inline"> <input type="checkbox" id="inventoryView" name="inventoryView" value="on" <?php if($inventoryView == "on"){echo "checked"; } ?>> <label for="inventoryView">View </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-success form-check-inline"> <input type="checkbox" id="inventoryAdd" name="inventoryAdd" value="on" <?php if($inventoryAdd == "on"){echo "checked"; } ?>> <label for="inventoryAdd"> Add </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-warning form-check-inline"> <input type="checkbox" id="inventoryEdit" name="inventoryEdit" value="on" <?php if($inventoryEdit == "on"){echo "checked"; } ?>> <label for="inventoryEdit"> Edit </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-danger form-check-inline"> <input type="checkbox" id="inventoryDelete" name="inventoryDelete" value="on" <?php if($inventoryDelete == "on"){echo "checked"; } ?>> <label for="inventoryDelete"> Delete </label> </div> </div> </div> <h5>Finance Manager</h5> <div class="row"> <div class="col-md-3"> <div class="checkbox checkbox-info form-check-inline"> <input type="checkbox" id="financeView" name="financeView" value="on" <?php if($financeView == "on"){echo "checked"; } ?>> <label for="financeView">View </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-success form-check-inline"> <input type="checkbox" id="financeAdd" name="financeAdd" value="on" <?php if($financeAdd == "on"){echo "checked"; } ?>> <label for="financeAdd"> Add </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-warning form-check-inline"> <input type="checkbox" id="financeEdit" name="financeEdit" value="on" <?php if($financeEdit == "on"){echo "checked"; } ?>> <label for="financeEdit"> Edit </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-danger form-check-inline"> <input type="checkbox" id="financeDelete" name="financeDelete" value="on" <?php if($financeDelete == "on"){echo "checked"; } ?>> <label for="financeDelete"> Delete </label> </div> </div> </div> <h5>General Setting</h5> <div class="row"> <div class="col-md-3"> <div class="checkbox checkbox-info form-check-inline"> <input type="checkbox" id="generalView" name="generalView" value="on" <?php if($generalView == "on"){echo "checked"; } ?>> <label for="generalView">View </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-success form-check-inline"> <input type="checkbox" id="generalAdd" name="generalAdd" value="on" <?php if($generalAdd == "on"){echo "checked"; } ?>> <label for="generalAdd"> Add </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-warning form-check-inline"> <input type="checkbox" id="generalEdit" name="generalEdit" value="on" <?php if($generalEdit == "on"){echo "checked"; } ?>> <label for="generalEdit"> Edit </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-danger form-check-inline"> <input type="checkbox" id="generalDelete" name="generalDelete" value="on" <?php if($generalDelete == "on"){echo "checked"; } ?>> <label for="generalDelete"> Delete </label> </div> </div> </div> <h5>User Manager</h5> <div class="row"> <div class="col-md-3"> <div class="checkbox checkbox-info form-check-inline"> <input type="checkbox" id="userView" name="userView" value="on" <?php if($userView == "on"){echo "checked"; } ?>> <label for="userView">View </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-success form-check-inline"> <input type="checkbox" id="userAdd" name="userAdd" value="on" <?php if($userAdd == "on"){echo "checked"; } ?>> <label for="userAdd"> Add </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-warning form-check-inline"> <input type="checkbox" id="userEdit" name="userEdit" value="on" <?php if($userEdit == "on"){echo "checked"; } ?>> <label for="userEdit"> Edit </label> </div> </div> <div class="col-md-3"> <div class="checkbox checkbox-danger form-check-inline"> <input type="checkbox" id="userDelete" name="userDelete" value="on" <?php if($userDelete == "on"){echo "checked"; } ?>> <label for="userDelete"> Delete </label> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label for="exampleInputPassword1"> </label> <button type="submit" name="btnSave" class="btn btn-purple waves-effect waves-light" >Save</button> </div> </div> </div> </form> </div> <!-- end col --> </div> </div> <!-- container --> </div> <!-- content --> <?php include 'copyrignt.php' ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <!-- Chart Js --> <script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.js'></script> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/popper.min.js"></script><!-- Popper for Bootstrap --> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/metisMenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <!-- Dashboard init --> <script src="assets/pages/jquery.dashboard.js"></script> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <!-- Chart Js --> <!-- <script src="assets/pie charts/script.js"></script> --> <script src="plugins/sweet-alert2/sweetalert2.min.js"></script> <script src="plugins/jquery-toastr/jquery.toast.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ if (localStorage.getItem("TaxSaved") == "true") { successMessage("Tax Successfully Updated."); localStorage.setItem("TaxSaved", "false"); } }); function errorToast(msg){ $.toast({ heading: 'Error!', text: msg, position: 'top-right', loaderBg: '#bf441d', icon: 'error', hideAfter: 3000, stack: 1 }); } function successMessage(msg){ swal({ title: 'Success!', text: msg, type: 'success', confirmButtonColor: '#4fa7f3' }); } function errorMessage(msg){ swal({ title: 'Error!', text: msg, type: 'error', confirmButtonColor: '#4fa7f3' }); } $(document).ready(function() { $("#fromdate,#todate").datepicker({ dateFormat: 'dd MM yy' }); }); $(document).ready(function(){ $("#fromdate").datepicker("setDate", new Date()); $("#todate").datepicker("setDate", new Date()); }); </script> </body> </html>