?
Current Path : /home1/savoy/public_html/savoyglobal.net/hr/application/views/Payroll/ |
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/Payroll/add_payroll_generation.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script type="text/javascript"> function check_month_year() { var month = $('#payroll_generation_month').val(); var year = $('#payroll_generation_year').val(); $.ajax({ type: "POST", url: "<?= site_url('payroll/check_month_year/') ?>/"+month+"/"+year, async: false, success: function(msg){ if(msg==1) { alert("Payroll entered for this month"); // $('#payroll_generation_month').focus(); // $('#payroll_generation_month').css('border','solid 1px red'); return false; } else { addformdata('validateform'); } } }) } </script> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('payroll','viewinpayrollsearch','search_payroll_generation','view_payroll_generation','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">New payroll generation</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('payroll/addinpayroll/insert_payroll_generation/view_payroll_generation/1',$attributes);?> <ul> <li> <label for="data">Subject</label> <?php $data = array( 'name' => 'payroll_generation_subject', 'id' => 'payroll_generation_subject', 'class' =>'required' ); echo form_input($data).form_error($data); ?> </li> <li> <div id="multi"> <label for="data">Payroll Date</label> <?php $data = array( 'name' => 'payroll_generation_date', 'id' => 'payroll_generation_date', 'class' => 'required', 'value' => date("d-m-Y") ); echo form_input($data).form_error($data); ?> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </li> <li> <label for="data">Month & Year</label> <?php // lowest year wanted $cutoff = 2004; // current year $now = date('Y'); // build months menu echo '<select name="payroll_generation_month" id="payroll_generation_month" class="required">' ; $date_array = array('January','February','March','April','May','June','July','August','September','October','November','December'); foreach($date_array as $dates) { echo ' <option value="' . $dates . '"';if(date("F")==$dates){echo "selected";} echo '>' . $dates . '</option>' ; } echo '</select> ' ; // build years menu echo '<select name="payroll_generation_year" id="payroll_generation_year" class="required">' ; for ($y=$now; $y>=$cutoff; $y--) { echo ' <option value="' . $y . '">' . $y . '</option>' ; } echo '</select>' ; ?> </li> <li> <label for="data">Remarks</label> <?php $data = array( 'name' => 'payroll_generation_remarks', 'id' => 'payroll_generation_remarks', ); echo form_textarea($data).form_error($data); ?> </li> <li> <input type="hidden" name="tab_name" value="payroll_generation"/> <input type="hidden" name="resfunction" value="search_payroll_generation"/> <label for="submit"> </label> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform');">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>