?
Current Path : /home1/savoy/public_html/savoyglobal.net/hr/application/views/Exits/ |
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/hr/application/views/Exits/add_leave.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script language="javascript" type="text/javascript"> jQuery(document).ready(function() { suggestValues(); <?php if(isset($employee_name)) { ?> show_employee_leave_info(); <?php } ?> }); function suggestValues() { $("#employee_name").autocomplete("<?= site_url()?>/exits/all_employees", { width: 300, selectFirst: false }); } function show_employee_leave_info() { var employee_name = $('#employee_name').val(); var flag = 0; var iChars = "-"; for (var i = 0; i < employee_name.length; i++) { if (iChars.indexOf(employee_name.charAt(i)) != -1) { flag = 1; } } if(employee_name == "" || flag == 0) { alert("Please select Employee First"); } else { employee_name = encodeURIComponent(employee_name); $.ajax({ type: "POST", url: "<?= site_url('exits/validate_employee_exit/') ?>/"+employee_name, success: function(msg){ if(msg==0) { alert("Employee awaiting exit permit"); } else { $("#leave_info_box").empty().html('<CENTER><img src="<?=base_url()?>assets/images/loading.gif" class="loading"/></CENTER>'); $("#leave_info_box").load("<?=site_url()?>/exits/get_employee_leave_info/employee_info_leave/"+employee_name); } } }); } } function showhide(status) { var divvalue = status.value; if(divvalue == "Approved") $('#alert_div').show(); else $('#alert_div').hide(); } </script> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('exits','viewinexitssearch','search_leave','view_leave','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Insert Employee Leave Details</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open_multipart('exits/addinexits/insert_leave/view_leave/1',$attributes); if(isset($employee_name)) { $employee = urldecode($employee_name); echo "<input type='hidden' name='alert_id' value='$alert_id'/>"; } else $employee = ""; ?> <ul> <li> <label for="data">Employee Name</label> <input type="text" name="employee_name" id="employee_name" class="required" value="<?=$employee;?>"> <input type="button" value="Load Employee Information" onclick="show_employee_leave_info()" style="margin-left: 5px; width: 200px;"/> </li> <li> <div id="leave_info_box"></div> </li> </ul> <?php echo form_close();?> </fieldset>