?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/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/drafthr/system/application/views/HR/editstaff.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script type="text/javascript"> jQuery(document).ready(function () { // var dob=$('.one').val(); // var datesplit=dob.split('-'); // alert(datesplit[2]); $('.one').datepick({dateFormat: 'dd-mm-yyyy'}); $('.two').datepick({dateFormat: 'dd-mm-yyyy'}); $('.three').datepick({dateFormat: 'dd-mm-yyyy'}); $('.four').datepick({dateFormat: 'dd-mm-yyyy'}); }); </script> <?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ foreach($viewinfo as $updata) { $staffid=$updata['id']; } $stfemp=$this->mastermodel->get_data_srow('staffemployeedetails',$staffid,'staffid'); $stfperm=$this->mastermodel->get_data_srow('staffpermaddress',$staffid,'staffid'); $stfloc=$this->mastermodel->get_data_srow('stafflocaladdress',$staffid,'staffid'); if($stfemp->reportingtostaffid != 0) { $stf=$this->mastermodel->get_data_srow('staffpersonaldetails',$stfemp->reportingtostaffid,'id'); $reportingname = $stf->name; $reportingid = $stf->id; } else { $reportingname =""; $reportingid = ""; } $staffsalaryid=""; $data = $this->hrmodel->get_sal_data('staffsalary',$staffid,date("d-m-Y")); foreach ($data as $dpay) { $staffsalaryid = $dpay['id']; } $stfdes=$this->hrmodel->numcount_data('commissionsettings',$stfemp->designationid,'designationid'); $stflea=$this->hrmodel->numcount_data('leaveallocation',$staffid,'staffid'); $leavalloc=$this->hrmodel->getstfleavallocs('leaveallocation',$staffid,'staffid'); foreach ($leavalloc as $lalloc) { $staffleaveid = $lalloc['id']; } // echo $staffleaveid; ?> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loadstaff('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25" /></label> </div> <img src="<?=base_url()?>assets/images/leav_white.jpg" class = "clickimage" title="Leave" alt="Leave" align = "right" <?php if($stflea != 0){ ?> onclick="editstfleaveallocation(<?=$staffleaveid?>)" <?php } else { ?> onclick="alert('Leave not Set');" <?php } ?> /> <img src="<?=base_url()?>assets/images/com_white.jpg" class = "clickimage" title="Commission" alt="Commission" align = "right" <?php if($stfdes != 0){ ?> onclick="editcomstaff('<?=$staffid?>')" <?php } else { ?> onclick="alert('Commission not Set');" <?php } ?> /> <img src="<?=base_url()?>assets/images/sal_white.jpg" class = "clickimage" title="Salary" alt="Salary" align = "right" <?if ($staffsalaryid != ""){ ?>onclick="editstafsaledit(<?=$staffsalaryid?>)"<?php } else { ?> onclick="alert('Employee Salary not Set');" <?php } ?>/> <img src="<?=base_url()?>assets/images/per_white.jpg" class = "clickimage" title="Personal" alt="Personal" align = "right" onclick="editstaff(1,<?=$staffid?>)" /> <?php $attributes = array('id' => 'customForm'); echo form_open_multipart('hr/editstaff',$attributes); ?> <fieldset> <legend>Update Staff</legend> <?php echo form_hidden('staffid',$staffid); $options = array( 'Male' => 'Male', 'Female' => 'Female', ); $options1 = array( 'Employee' => 'Employee', 'Agent' => 'Agent', ); ?> <fieldset class ="leftone"> <legend>Personal Details</legend> <ul> <li> <?php $data = array( 'name' => 'name', 'id' => 'name', 'value' => $updata['name'], ); ?> <label for="date">Employee Name</label> <?php echo form_input($data).form_error($data); ?><span id="nameInfo" class="red_bold">*</span> </li> <li> <label for="type">Gender</label> <?php echo form_dropdown('gender', $options, $updata['gender']); ?> </li> <li> <label>Date of Birth</label> <input class="one" name="dob" id="dob" readonly="true" type="text" value="<?php echo $this->mastermodel->convdatformat($updata['dob']);?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li> <label for="date">Marital Status</label> <?php echo form_input('maritalstatus',$updata['maritalstatus']); ?> </li> <li> <label for="date">Nationality</label> <?php echo form_input('nationality',$updata['nationality']); ?> </li> <li> <label for="date">ID No.</label> <?php echo form_input('idno',$updata['idno']); ?> </li> <li> <label for="date">Passport No.</label> <?php echo form_input('passportno',$updata['passportno']); ?> </li> <li> <label for="date">Type of Visa</label> <?php echo form_input('typeofvisa',$updata['typeofvisa']); ?> </li> <li> <label>Expiry of of Visa</label> <input class="two" name="expiryofvisa" readonly="true" id="expiryofvisa" type="text" value="<?php echo $this->mastermodel->convdatformat($updata['expiryofvisa']);?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> </ul> </fieldset> <fieldset class="rightone"> <legend>Employee Details</legend> <ul> <li> <label for="type">Type</label> <?php echo form_dropdown('type', $options1, $updata['type']); ?> </li> <?php echo "<li> <label>Designation</label><select name='designation' id='designation'>"; echo "<option value=''>--Select--</option>"; $desg=$this->mastermodel->getdatas('designation'); foreach($desg as $desgn) { echo "<option value='". $desgn['id']."'"; if($stfemp->designationid == $desgn['id']) { echo "selected"; } echo ">". $desgn['designation']. "</option>"; } echo "</select><span id='designationInfo' class='red_bold'>*</span></li>"; ?> <?php echo "<li> <label>Department</label><select name='department' id='department'>"; echo "<option value=''>--Select--</option>"; $dept=$this->mastermodel->getdatas('department'); foreach($dept as $dep) { echo "<option value='". $dep['id']."'"; if($stfemp->deptid ==$dep['id']) { echo "selected"; } echo ">". $dep['departmentname']. "</option>"; } echo "</select><span id='departmentInfo' class='red_bold'>*</span></li>"; ?> <?php echo "<li> <label>Grade</label><select name='grade' id='grade'>"; $grad=$this->mastermodel->getdatas('grade'); foreach($grad as $gra) { echo "<option value='". $gra['id']."'"; if($stfemp->gradeid ==$gra['id']) { echo "selected"; } echo ">". $gra['gradename']. "</option>"; } echo "</select></li>"; ?> <?php echo "<li> <label>Status</label><select name='status' id='status'>"; $stat=$this->mastermodel->getdatas('status'); foreach($stat as $sta) { echo "<option value='". $sta['id']."'"; if($stfemp->statusid ==$sta['id']) { echo "selected"; } echo ">". $sta['statusname'] . "</option>"; } echo "</select></li>"; ?> <li> <label>Joining Date</label> <input class="three" name="joiningdate" id="joiningdate" readonly="true" type="text" value="<?php echo $this->mastermodel->convdatformat($stfemp->joiningdate);?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li> <label for="date">Reporting to</label> <input type="text" id="staffname" size="20" value="<?php echo $reportingname; ?>"> <input type="hidden" name="reportingtostaffid" id="reportingtostaffid" value="<?php echo$reportingid; ?>"> <img id="inliexample1" src="<?=base_url()?>/assets/images/button-search.png" title="Search" class="clickimage" onclick="showstaffdiv()" > </li> <?php echo "<li> <label>Branch</label><select name='branch' id='branch'>"; $stat=$this->mastermodel->getdatas('ourbranch'); foreach($stat as $sta) { echo "<option value='". $sta['id']."'"; if($stfemp->branchid==$sta['id']) { echo "selected"; } echo ">". $sta['branchname'] . "</option>"; } echo "</select></li>"; ?> <li> <label for="date">Labour Card No.</label> <?php echo form_input('labno',$stfemp->labourcardno); ?> </li> <li> <label>Labour Card Expiry</label> <input class="four" name="labexp" id="labexp" readonly="true" type="text" value="<?php echo $this->mastermodel->convdatformat($stfemp->labourcardexpiry);?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li> <label for="date">Employee Device No</label> <?php echo form_input('device_no',$stfemp->device_no); ?> </li> </ul> </fieldset> <fieldset class="lefttwo"> <legend>Permanent Address</legend> <ul> <li> <?php $data1 = array( 'name' => 'emailid', 'id' => 'emailid', 'value' => $stfperm->emailid, ); ?> <label for="date">Email Address</label> <?php echo form_input($data1).form_error($data1); ?> </li> <li> <label for="type">Phone No</label> <?php echo form_input('phone',$stfperm->phone); ?> </li> <li> <label for="date">Mobile</label> <?php echo form_input('mobile',$stfperm->mobile); ?> </li> <li> <label for="date">Address</label> <?php $data2 = array( 'name' => 'address', 'id' => 'address', 'rows' => '5', 'cols' => '5', 'style' => 'width:50%', 'value' => $stfperm->address, ); ?> <?php echo form_textarea($data2); ?><span id="addressInfo" class="red_bold">*</span> </li> <li> <label for="date">Po Box</label> <?php echo form_input('pobox',$stfperm->pobox); ?> </li> <li> <label for="date">Country</label> <?php echo form_input('country',$stfperm->country); ?> </li> <li> <label for="date">City</label> <?php echo form_input('city',$stfperm->city); ?> </li> </ul> </fieldset> <fieldset class="righttwo"> <legend>Local Address</legend> <ul> <li> <label for="type">Phone No</label> <?php echo form_input('lphone',$stfloc->phone); ?> </li> <li> <label for="date">Mobile</label> <?php echo form_input('lmobile',$stfloc->mobile); ?> </li> <li> <label for="date">Address</label> <?php $data3 = array( 'name' => 'laddress', 'id' => 'laddress', 'rows' => '5', 'cols' => '5', 'style' => 'width:50%', 'value' => $stfloc->address, ); ?> <?php echo form_textarea($data3).form_error($data3); ?><span id="laddressInfo" class="red_bold"></span> </li> <li> <label for="date">Po Box</label> <?php echo form_input('lpobox',$stfloc->pobox); ?> </li> <li> <label for="date">Country</label> <?php echo form_input('lcountry',$stfloc->country); ?> </li> <li> <label for="date">City</label> <?php echo form_input('lcity',$stfloc->city); ?> </li> </ul> </fieldset><li></li> <li></li> <li></li> <li></li> <fieldset> <legend>Educational Qualification</legend> <ul> <li> <input name="addRows" value="Add More" onclick="addRowToTableEdu();" title="Add more rows." type="button"> <input name="deleteRows" value="Remove" onclick="removeRowFromTableEdu();" title="Delete the last row." type="button"> </li> <table class="sort" id="addrow" border="0" cellpadding="0" cellspacing="0" width="80%"> <tbody><tr class="red_bold" align="left" valign="top"> <th width="25%">Course</th> <th width="18%">University</th> <th width="18%">Year of Passing</th> </tr> <?php $id=1; foreach ($viewedu as $edu) {?> <tr class="bold_black" align="left" valign="top"> <td><input name="txt_conCourse_<?=$id?>" id="txt_conCourse_<?=$id?>" style="width: 200px;" value="<?=$edu['course']?>" type="text"> <input name="hid_conCntEdu" id="hid_conCntEdu" value="3" type="hidden"></td> <td><input name="txt_conUty_<?=$id?>" id="txt_conUty_<?=$id?>" style="width: 150px;" value="<?=$edu['university']?>" type="text"></td> <td><input name="txt_conYop_<?=$id?>" id="txt_conYop_<?=$id?>" style="width: 100px;" value="<?=$edu['yearofpassing']?>" type="text"></td> </tr> <input name="hided_<?=$id?>" id="hided_<?=$id?>" value="<?=$edu['id']?>" type="hidden"> <?php $id++; } ?> </tbody></table> </ul> </fieldset> <li></li> <fieldset> <legend>Additional Certification</legend> <ul> <li> <input name="addRowsCer" value="Add More" onclick="addRowToTableCer();" title="Add more rows." type="button"> <input name="deleteRowsCer" value="Remove" onclick="removeRowFromTableCer();" title="Delete the last row." type="button"> </li> <table class="sort" id="addrowCer" border="0" cellpadding="0" cellspacing="0" width="80%"> <tbody> <tr class="red_bold" align="left" valign="top"> <th width="25%">Course</th> <th width="18%">Institute</th> <th width="18%">Year of Passing</th> </tr> <?php $id=1; foreach ($viewcert as $cert) {?> <tr class="bold_black" align="left" valign="top"> <td><input name="txt_conCourseCer_<?=$id?>" id="txt_conCourseCer_<?=$id?>" style="width: 200px;" value="<?=$cert['course']?>" type="text"> <input name="hid_conCntCer" id="hid_conCntCer" value="3" type="hidden"></td> <td><input name="txt_conUInstCer_<?=$id?>" id="txt_conInstCer_<?=$id?>" style="width: 150px;" value="<?=$cert['institute']?>" type="text"></td> <td><input name="txt_conYopCer_<?=$id?>" id="txt_conYopCer_<?=$id?>" style="width: 100px;" value="<?=$cert['yearofpassing']?>" type="text"></td> </tr> <input name="hidcer_<?=$id?>" id="hidcer_<?=$id?>" value="<?=$cert['id']?>" type="hidden"> <?php $id++; } ?> </tbody> </table> </ul> </fieldset> <li></li> <fieldset> <legend>Professional Experience</legend> <li> <input name="addRowsExp" value="Add More" onclick="addRowToTableExp();" title="Add more rows." type="button"> <input name="deleteRowsExp" value="Remove" onclick="removeRowFromTableExp();" title="Delete the last row" type="button"> </li> <table class="sort" id="addrowExp" border="0" cellpadding="0" cellspacing="0" width="80%"> <tbody><tr class="red_bold" align="left" valign="top"> <th width="25%">Employer</th> <th width="18%">Designation</th> <th width="18%">Period of Work</th> </tr> <?php $id=1; foreach ($viewprof as $prof) {?> <tr class="bold_black" align="left" valign="top"> <td><input name="txt_conEmp_<?=$id?>" id="txt_conEmp_<?=$id?>" style="width: 200px;" value="<?=$prof['employer']?>" type="text"> <input name="hid_conCntExp" id="hid_conCntExp" value="3" type="hidden"></td> <td><input name="txt_conDesg_<?=$id?>" id="txt_conDesg_<?=$id?>" style="width: 150px;" value="<?=$prof['designation']?>" type="text"></td> <td><input name="txt_conPow_<?=$id?>" id="txt_conPow_<?=$id?>" style="width: 100px;" value="<?=$prof['period']?>" type="text"></td> </tr> <input name="hidprof_<?=$id?>" id="hidprof_<?=$id?>" value="<?=$prof['id']?>" type="hidden"> <?php $id++; } ?> </tbody></table> </fieldset> <li></li> <ul> <li><label for="submit"> </label> <button type="submit" class="clickimage" id="submit" onclick="return doallthetwo();">Update</button> </li></ul> </fieldset> <?php echo form_close();?>