ok
Direktori : /home2/selectio/www/tnpsctestbatch.com/admin/ |
Current File : /home2/selectio/www/tnpsctestbatch.com/admin/current_affairs-details.php |
<?php include "header.php";?> <div class="content-wrapper" style="background:white;"> <div class="clearfix"></div> <?php $datatable ="var search_table =$('#search_table').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/current-affairs-questions-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true,pageLength: 10, 'buttons': [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'colvis', text: 'Columns'}, ] });"; ?> <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/current-affairs-questions-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true, pageLength: 10, 'buttons': [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'colvis', text: 'Columns'}, ] }); } $('#search_table').keyup(function() { var search_table =$('#search_table').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/current-affairs-questions-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true,pageLength: 10, 'buttons': [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'colvis', text: 'Columns'}, ] }); document.getElementById("search_table").focus(); //table.search(this.value).draw(); }); }); function delete_current_affairs(id){ var result = confirm("Confirm want to hard delete this Question?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'hard_delete',delete_id:id,table_name:'tbl_current_affairs'}, success: function(response) { console.log(response); emp_datas(); } }); } } function dynamic_active(id){ var result = confirm("Confirm want to Active this Question?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'dynamic_active',delete_id:id,table:'tbl_standard'}, 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/current-affairs-questions-data-table.php', data:{search:search_table}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true,pageLength: 10, 'buttons': [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5] } }, { extend: 'colvis', text: 'Columns'}, ] }); } </script> <section class="content"> <div class="row"> <div class="col-xs-12"> <div > <div class="box-header"> <h3 class="box-title" style="margin-left: 40%;"><b><i class="fa fa-list"></i> Current Affairs Questions List</b></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=""> <thead> <tr> <td colspan="6" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="Search Here" style="width:100%;background-color:color: white;"></td> </tr> <tr class="active"> <th>Actions</th> <th>S.No</th> <th>Current Affairs Title</th> <th>Questions</th> <th>Option A</th> <th>Option B</th> <th>Option C</th> <th>Option D</th> <th>Correct Answer</th> <th>Explanation</th> </tr> </thead> <tbody> <tr> <td colspan="6" class="dataTables_empty"><center> Loading Pls Wait Data</center></td> </tr> </tbody> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <?php include "footer.php";?>