ok

Mini Shell

Direktori : /proc/thread-self/root/proc/thread-self/root/home2/selectio/www/obnovit-tracking/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/home2/selectio/www/obnovit-tracking/reports.php

<?php  include "header.php";?>
<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_sites =$('#filter_sites').val();
              var filter_products =$('#filter_products').val();
              var start_date =$('#start_date').val();
              var end_date =$('#end_date').val();
              
              var filter_department =$('#filter_department').val();
              var filter_attendence_type=$('#filter_attendence_type').val();
            
            var table = $('#StData').DataTable({

                    'ajax' : { 
                        url: 'data-tables/reports-data-table.php', 
                        data:{search:search_table,filter_sites:filter_sites,filter_products:filter_products,start_date:start_date,end_date:end_date,filter_department:filter_department,filter_attendence_type:filter_attendence_type}, 
                        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').click(function() {
            emp_data();
        });
        $('#search_table').keyup(function() {  
           
            var search_table =$('#search_table').val();
            var filter_sites =$('#filter_sites').val();
            var filter_products =$('#filter_products').val();
            var start_date =$('#start_date').val();
            var end_date =$('#end_date').val();
            
            var filter_department =$('#filter_department').val();
            var filter_attendence_type=$('#filter_attendence_type').val();
              
            var table = $('#StData').DataTable({

                    'ajax' : { 
                        url: 'data-tables/reports-data-table.php', 
                        data:{search:search_table,filter_sites:filter_sites,filter_products:filter_products,start_date:start_date,end_date:end_date,filter_department:filter_department,filter_attendence_type:filter_attendence_type}, 
                        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_up(id){
            var result = confirm("Confirm want to delete this Follow up \n All Follow up history also deleted?");
            if (result) {
                    $.ajax({
                    type: 'POST',
                    url: 'api/delete.php',
                    data: {type:'dynamic_followup_delete',delete_id:id},                  
                    success: function(response) {
                        console.log(response); 
                        emp_datas();
                    }
                });
            }
    }
    
         function emp_datas(){
             var search_table =$('#search_table').val();
             
             var filter_sites =$('#filter_sites').val();
             var filter_products =$('#filter_products').val();
             var start_date =$('#start_date').val();
             var end_date =$('#end_date').val();
             
             var filter_department =$('#filter_department').val();
             var filter_attendence_type=$('#filter_attendence_type').val();
            
             
            var table = $('#StData').DataTable({

                    'ajax' : { 
                        url: 'data-tables/reports-data-table.php', 
                        data:{search:search_table,filter_sites:filter_sites,filter_products:filter_products,start_date:start_date,end_date:end_date,filter_department:filter_department,filter_attendence_type:filter_attendence_type}, 
                        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">

             <a  href="#" class="btn btn-default btn-sm toggle_form pull-right" style='margin-left: 5px;'>
                <i class="fa fa-filter"></i> Filter Show/Hide</a>
                <?php if($_SESSION['hrm']['id']==1 || $allPermissions['category']['create']=="1"){ ?>         <a  href="attendance-add.php" class="btn btn-success btn-sm pull-right"><i class="fa fa-plus-circle"></i> Create Attendence</a> <?php } ?>
                    <h3 class="box-title"><b><i class="fa fa-list"></i> Reports</b></h3>
                </div>
                <div class="box-body">
<div id="form" class="panel panel-warning">
<div class="panel-body">

<div class="row">
<div class="col-md-3">
    <div class="form-group">
        <label class="required" for="email">Employee Name</label>                                   
        <select name="filter_products" class="form-control select2" style="width:100%" id="filter_products" required>
       <?php if($_SESSION['hrm']['id']==1){?> <option value="">All</option> <?php } ?>
        <?php $statement = $pdo->prepare("SELECT * FROM `tbl_user`");
                $statement->execute();
                $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); 
                foreach ($location_result as $result) {
                    echo "<option value=".$result['id'].">".$result['uname']."</option>";
                }?>
        </select>
    </div>
</div>
<div class="col-md-3">
    <div class="form-group">
        <label class="required" for="email">Project Name</label>                                   
        <select name="filter_sites" class="form-control select2" style="width:100%" id="filter_sites" required>
       <?php if($_SESSION['hrm']['id']==1){?> <option value="">All</option> <?php } ?>
        <?php $statement = $pdo->prepare("SELECT * FROM `tbl_site` where status=1");
                $statement->execute();
                $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); 
                foreach ($location_result as $result) {
                    echo "<option value=".$result['id'].">".$result['site_name']."</option>";
                }?>
        </select>
    </div>
</div>

<div class="col-md-3">
    <div class="form-group">
        <label class="required" for="email">Department Name</label>                                   
        <select name="filter_department" class="form-control select2" style="width:100%" id="filter_department" required>
       <?php if($_SESSION['hrm']['id']==1){?> <option value="">All</option> <?php } ?>
        <?php $statement = $pdo->prepare("SELECT * FROM `tbl_department` where status=1");
                $statement->execute();
                $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); 
                foreach ($location_result as $result) {
                    echo "<option value=".$result['id'].">".$result['name']."</option>";
                }?>
        </select>
    </div>
</div>

<div class="col-md-3">
    <div class="form-group">
        <label class="required" for="email">Attendence Type</label>                                   
        <select name="filter_attendence_type" class="form-control select2" style="width:100%" id="filter_attendence_type" required>
        <option value="">All</option>
        <option value="1">Full Day</option>
        <option value="2">Half a Day</option>
        </select>
    </div>
</div>

<div class="col-sm-3">
<div class="form-group">
<label class="control-label" for="start_date">Attendence Start Date</label>
<input type="text" name="start_date" value=""  class="form-control datetimepicker" id="start_date" />
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label" for="end_date">Attendence End Date</label>
<input type="text" name="end_date" value=""  class="form-control datetimepicker" id="end_date" />
</div>
</div>

<div class="col-sm-2">
    <div class="form-group">
        <label class="control-label" for="end_date">Action</label><br>
    <button id="filter" type="submit" class="btn btn-primary btn-sm"><i class="fa fa-filter"></i> Submit</button>
</div>
</div>
</div>
                       </div>
</div>

<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;font-size: 14px;">
                            <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:100px;">Action</th>-->
                                    <th>S.no</th>
                                    <th>Attendence Date</th>
                                    <th>Employee Name</th>
                                    <th>Project Name</th>
                                    <th>Department Name</th>
                                    <th>Salary Per Day</th>
                                    <th>Attendence Type</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>
<script type="text/javascript">
    $(document).ready(function(){
        /*$('#form').hide();*/
        $('.toggle_form').click(function(){
            $("#form").slideToggle();
            return false;
        });
    });
</script>
<?php include "footer.php";?>

Zerion Mini Shell 1.0