245 lines
11 KiB
PHP
Executable File
245 lines
11 KiB
PHP
Executable File
<?php
|
||
|
||
$EmpID = '';
|
||
$FirstName= '';
|
||
$LastName = '';
|
||
$DateofBirth = '';
|
||
$ContactNumber = '';
|
||
$EmailId = '';
|
||
$DateofJoining = '';
|
||
$Role = '';
|
||
$Address1 = '';
|
||
$Address2 = '';
|
||
$Place = '';
|
||
$City = '';
|
||
$State = '';
|
||
$Pin = '';
|
||
$DepartmentName = '';
|
||
$User_Comments = '';
|
||
if(!empty($userRecords))
|
||
{
|
||
foreach ($userRecords as $uf)
|
||
{
|
||
$EmpID = $uf->EmpID;
|
||
$FirstName = $uf->FirstName;
|
||
$LastName = $uf->LastName;
|
||
$DateofBirth = $uf->DateofBirth;
|
||
$ContactNumber = $uf->ContactNumber;
|
||
$EmailId = $uf->EmailId;
|
||
$DateofJoining = $uf->DateofJoining;
|
||
$Role = $uf->Role;
|
||
$Address1 = $uf->Address1;
|
||
$Address2 = $uf->Address2;
|
||
$Place = $uf->Place;
|
||
$City = $uf->City;
|
||
$State = $uf->State;
|
||
$Pin = $uf->Pin;
|
||
$DepartmentName = $uf->DepartmentName;
|
||
$User_Comments = $uf->User_Comments;
|
||
}
|
||
}
|
||
|
||
|
||
?>
|
||
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
<center>Siddharth Industries - Edit Employee details</center>
|
||
|
||
|
||
</h1>
|
||
|
||
</section>
|
||
|
||
<section class="content">
|
||
<div style="text-align:right;">
|
||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-primary" value="Back"/>Back</a>
|
||
</div>
|
||
<br/>
|
||
<div class="row">
|
||
<!-- left column -->
|
||
<div class="col-md-12">
|
||
<!-- general form elements -->
|
||
|
||
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header">
|
||
<center> <h3 class="box-title">Edit Employee Details</h3></center>
|
||
</div><!-- /.box-header -->
|
||
<!-- form start -->
|
||
|
||
<form role="form" action="<?php echo base_url() ?>Employeedetails/editemployee" method="post" id="editemployee" role="form">
|
||
<div class="box-body">
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="FirstName">First Name</label>
|
||
<input type="text" class="form-control required" id="FirstName" name="FirstName" maxlength="128"value="<?php echo $FirstName;?>">
|
||
<input type="hidden" class="form-control" id="EmpID" name="EmpID" value="<?php echo $EmpID;?>">
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="LastName">Last Name</label>
|
||
<input type="text" class="form-control required " id="LastName" name="LastName" maxlength="255"value="<?php echo $LastName;?>">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="DateofBirth">Date of Birth</label>
|
||
<input type="Date" name="DateofBirth" class="form-control"value="<?php echo $DateofBirth;?>" >
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="ContactNumber">Contact Number</label>
|
||
<input type="text" class="form-control digit required " id="ContactNumber" name="ContactNumber" maxlength="255" value="<?php echo $ContactNumber;?>">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="EmailId">Email ID</label>
|
||
<input type="email" class="form-control email required " id="EmailId" name="EmailId" maxlength="255" value="<?php echo $EmailId;?>">
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="DateofJoining">Date of Joining</label>
|
||
<input type="Date" name="DateofBirth" class="form-control" value="<?php echo $DateofJoining;?>" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="role">Role</label>
|
||
<select class="form-control " id="role" name="role">
|
||
<option value="0">Select Role</option>
|
||
<?php
|
||
if(!empty($roles))
|
||
{
|
||
foreach ($roles as $rl)
|
||
{
|
||
?>
|
||
<option value="<?php echo $rl->role ?>"><?php echo $rl->role ?></option>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="Address1">Address1</label>
|
||
<textarea rows="3" cols="10" wrap="hard" input type="text" class="form-control required" id="Address1" name="Address1" maxlength="250" value="<?php echo $Address1;?>"></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="Address2">Address2</label>
|
||
<textarea rows="3" cols="10" wrap="hard" input type="text" class="form-control required" id="Address2" name="Address2" maxlength="250" value="<?php echo $Address2;?>"></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="Place">Place</label>
|
||
<input type="text" class="form-control required " id="Place" name="Place" maxlength="255" value="<?php echo $Place;?>">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="City">City</label>
|
||
<input type="text" class="form-control required " id="City" name="City" maxlength="255" value="<?php echo $City;?>">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="State">State</label>
|
||
<input type="text" class="form-control required " id="State" name="State" maxlength="255" value="<?php echo $State;?>">
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="Pin">Pin</label>
|
||
<input type="text" class="form-control digit required " id="Pin" name="Pin" maxlength="255" value="<?php echo $Pin;?>">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="DepartmentName">Department Name</label>
|
||
<input type="text" class="form-control required " id="DepartmentName" name="DepartmentName" maxlength="255"value="<?php echo $DepartmentName;?>">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="User_Comments">User Comments</label>
|
||
<input type="text" class="form-control required " id="User_Comments" name="User_Comments" maxlength="255" value="<?php echo $User_Comments;?>">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div><!-- /.box-body -->
|
||
|
||
<div class="box-footer" style="text-align:right">
|
||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||
<input type="reset" class="btn btn-primary" value="Cancel" />
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<?php
|
||
$this->load->helper('form');
|
||
$error = $this->session->flashdata('error');
|
||
if($error)
|
||
{
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = $this->session->flashdata('success');
|
||
if($success)
|
||
{
|
||
?>
|
||
<div class="alert alert-success alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
|
||
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|