?
Current Path : /home1/savoy/public_html/savoyglobal.net/eduplus2/application/views/hr/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/eduplus2/application/views/hr/add_employee_attendance.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); //$this->load->view('documentreadyfunctions'); ?> <script src="<?= base_url() ?>assets/scripts/jquery.autocomplete.js"></script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Creating New Attendance</div> <div class="tools"> <a href="#" onclick="viewdata('hr','viewinhrsearch','search_employee_attendence','view_employee_attendence','<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('hr/addinhr/insert_employee_attendence/view_employee_attendence/1', $attributes); ?> <h3 class="form-section">Employee Attendence</h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Attendance Date</label> <div class="controls"> <input name="employee_attendance_date" value="" id="employee_attendance_date" type="text" class="required calfocus" /> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Remarks </label> <div class="controls"> <textarea name="employee_attendance_remarks" id="employee_attendance_remarks" type="text"></textarea> </div> </div> </div> </div> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i> Employee Attendance Details</div> </div> <div class="portlet-body"> <table class="table table-striped table-hover table-bordered" id="stud_sub"> <thead id="stud_sub_head"> <tr> <td style="text-align: center;" >Employee Name</td> <td style="text-align: center;" >Attendance Status</td> <td style="text-align: center;">Time In</td> <td style="text-align: center;">Time Out</td> <td style="text-align: center;">Remarks</td> </tr> </thead> <tbody> <?php $employee = $this->hrmodel->search_employee(); $i = 1; foreach ($employee['results']->result_array() as $row) { ?> <tr> <td> <?= $row['employee_name']; ?><input type="hidden" value="<?= $row['employee_id']; ?>" name="employee_id<?= $i ?>"> </td> <td> <select name="employee_attendance_status<?= $i ?>" class="required chosen" > <option value="">--Select--</option> <option value="P">Present</option> <option value="L">Leave</option> <option value="A">Absent</option> </select> </td> <td> <?php echo createHours('start_time_hour'.$i, date("H")); ?> <?php echo createMinutes('start_time_minute'.$i, date("i")); ?> </td> <td> <?php echo createHours('end_time_hour'.$i, date("H")); ?> <?php echo createMinutes('end_time_minute'.$i, date("i")); ?> </td> <td> <textarea name="employee_attendance_details_remarks<?= $i ?>" id="employee_attendance_details_remarks" type="text"></textarea> </td> </tr> <?php $i++; } ?> </tbody> </table> </div> </div> <div class="form-actions"> <input type="hidden" name="tab_name" value="employee_attendence"/> <input type="hidden" name="resfunction" value="search_employee_attendence"/> <button type="submit" onclick="addformdata('validateform')" class="btn blue"><i class="icon-ok"></i> Save</button> <button type="button" onclick="viewdata('hr','viewinhrsearch','search_employee_attendence','view_employee_attendence','<?= $_SESSION['pagenum']; ?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div> <script defer type="text/javascript"> $(document).ready(function() { $('.calfocus').datepick( { dateFormat: 'dd-mm-yyyy', onSelect: function(dateText){ var date = $.datepicker.formatDate( "yy-mm-dd", new Date(dateText)); var $this = $(this); $.ajax({ type: "POST", data : {'date' : date}, url: "<?= site_url('hr/datecheck/') ?>/", success: function(data){ if(data == 1) { alert('attendance already added! \n\r please select diffrent Date'); $this.val(""); } } }); } }); }); </script>