File manager - Edit - /home/wwwroot/camplus.hk/master.camplus.hk/public_html/application/modules/attendance/views/my_at_report.php
Back
<!-- BEGIN DATATABLE SCRIPTS --> <link href="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.css" rel="stylesheet" > <script src="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.js"></script> <script src="<?php echo base_url(); ?>assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js"></script> <script src="<?php echo base_url(); ?>assets/custom/js/camplus-datatable.js"></script> <!-- END DATATABLE SCRIPTS --> <!-- BEGIN DATERANGE SCRIPTS --> <script src="<?php echo base_url(); ?>assets/global/plugins/moment.min.js"></script> <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" > <script src="<?php echo base_url(); ?>assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.js"></script> <!-- END DATERANGE SCRIPTS --> <div class="portlet light bordered"> <div class="portlet-title"> <div class="caption"> <i class="icon-doc font-dark"></i> <span class="bold"><?php echo $pagetitle; ?></span> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="form-group" style="width: 20%;float: left;"> <input type="text" class="form-control" name="daterange" id="daterange" onkeyup="" placeholder="Search by name" title="Enter User Name"> </div> <div class="form-group" style="width: 20%;float: left;margin-left: 19px;"> <select id="status" class="form-control" onchange="filterByStatus()" > <option value="" > Filter by status</option> <option value="NORMAL" > Normal</option> <option value="EARLY" > Early</option> <option value="LATE" > Late</option> <option value="ABSENT" > Absent</option> <option value="" > All</option> </select> </div> </div> </div> <div id="datepaginator"> </div> <form action='POST' target='attendance/attendance/confirmAttendance'> <table class="table table-striped table-bordered table-hover attendancereport" id="data_table"> <thead> <tr> <th>#</th> <th><?php echo $this->lang->line('date'); ?></th> <th><?php echo $this->lang->line('in_time'); ?></th> <th><?php echo $this->lang->line('check_in'); ?></th> <th><?php echo $this->lang->line('status'); ?></th> <th><?php echo $this->lang->line('remark'); ?></th> <th><?php echo $this->lang->line('out_time'); ?></th> <th><?php echo $this->lang->line('check_out'); ?></th> <th><?php echo $this->lang->line('status'); ?></th> <th><?php echo $this->lang->line('remark'); ?></th> <th><?php echo $this->lang->line('overtime'); ?></th> </tr> <?php foreach ($report as $key => $date) {?> <tr> <td><?php echo $key+1;?></td> <td><?php echo $date['date'];?></td> <td><?php echo $date['in_time'];?></td> <td><?php echo $date['check_in'];?></td> <td><?php echo $date['in_status'];?></td> <td style="max-width: 150px; word-wrap: break-word;"><?php echo $date['in_remarks'];?></td> <td><?php echo $date['out_time'];?></td> <td><?php echo $date['check_out'];?></td> <td><?php echo $date['out_status'];?></td> <td style="max-width: 150px; word-wrap: break-word;"><?php echo $date['out_remarks'];?></td> <td><?php echo $date['overtime'];?></td> </tr> <?php }?> </thead> <tbody> </tbody> </table> </form> </div> </div> <script> $(document).ready(function(){ var startDate; var endDate; var options = { selectedDateFormat: 'YYYY-MM-DD', size: 'small' } $('input[name="daterange"]').daterangepicker({ dateLimit: { days: 60 }, buttonClasses: ['btn btn-default'], applyClass: 'btn-small btn-primary', cancelClass: 'btn-small', format: 'YYYY-MM-DD', separator: ' to ', locale: { applyLabel: 'Submit', fromLabel: 'From', toLabel: 'To', customRangeLabel: 'Custom Range', daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], firstDay: 1 } }, function(start, end) { console.log("Callback has been called!" + start.format('YYYY-MM-DD') + end.format('YYYY-MM-DD')); location.href = "<?php echo base_url() . '/attendance/getMyAttendanceReport/'; ?>" + start.format('YYYY-MM-DD') + '/' + end.format('YYYY-MM-DD') //$('#reportrange span').html(start.format('D MMMM YYYY') + ' - ' + end.format('D MMMM YYYY')); }); }); </script> <script> function filterByStatus() { $("#username").val(""); var input, filter, table, tr, td1, td2, i,j,clomun,selected1,selected2,found; input = document.getElementById("status"); filter = input.value.toUpperCase(); table = document.getElementById("data_table"); tr = table.getElementsByTagName("tr"); console.log(tr); for (i = 1; i < tr.length; i++) { console.log(i) td1 = tr[i].getElementsByTagName("td")[4]; td2 = tr[i].getElementsByTagName("td")[8]; selected1 = $(td1).find('select').first().val() selected2 = $(td2).find('select').first().val() if(selected1==undefined) found = td1.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 else found = selected1.toUpperCase().indexOf(filter) > -1 || selected2.toUpperCase().indexOf(filter) > -1 if (found) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } </script>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.54 |
proxy
|
phpinfo
|
Settings