ok
Direktori : /home2/selectio/public_html/vijay-gases/ |
Current File : /home2/selectio/public_html/vijay-gases/users.php |
<?php include "header.php";?> <div class="content-wrapper"> <!--<section class="content-header"> <h1>Users List</h1> <ol class="breadcrumb"> <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active"> Users List</li> </ol> </section>--> <div class="col-lg-12 alerts"> <div id="custom-alerts" style="display:none;"> <div class="alert alert-dismissable"> <div class="custom-msg"></div> </div> </div> <?php if ($error) { ?> <div class="alert alert-danger alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-ban"></i> Error</h4> <?= $error; ?> </div> <?php } if ($warning) { ?> <div class="alert alert-warning alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-warning"></i> Warning</h4> <?= $warning; ?> </div> <?php } if ($message) { ?> <div class="alert alert-success alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4> <i class="icon fa fa-check"></i> Success</h4> <?= $site_name; ?> </div> <?php } ?> </div> <div class="clearfix"></div> <script type="text/javascript"> $(document).ready(function() { emp_data(); function emp_data(){ var search_table =$('#search_table').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/users-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); } $('#search_table').keyup(function() { var search_table =$('#search_table').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/users-data-table.php', data:{search:search_table}, type: 'POST'}, bDestroy: true, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); document.getElementById("search_table").focus(); }); }); function delete_users(id){ var result = confirm("Confirm Want to Delete This User?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'user_delete',delete_id:id}, success: function(response) { console.log(response); emp_datas(); } }); } } function emp_datas(){ var search_table =$('#search_table').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/users-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); } </script> <section class="content"> <?php if($_SESSION['vijay_gases']['id']=="1"){ ?> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <a href="users-add.php" class="btn btn-success btn-sm pull-right"><i class="fa fa-plus-circle"></i> Add New Users</a> <h3 class="box-title">Users List</h3> </div> <div class="box-body"> <div class="clearfix"></div> <div class="table-responsive"> <table id="StData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;"> <thead> <tr> <td colspan="10" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="Search Here" style="width:100%;background-color: darkblue;color: white;"></td> </tr> <tr class="active"> <th style="width:100px;">Actions</th> <th>S.No</th> <th>Name</th> <th>Password</th> <th>Status</th> <th>Date</th> </tr> </thead> <tbody> <tr> <td colspan="10" class="dataTables_empty"><center> Loading Pls Wait Data</center></td> </tr> </tbody> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> <?php }else{ ?> <center>Invlaid Accesss</center> <?php } ?> </section> <?php include "footer.php";?>