<style type="text/css">
@media print
{
.noprint {display:none;}
}
</style>
<?php $REMOTE=REMOTE;?>
<div class="wrapper">
    <div class="container"> 
       
        <!-- Page-Title -->
        <div class="row">
            <div class="col-sm-12">
                <h4 class="page-title" >Products Categories</h4>
            </div>
        </div> 
        <div class="row">  
            <div class="col-sm-12">
                <div class="card-box table-responsive">
                    
                    <h4 class="header-title m-t-0 m-b-30">&nbsp;</h4> 
                    <table id="datatable-buttons" class="table table-striped table-bordered">
                        <thead>
                            <tr>
                                <th >No </th>
                                <th>Category</th>
                                <th class='noprint'>Action</th>
                            </tr>
                        </thead> 
                            <?php 
                                if(isset($products_category)){ 
                                    $i=1;
                                   foreach($products_category  as $row){ 
                                    ?>
                                    <tr>
                                        <td><?php echo $i++ ?></td>
                                        <td><?php echo $row->category ?></td>
                                        <td>  
                                           
                                                <a type="submit" name='' class="btn waves-effect waves-light btn-sm btn-primary" href="<?php echo base_url();?>start_advertisement/<?php echo $row->category  ?>/0">Start advertisement &nbsp;&nbsp;  <i class="fa fa-play" aria-hidden="true"></i></a> 
                                        </td>
                                    </tr>
                                    <?php 

                                   } 

                                } 
                             ?>

                        <tbody>
                           
                        </tbody>
                    </table>
                </div>
            </div><!-- end col -->
        </div>
        <!-- end row -->
        
        <!--Modals-->
         
     
        <script>
           $(document).ready(function() {    

                $('#datatable-buttons').DataTable({
                    lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
                    stateSave: true,
                    dom: "Bfrtlip",
                    buttons: [{extend: "copy", className: "btn-sm btn-custom btn-trans"}, {extend: "csv", className: "btn-sm btn-pink btn-trans"}, {
                            extend: "excel",
                            className: "btn-sm btn-warning btn-trans"
                        }, {extend: "pdf", className: "btn-sm btn-purple btn-trans"}],
                    responsive: !0
                });
                
                
                 toastr.options = {
                    "closeButton": true,
                    "debug": true,
                    "newestOnTop": true,
                    "progressBar": true,
                    "positionClass": "toast-bottom-center",
                    "preventDuplicates": true,
                    "onclick": null,
                    "showDuration": "300",
                    "hideDuration": "1000",
                    "timeOut": "5000",
                    "extendedTimeOut": "1000",
                    "showEasing": "swing",
                    "hideEasing": "linear",
                    "showMethod": "fadeIn",
                    "hideMethod": "fadeOut"
                }
                
            });

           
           
        

        </script>