ok

Mini Shell

Direktori : /home2/selectio/public_html/tnpsctestbatch.com/admin/
Upload File :
Current File : /home2/selectio/public_html/tnpsctestbatch.com/admin/blog_details.php

<?php  include "header.php";?>

<style>
    table.dataTable{
        font-size: 14px;
        width: 170% !important;
    }
</style>


<div class="content-wrapper" style="background:white;">
        <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 filter_mock =$('#filter_mock').val();
              //alert(filter_mock);
              
            var table = $('#StData').DataTable({
                    
                    'ajax' : { 
                        url: 'data-tables/blog-data-table.php', 
                        data:{search:search_table,filter_mock:filter_mock}, 
                        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'},
                    ]

                });
        }
        $('#filter_mock').change(function() {
            emp_data();
        });
        $('#search_table').keyup(function() {  
           
            var search_table =$('#search_table').val();
            var table = $('#StData').DataTable({

                    'ajax' : { 
                        url: 'data-tables/blog-data-table.php', 
                        data:{search:search_table}, 
                        type: 'POST'},
                        bDestroy: 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_blog(id){
            var result = confirm("Confirm want to hard delete this Blog?");
            if (result) {
                
                    $.ajax({
                    type: 'POST',
                    url: 'api/delete.php',
                    data: {type:'hard_delete',delete_id:id,table_name:'tbl_blog'},                  
                    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_mock_test'},                  
                    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/blog-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>Blog List</b></h3>
                    <br>
                    
                    <div class="row">
                        
                        <div class="col-md-6">
                            
                    <h3 class="box-title" style="margin-top: 3%;padding-bottom: 1%;">
                        <b><i class="fa fa-list"></i>Filter</b>
                    </h3>
                            <!--<div class="form-group">-->
                            <!--    <select id="filter_mock"  class="form-control tip select2">-->
                            <!--        <option>-- Select Test Type --</option>-->
                            <!--        <option value="0">All</option>-->
                            <!--        <option value="1">Mock Test 1</option>-->
                            <!--        <option value="2">Mock Test 2</option>-->
                            <!--        <option value="3">Mock Test 3</option>-->
                            <!--    </select>-->
                            <!--</div>-->
                        </div>
                        
                        <div class="col-md-6">
                            <?php if($_SESSION['exam_preppers']['id']==1){ ?>         
                                <a  href="add-blog.php" class="btn btn-success btn-sm pull-right" style="background-color: #5948e2;border-color: #5948e2;border-radius: 20px;">
                                    <i class="fa fa-plus-circle"></i> Add Blog
                                </a> 
                            <?php } ?>
                        </div>
                        
                    </div>
                    
                </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="10" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table"  placeholder="Search Here" style="width:100%;background-color: <?=$theme_color?>color: white;"></td>
                                </tr>
                                <tr class="active">
                                    <th style="width:45px;">Actions</th>
                                    <th>S.No</th>
                                    <th style="width: 8%;">Blog Heading</th>
                                    <th style="width: 9% !important;">Tag Line</th>
                                    <th style="width: 30%;">Date</th>
                                   
                                    <th style="width: 30%;">Blog Image</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>
</section>
<?php include "footer.php";?>

Zerion Mini Shell 1.0