-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,791 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>AdminLTE 3 | DataTables</title> | ||
|
||
<!-- Google Font: Source Sans Pro --> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> | ||
<!-- Font Awesome --> | ||
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css"> | ||
<!-- DataTables --> | ||
<link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css"> | ||
<link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css"> | ||
<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css"> | ||
<!-- Theme style --> | ||
<link rel="stylesheet" href="../dist/css/adminlte.min.css"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.css" integrity="sha512-f8gN/IhfI+0E9Fc/LKtjVq4ywfhYAVeMGKsECzDUHcFJ5teVwvKTqizm+5a84FINhfrgdvjX8hEJbem2io1iTA==" crossorigin="anonymous" /> | ||
|
||
</head> | ||
<body class="hold-transition sidebar-mini"> | ||
<div class="wrapper"> | ||
<!-- Navbar --> | ||
<nav class="main-header navbar navbar-expand navbar-white navbar-light"> | ||
<!-- Left navbar links --> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item"> | ||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a> | ||
</li> | ||
<li class="nav-item d-none d-sm-inline-block"> | ||
<a href="../../index3.html" class="nav-link">Home</a> | ||
</li> | ||
<li class="nav-item d-none d-sm-inline-block"> | ||
<a href="#" class="nav-link">Contact</a> | ||
</li> | ||
</ul> | ||
|
||
<!-- SEARCH FORM --> | ||
<form class="form-inline ml-3"> | ||
<div class="input-group input-group-sm"> | ||
<input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-navbar" type="submit"> | ||
<i class="fas fa-search"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
<!-- Right navbar links --> | ||
<ul class="navbar-nav ml-auto"> | ||
<!-- Messages Dropdown Menu --> | ||
<!-- Notifications Dropdown Menu --> | ||
<li class="nav-item"> | ||
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button"> | ||
<i class="fas fa-power-off"></i> | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<!-- /.navbar --> | ||
|
||
<!-- Main Sidebar Container --> | ||
<?php include 'aside.php';?> | ||
|
||
<!-- Content Wrapper. Contains page content --> | ||
<div class="content-wrapper"> | ||
<!-- Content Header (Page header) --> | ||
<section class="content-header"> | ||
<div class="container-fluid"> | ||
<div class="row mb-2"> | ||
<div class="col-sm-6"> | ||
<h1>DataTables</h1> | ||
</div> | ||
<div class="col-sm-6"> | ||
<ol class="breadcrumb float-sm-right"> | ||
<li class="breadcrumb-item"><a href="#">Home</a></li> | ||
<li class="breadcrumb-item active">DataTables</li> | ||
</ol> | ||
</div> | ||
</div> | ||
</div><!-- /.container-fluid --> | ||
</section> | ||
|
||
<!-- Main content --> | ||
<section class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-12"> | ||
|
||
|
||
<div class="card w-75 mx-auto"> | ||
<div class="card-header"> | ||
<h3 class="card-title">DataTable with default features</h3> | ||
</div> | ||
<!-- /.card-header --> | ||
<div class="card-body "> | ||
<table id="example" class="table table-bordered table-striped "> | ||
<thead> | ||
<tr> | ||
<th>รหัสสมาชิก</th> | ||
<th>ชื่อ</th> | ||
<th>เข้าร่วมเมื่อ</th> | ||
<th>ระงับการใช้งาน</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th>Rendering engine</th> | ||
<th>Browser</th> | ||
<th>Platform(s)</th> | ||
<th>Engine version</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
<!-- /.card-body --> | ||
</div> | ||
<!-- /.card --> | ||
</div> | ||
<!-- /.col --> | ||
</div> | ||
<!-- /.row --> | ||
</div> | ||
<!-- /.container-fluid --> | ||
</section> | ||
<!-- /.content --> | ||
</div> | ||
<!-- /.content-wrapper --> | ||
<footer class="main-footer"> | ||
<div class="float-right d-none d-sm-block"> | ||
<b>Version</b> 3.1.0-rc | ||
</div> | ||
<strong>Copyright © 2014-2020 <a href="https://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved. | ||
</footer> | ||
|
||
<!-- Control Sidebar --> | ||
<aside class="control-sidebar control-sidebar-dark"> | ||
<!-- Control sidebar content goes here --> | ||
</aside> | ||
<!-- /.control-sidebar --> | ||
</div> | ||
<!-- ./wrapper --> | ||
|
||
<!-- jQuery --> | ||
<script src="../plugins/jquery/jquery.min.js"></script> | ||
<!-- Bootstrap 4 --> | ||
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script> | ||
<!-- DataTables & Plugins --> | ||
<script src="../plugins/datatables/jquery.dataTables.min.js"></script> | ||
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script> | ||
<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script> | ||
<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script> | ||
<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script> | ||
<script src="../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script> | ||
<script src="../plugins/jszip/jszip.min.js"></script> | ||
<script src="../plugins/pdfmake/pdfmake.min.js"></script> | ||
<script src="../plugins/pdfmake/vfs_fonts.js"></script> | ||
<script src="../plugins/datatables-buttons/js/buttons.html5.min.js"></script> | ||
<script src="../plugins/datatables-buttons/js/buttons.print.min.js"></script> | ||
<script src="../plugins/datatables-buttons/js/buttons.colVis.min.js"></script> | ||
|
||
|
||
<!-- AdminLTE App --> | ||
<script src="../dist/js/adminlte.min.js"></script> | ||
<!-- AdminLTE for demo purposes --> | ||
<script src="../dist/js/demo.js"></script> | ||
<!-- Page specific script --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.min.js" integrity="sha512-MqEDqB7me8klOYxXXQlB4LaNf9V9S0+sG1i8LtPOYmHqICuEZ9ZLbyV3qIfADg2UJcLyCm4fawNiFvnYbcBJ1w==" crossorigin="anonymous"></script> | ||
<script> | ||
$(document).ready(function() { | ||
console.log("ddd"); | ||
var table = $('#example').DataTable( { | ||
"processing": true, | ||
"serverSide": true, | ||
"responsive": true, | ||
"ajax": "asstes/server_side/scripts/server_processing.php", | ||
"columnDefs": [ { | ||
"targets": -1, | ||
"data": null, | ||
"defaultContent": "<button type='button' class='btn btn-primary'>Click!</button>" | ||
} ] | ||
// C:\xampp\htdocs\siamfan\backend\siamfan\asstes\server_side\scripts\server_processing.php | ||
} ); | ||
|
||
|
||
$('#example tbody').on( 'click', 'button', function () { | ||
var data = table.row( $(this).parents('tr') ).data(); | ||
let id = data[0]; | ||
let name = data[1]; | ||
swal({ | ||
title: "", | ||
text: "ต้องการระงับการใช้งานคุณ"+name+"ใช่หรือไม่", | ||
type: "info", | ||
showCancelButton: true, | ||
closeOnConfirm: false, | ||
showLoaderOnConfirm: true | ||
}, | ||
function () { | ||
setTimeout(function () { | ||
data={id,action:"baned_user"} | ||
$.ajax({ | ||
type: "POST", | ||
url: "command/backendAPI.php", | ||
data: data, | ||
dataType: 'json', | ||
cache: false, | ||
success: function (result) { | ||
console.log(result); | ||
if (result.status) { | ||
swal("บันทึกสำเร็จ", "", "success"); | ||
} | ||
} | ||
}, 500); | ||
}); | ||
} | ||
); | ||
} ); | ||
|
||
|
||
|
||
|
||
|
||
|
||
// $('#example').DataTable( { | ||
// "padding":true, | ||
// "processing":true, | ||
// "serverSide":true, | ||
// "order":[], | ||
// "info":true, | ||
// "ajax":{ | ||
// url:"command/backendAPI.php", | ||
// type:"POST" | ||
// }, | ||
// "columnDefs":[ | ||
// { | ||
// "target":[0,3,4], | ||
// "orderable":false, | ||
// }, | ||
// ], | ||
// }); | ||
} ); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<aside class="main-sidebar sidebar-dark-primary elevation-4"> | ||
<!-- Brand Logo --> | ||
<a href="index3.html" class="brand-link"> | ||
<img src="../dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8"> | ||
<span class="brand-text font-weight-light">Backend Siam fan</span> | ||
</a> | ||
<!-- Sidebar --> | ||
<div class="sidebar"> | ||
<!-- Sidebar user panel (optional) --> | ||
<div class="user-panel mt-3 pb-3 mb-3 d-flex"> | ||
<div class="image"> | ||
<img src="../dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image"> | ||
</div> | ||
<div class="info"> | ||
<a href="#" class="d-block">Alexander Pierce</a> | ||
</div> | ||
</div> | ||
<!-- SidebarSearch Form --> | ||
<div class="form-inline"> | ||
<div class="input-group" data-widget="sidebar-search"> | ||
<input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-sidebar"> | ||
<i class="fas fa-search fa-fw"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Sidebar Menu --> | ||
<nav class="mt-2"> | ||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> | ||
<!-- Add icons to the links using the .nav-icon class | ||
with font-awesome or any other icon font library --> | ||
<li class="nav-item"> | ||
<a href="alluser.php" class="nav-link"> | ||
<i class="far fa-circle nav-icon"></i> | ||
<p>สมาชิกทั้งหมด</p> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="report.php" class="nav-link"> | ||
<i class="far fa-circle nav-icon"></i> | ||
<p>สมาชิกที่ถูกรายงาน</p> | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<!-- /.sidebar-menu --> | ||
</div> | ||
<!-- /.sidebar --> | ||
</aside> |
Oops, something went wrong.