| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <?php
- include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_right.php");
- ?>
- <!doctype html>
- <html class="fixed">
- <head>
- <!-- Basic -->
- <meta charset="UTF-8">
- <title>帳號權限管理系統</title>
- <meta name="keywords" content="HTML5 Admin Template" />
- <meta name="description" content="JSOFT Admin - Responsive HTML5 Template">
- <meta name="author" content="JSOFT.net">
- <!-- Mobile Metas -->
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
- <!-- Web Fonts -->
- <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
- <!-- Vendor CSS -->
- <link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.css" />
- <link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css" />
- <link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css" />
- <link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
- <!-- Specific Page Vendor CSS -->
- <link rel="stylesheet" href="assets/vendor/select2/select2.css" />
- <link rel="stylesheet" href="assets/vendor/jquery-datatables-bs3/assets/css/datatables.css" />
- <!-- Theme CSS -->
- <link rel="stylesheet" href="assets/stylesheets/theme.css" />
- <!-- Skin CSS -->
- <link rel="stylesheet" href="assets/stylesheets/skins/default.css" />
- <!-- Theme Custom CSS -->
- <link rel="stylesheet" href="assets/stylesheets/theme-custom.css">
- <!-- Head Libs -->
- <script src="assets/vendor/modernizr/modernizr.js"></script>
- <script src="assets/vendor/jquery/jquery.js"></script>
- <!-- Icon -->
- <link rel="shortcut icon" href="assets/images/favicon.ico" />
- <!-- vue3 -->
- <script src="https://unpkg.com/vue@next"></script>
- <script src="./script/js/global.js"></script>
- <style>
- td{
- font-size:20px;
- color:black;
- }
- select{
- font-size:12px;
- color:black;
- }
- </style>
- <script type="application/javascript">
- var userName = '<?php echo $_SESSION['name']; ?>';
- var pageHeader = '帳號權限管理系統';
- var role = '<?php echo ($groupName); ?>';
- var roles;
- getDeptUser();
- function getDeptUser() {
- $.ajax({
- url: "./script/php/get_data/get_dept_user.php",
- type: "POST",
- dataType: "json"
- }).done(function(result) {
- console.log(result);
- result.forEach(function(data){
- $('#table-data').append(`<tr>
- <td>${data.UserID}</td>
- <td>${data.Account}</td>
- <td>${data.UserName}</td>
- <td>${data.DepartmentID}</td>
- <td>
- <select name="right" id="right">
- <option value="User">一般用戶</option>
- <option value="Editor">上傳人員</option>
- <option value="Dadmin">部門管理員</option>
- </select>
- </td>
- </tr>`);
- });
-
- }).error(function(error) {
- console.log(error);
- });
- }
- function getPageGroup() {
- $.ajax({
- url: "./script/php/get_data/get_page_group.php",
- type: "POST",
- dataType: "json"
- }).done(function(result) {
- for (const [key, value] of Object.entries(result)) {
- object = {};
- object['id'] = 't';
- object['idd'] = 'tt';
- object["title"] = key;
- roles.push(object);
- result[key].forEach(function(item) {
- })
- }
- }).error(function(error) {
- console.log(error);
- });
- }
- </script>
- </head>
- <body>
- <section class="body">
- <!-- start: header -->
- <header-menu></header-menu>
- <!-- end: header -->
- <div class="inner-wrapper">
- <!-- start: sidebar -->
- <side-bar></side-bar>
- <!-- end: sidebar -->
- <section role="main" class="content-body" id="contentBody">
- <header class="page-header">
- <h2>{{pageHeader}}</h2>
- </header>
- <role-block v-for="item in roles" v-bind:tbodyId='item.id' v-bind:title='item.title' v-bind:tableId='item.idd'></role-block>
- <section class="panel">
- <header class="panel-heading">
- <div class="panel-actions">
- <a href="#" class="fa fa-caret-down"></a>
- <a href="#" class="fa fa-times"></a>
- </div>
- <h2 class="panel-title">設計資料庫查詢系統</h2>
- </header>
- <div class="panel-body">
- <table class="table table-bordered table-striped mb-none" id="datatable">
- <thead>
- <tr>
- <th>員工編號</th>
- <th>使用者帳號</th>
- <th>使用者名稱</th>
- <th>所屬部門</th>
- <th>使用者權限</th>
- </tr>
- </thead>
- <tbody id="table-data">
- </tbody>
- </table>
- </div>
- </section>
- </div>
- </section>
- <script>
- vm.mount('.body');
- $(document).ready(function() {
- $('#datatable').dataTable();
- })
- </script>
- <!-- Vendor -->
- <script src="assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
- <script src="assets/vendor/bootstrap/js/bootstrap.js"></script>
- <script src="assets/vendor/nanoscroller/nanoscroller.js"></script>
- <script src="assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
- <script src="assets/vendor/magnific-popup/magnific-popup.js"></script>
- <script src="assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
- <!-- Specific Page Vendor -->
- <script src="assets/vendor/select2/select2.js"></script>
- <script src="assets/vendor/jquery-datatables/media/js/jquery.dataTables.js"></script>
- <script src="assets/vendor/jquery-datatables/extras/TableTools/js/dataTables.tableTools.min.js"></script>
- <script src="assets/vendor/jquery-datatables-bs3/assets/js/datatables.js"></script>
- <!-- Theme Base, Components and Settings -->
- <script src="assets/javascripts/theme.js"></script>
- <!-- Theme Custom -->
- <script src="assets/javascripts/theme.custom.js"></script>
- <!-- Theme Initialization Files -->
- <script src="assets/javascripts/theme.init.js"></script>
- <!-- Examples -->
- <script src="assets/javascripts/tables/examples.datatables.default.js"></script>
- <script src="assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
- <script src="assets/javascripts/tables/examples.datatables.tabletools.js"></script>
- </section>
- </body>
- </html>
|