diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php
index 0eb35575..9577c3b2 100644
--- a/application/controllers/employeedetails.php
+++ b/application/controllers/employeedetails.php
@@ -1,4 +1,3 @@
-
load->library('form_validation');
-
- $this->form_validation->set_rules('ContactNumber', 'ContactNumber', 'trim|required|min_length[10]|max_length[10]');
- $this->form_validation->set_rules('emailid', 'emailid', 'trim|valid_email');
- $this->form_validation->set_rules('gender', 'gender', 'callback_Gender_validate');
- $this->form_validation->set_rules('MartialStatus', 'MartialStatus', 'callback_Martial_validate');
- $this->form_validation->set_rules('bloodgroup', 'bloodgroup', 'callback_Blood_validate');
- $this->form_validation->set_rules('emergencycontactnumber', 'emergencycontactnumber', 'trim|min_length[10]|max_length[10]');
- $this->form_validation->set_rules('desigination', 'Desigination', 'callback_Des_validate');
- $this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
- $this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
- $this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]');
- $this->form_validation->set_rules('aadharno', 'aadharno', 'trim|min_length[14]|max_length[14]');
- $this->form_validation->set_rules('panno', 'panno', 'trim|min_length[10]|max_length[10]');
- $this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
- $this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
- $this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
- $this->form_validation->set_rules('esino', 'esino', 'trim|min_length[10]|max_length[10]');
-
-
- if($this->form_validation->run() == FALSE)
- {
- $this->addemployee();
- }
- else
- {
-
- $Picture = $this->add();
- $Profile = $this->input->post('photo');
- $FirstName = $this->input->post('FirstName');
- $LastName = $this->input->post('LastName');
- $FatherName = $this->input->post('FatherName');
- $DateofBirth = $this->input->post('DateofBirth');
- $ContactNumber = $this->input->post('ContactNumber');
- $EmailId = $this->input->post('emailid');
- $comEmailId = $this->input->post('comemailid');
- $Gender = $this->input->post('gender');
- $MartialStatus = $this->input->post('MartialStatus');
- $BloodGroup = $this->input->post('bloodgroup');
- $CurrentAddress = $this->input->post('currentaddress');
- $permanentaddress = $this->input->post('permanentaddress');
- $emergencycontactname = $this->input->post('emergencycontactname');
- $emergencycontactnumber = $this->input->post('emergencycontactnumber');
- $desigination = $this->input->post('desigination');
- $departmentCode = $this->input->post('departmentname');
- $dateofjoining = $this->input->post('dateofjoining');
- $pre_experience = $this->input->post('Previousexperience');
-
- if($pre_experience == '')
- {
- $Previousexperience = null;
- }
- else
- {
- $Previousexperience = $pre_experience;
- }
-
- $eduqualifaction = $this->input->post('eduqualifaction');
- $addqualification = $this->input->post('addqualification');
- $referredby = $this->input->post('referredby');
- $referrercontno = $this->input->post('referrercontno');
- $accountno = $this->input->post('accountno');
- $ifsccode = $this->input->post('ifsccode');
- $bankbranchname = $this->input->post('bankbranchname');
- $bankaddress = $this->input->post('bankaddress');
- $aadharno = $this->input->post('aadharno');
- $panno = strtoupper($this->input->post('panno'));
- $passportno = strtoupper($this->input->post('passportno'));
- $ValidTill = $this->input->post('ValidTill');
- $addinfo = $this->input->post('addinfo');
- $IsActive = '1';
- $driverlicense = strtoupper($this->input->post ( 'driverlicense' ));
- $licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
- $VoterID = strtoupper($this->input->post ( 'voterID' ));
- $PFno = $this->input->post('pfno');
- $ESIno = $this->input->post('esino');
- $Nominee = $this->input->post('nomineename');
- $createdby = $this->session->userdata ( 'userId' );
- $count = $this->input->post('hidecounter');
- $constant = $this->input->post('hideconstant');
-
- for($i=1;$i<=$constant;$i++){
- $Ddname = $this->input->post('Ddname');
- $filename = 'browseFiles'.$i;
- $Pi = $this->additional($filename);
- //$idproof[$i] = array($Ddname[$i],$Pi);
- $idproof[$i] = $Ddname[$i]."/".$Pi;
-
- }
-
- foreach ($idproof as $key => $value) {
-
- $exp = explode("/",$value);
- if($exp[0] == 'aadhar'){
-
- if(!empty($value)){
- $aadharfilename = $value ;
- }
- else{
- $aadharfilename = 'NULL';
- }
- }
- elseif($exp[0] == 'pan' ){
- if(!empty($value)){
- $panfilename = $value;
- }
- else{
- $panfilename ='NULL';
- }
- }
- elseif($exp[0] = 'voter'){
- if(!empty($value)){
- $voterfilename = $value;
- }
- else{
- $voterfilename = 'NULL';
- }
- }
-
- }
-
-
- if($licenseExpiryDate != '')
- {
- $License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
- }
- else
- {
- $License_ExpiryDate = null;
- }
-
- $DOB = $this->getDateformat($DateofBirth);
- $DOJ = $this->getDateformat($dateofjoining);
-
- if($ValidTill != '')
- {
- $Valid = $this->getDateformat($ValidTill);
- }
- else
- {
- $Valid = null;
- }
-
- $Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,
- 'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,
- 'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,
- 'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,
- 'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,
- 'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,
- 'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,
- 'Additional_Qualification'=>$addqualification,
- 'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,
- 'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,
- 'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
- 'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
- 'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
- 'LicenseValidtill'=>$License_ExpiryDate,'PFNO'=>$PFno,'ESI'=>$ESIno,
- 'NomineeDetails'=>$Nominee,'AadharNo'=>$aadharfilename,'PANNo'=>$panfilename,'VoterID'=>$voterfilename);
-
- $this->load->model('employeedetails_model');
-
- // print_r($Employee);
- // die();
- $result = $this->employeedetails_model->addNewemployee($Employee);
-
- if($result > 0)
- {
-
- echo "";redirect('employeeListing','refresh');
- }
- else
- {
- $this->session->set_flashdata('Error', 'New Employee details not saved');
- echo "";redirect('employeeListing','refresh');
-
- }
-
- }
- }
/**
* To Convert the dateformat (date with time) and stored into DB
*/
function getDateformat($Val)
{
- $date = new DateTime($Val);
+ $date = new DateTime($Val);
$retDate = $date->format('Y-m-d H:i:s');
return $retDate;
}
- /**
+ /**
* To Convert the dateformat (date only) and stored into DB
*/
function dateformat($DateValue)
@@ -401,43 +209,19 @@ class employeedetails extends BaseController
return $retDate;
}
- /**
- * To load the add new Employee form with dropdown values
- */
- function addemployee()
- {
-
- $this->load->model('employeedetails_model');
- $GenderConfigID = 'C013';
- $MartialConfigID = 'C012';
- $QualificationConfigID = 'C014';
- $DesignationConfigID = 'C010';
- $BloodGroupConfigID = 'C011';
-
- $data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
- $data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
- $data['bankdetails']=$this->employeedetails_model->getBankDetails();
- $data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
- $data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
- $data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
-
- $data['Department'] = $this->employeedetails_model->getDepartment();
- $this->global['pageTitle'] = 'Resico : Add New Employee';
- $this->loadViews("addemployee", $this->global, $data, NULL);
-
- }
-
+
+
/**
* To check whether the Employee mailid is existing in the database or not
*/
function CheckEmail()
- {
+ {
$id = $this->input->post('id');
$this->load->model('employeedetails_model');
$query = $this->employeedetails_model->checkMailExists($id );
$query = $query[0]['EmailId'];
- print_r($query);
- }
+ print_r($query);
+ }
/**
* To check whether PAN already exist or not
@@ -505,54 +289,40 @@ class employeedetails extends BaseController
}
}
-
- /**
- * To load pagenotfound view
- */
- function pageNotFound()
- {
- $this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
- $this->loadViews("404", $this->global, NULL, NULL);
- }
-
/**
* To add employee revalant images(for profile pictures)
*/
function add()
- {
- // echo "add files";
- // die();
- //echo $files;
+ {
$picture = '';
- if(!empty($_FILES['photo']['name']))
+ if(!empty($_FILES['photo']['name']))
{
$config['upload_path'] = 'uploads/images/';
- $config['allowed_types'] = 'jpg|jpeg|png|gif';
- $config['file_name'] = $_FILES['photo']['name'];
+ $config['allowed_types'] = 'jpg|jpeg|png|gif';
+ $config['file_name'] = $_FILES['photo']['name'];
- //Load upload library and initialize configuration
- $this->load->library('upload',$config);
- $this->upload->initialize($config);
- if($this->upload->do_upload('photo'))
- {
- $uploadData = $this->upload->data();
- $picture = $uploadData['file_name'];
+ //Load upload library and initialize configuration
+ $this->load->library('upload',$config);
+ $this->upload->initialize($config);
+ if($this->upload->do_upload('photo'))
+ {
+ $uploadData = $this->upload->data();
+ $picture = $uploadData['file_name'];
+ }
+ else
+ {
+ $error = array('error' => $this->upload->display_errors());
+ $picture = '';
+ }
}
- else
- {
- $error = array('error' => $this->upload->display_errors());
- $picture = '';
+ else
+ {
+ $picture = '';
}
- }
- else
- {
- $picture = '';
- }
-
+
return $picture ;
}
-
function additional($filename)
{
//echo "add files";
@@ -598,72 +368,269 @@ class employeedetails extends BaseController
return $picture ;
}
-
-
/**
- * To view the employee information and load's the edit employee screen
+ * To load the add new Employee form with dropdown values
*/
- function ViewEmployee($EmpNO='')
- {
-
- if($EmpNO == '')
- {
- $EmpID = $_GET['EmpID'];
- }
- else
- {
- $EmpID = $EmpNO;
- }
-
- $GenderConfigID = 'C013';
- $MartialConfigID = 'C012';
- $QualificationConfigID = 'C014';
- $DesignationConfigID = 'C010';
- $BloodGroupConfigID = 'C011';
-
- $this->load->model('employeedetails_model');
-
- $data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
- $data['MartialList'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
- $data['QualificationList'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
- $data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
- $data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
- $data['bankdetails']=$this->employeedetails_model->getBankDetails();
- $data['DepartmentList'] = $this->employeedetails_model->getDepartment();
- $data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
- $this->global['pageTitle'] = 'Resico : View Employee';
-
- $this->loadViews("editEmployee", $this->global, $data, NULL);
+ function addemployee()
+ {
-
- }
- /**
- * To Check the email exists in the database or not for the employee
- */
- function checkMailEmp()
- {
+ $this->load->model('employeedetails_model');
+ $GenderConfigID = 'C013';
+ $MartialConfigID = 'C012';
+ $QualificationConfigID = 'C014';
+ $DesignationConfigID = 'C010';
+ $BloodGroupConfigID = 'C011';
+
+ $data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
+ $data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
+ $data['bankdetails']=$this->employeedetails_model->getBankDetails();
+ $data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
+ $data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
+ $data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
- $Empid = $this->input->post('employeeid');
- $EmailId = $this->input->post('emailid');
-
- $query = $this->employeedetails_model->checkMailExists($EmailId, $Empid);
- if (count($query)> 0)
- {
- $this->form_validation->set_message('checkMailEmp', 'The Entered Email id is exists in the Database.');
- return false;
- }
- else
- {
- return true;
- }
+ $data['Department'] = $this->employeedetails_model->getDepartment();
+ $this->global['pageTitle'] = 'Resico : Add New Employee';
+ $this->loadViews("addemployee", $this->global, $data, NULL);
+
}
- /**
+
+ /**
+ * To save the new Employee form in the database
+ */
+
+ function AddNewEmployee()
+ {
+ $aadharfilename ='';
+ $panfilename ='';
+ $voterfilename = '';
+
+ $this->load->library('form_validation');
+
+ $this->form_validation->set_rules('ContactNumber', 'ContactNumber', 'trim|required|min_length[10]|max_length[10]');
+ $this->form_validation->set_rules('emailid', 'emailid', 'trim|valid_email');
+ $this->form_validation->set_rules('gender', 'gender', 'callback_Gender_validate');
+ $this->form_validation->set_rules('MartialStatus', 'MartialStatus', 'callback_Martial_validate');
+ $this->form_validation->set_rules('bloodgroup', 'bloodgroup', 'callback_Blood_validate');
+ $this->form_validation->set_rules('emergencycontactnumber', 'emergencycontactnumber', 'trim|min_length[10]|max_length[10]');
+ $this->form_validation->set_rules('desigination', 'Desigination', 'callback_Des_validate');
+ $this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
+ $this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
+ $this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]');
+ $this->form_validation->set_rules('aadharno', 'aadharno', 'trim|min_length[14]|max_length[14]');
+ $this->form_validation->set_rules('panno', 'panno', 'trim|min_length[10]|max_length[10]');
+ $this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
+ $this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
+ $this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
+ $this->form_validation->set_rules('esino', 'esino', 'trim|min_length[10]|max_length[10]');
+
+
+ if($this->form_validation->run() == FALSE)
+ {
+ $this->addemployee();
+ }
+ else
+ {
+
+ $Picture = $this->add();
+ $Profile = $this->input->post('photo');
+ $FirstName = $this->input->post('FirstName');
+ $LastName = $this->input->post('LastName');
+ $FatherName = $this->input->post('FatherName');
+ $DateofBirth = $this->input->post('DateofBirth');
+ $ContactNumber = $this->input->post('ContactNumber');
+ $EmailId = $this->input->post('emailid');
+ $comEmailId = $this->input->post('comemailid');
+ $Gender = $this->input->post('gender');
+ $MartialStatus = $this->input->post('MartialStatus');
+ $BloodGroup = $this->input->post('bloodgroup');
+ $CurrentAddress = $this->input->post('currentaddress');
+ $permanentaddress = $this->input->post('permanentaddress');
+ $emergencycontactname = $this->input->post('emergencycontactname');
+ $emergencycontactnumber = $this->input->post('emergencycontactnumber');
+ $desigination = $this->input->post('desigination');
+ $departmentCode = $this->input->post('departmentname');
+ $dateofjoining = $this->input->post('dateofjoining');
+ $pre_experience = $this->input->post('Previousexperience');
+
+ if($pre_experience == '')
+ {
+ $Previousexperience = null;
+ }
+ else
+ {
+ $Previousexperience = $pre_experience;
+ }
+
+ $eduqualifaction = $this->input->post('eduqualifaction');
+ $addqualification = $this->input->post('addqualification');
+ $referredby = $this->input->post('referredby');
+ $referrercontno = $this->input->post('referrercontno');
+ $accountno = $this->input->post('accountno');
+ $ifsccode = $this->input->post('ifsccode');
+ $bankbranchname = $this->input->post('bankbranchname');
+ $bankaddress = $this->input->post('bankaddress');
+ $aadharno = $this->input->post('aadharno');
+ $panno = strtoupper($this->input->post('panno'));
+ $passportno = strtoupper($this->input->post('passportno'));
+ $ValidTill = $this->input->post('ValidTill');
+ $addinfo = $this->input->post('addinfo');
+ $IsActive = '1';
+ $driverlicense = strtoupper($this->input->post ( 'driverlicense' ));
+ $licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
+ $VoterID = strtoupper($this->input->post ( 'voterID' ));
+ $PFno = $this->input->post('pfno');
+ $ESIno = $this->input->post('esino');
+ $Nominee = $this->input->post('nomineename');
+ $createdby = $this->session->userdata ( 'userId' );
+ $count = $this->input->post('hidecounter');
+ $constant = $this->input->post('hideconstant');
+
+ for($i=1;$i<=$count;$i++){
+ $Ddname = $this->input->post('Ddname');
+ $filename = 'browseFiles'.$i;
+ $Pi = $this->additional($filename);
+ //$idproof[$i] = array($Ddname[$i],$Pi);
+ $idproof[$i] = $Ddname[$i]."/".$Pi;
+
+ }
+
+ foreach ($idproof as $key => $value) {
+
+ $exp = explode("/",$value);
+ if($exp[0] == 'aadhar'){
+
+ if(!empty($value)){
+ $aadharfilename = $value ;
+ }
+ else{
+ $aadharfilename = null;
+ }
+ }
+ elseif($exp[0] == 'pan' ){
+ if(!empty($value)){
+ $panfilename = $value;
+ }
+ else{
+ $panfilename = null;
+ }
+ }
+ elseif($exp[0] = 'voter'){
+ if(!empty($value)){
+ $voterfilename = $value;
+ }
+ else{
+ $voterfilename = null;
+ }
+ }
+
+ }
+
+
+ if($licenseExpiryDate != '')
+ {
+ $License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
+ }
+ else
+ {
+ $License_ExpiryDate = null;
+ }
+
+ $DOB = $this->getDateformat($DateofBirth);
+ $DOJ = $this->getDateformat($dateofjoining);
+
+ if($ValidTill != '')
+ {
+ $Valid = $this->getDateformat($ValidTill);
+ }
+ else
+ {
+ $Valid = null;
+ }
+
+ $Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,
+ 'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,
+ 'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,
+ 'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,
+ 'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,
+ 'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,
+ 'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,
+ 'Additional_Qualification'=>$addqualification,
+ 'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,
+ 'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,
+ 'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
+ 'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
+ 'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
+ 'LicenseValidtill'=>$License_ExpiryDate,'PFNO'=>$PFno,'ESI'=>$ESIno,
+ 'NomineeDetails'=>$Nominee,'AadharNo'=>$aadharfilename,'PANNo'=>$panfilename,'VoterID'=>$voterfilename);
+
+ $this->load->model('employeedetails_model');
+
+ // print_r($Employee);
+ // die();
+ $result = $this->employeedetails_model->addNewemployee($Employee);
+
+ if($result > 0)
+ {
+
+ echo "";redirect('employeeListing','refresh');
+ }
+ else
+ {
+ $this->session->set_flashdata('Error', 'New Employee details not saved');
+ echo "";redirect('employeeListing','refresh');
+
+ }
+
+ }
+}
+
+ /**
+ * To view the employee information and load's the edit employee screen
+ */
+ function ViewEmployee($EmpNO='')
+ {
+
+ if($EmpNO == '')
+ {
+ $EmpID = $_GET['EmpID'];
+ }
+ else
+ {
+ $EmpID = $EmpNO;
+ }
+
+ $GenderConfigID = 'C013';
+ $MartialConfigID = 'C012';
+ $QualificationConfigID = 'C014';
+ $DesignationConfigID = 'C010';
+ $BloodGroupConfigID = 'C011';
+
+ $this->load->model('employeedetails_model');
+
+ $data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
+ $data['MartialList'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
+ $data['QualificationList'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
+ $data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
+ $data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
+ $data['bankdetails']=$this->employeedetails_model->getBankDetails();
+ $data['DepartmentList'] = $this->employeedetails_model->getDepartment();
+ $data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
+ $this->global['pageTitle'] = 'Resico : View Employee';
+
+ $this->loadViews("editEmployee", $this->global, $data, NULL);
+
+
+ }
+
+ /**
* To Update the employee details
*/
function UpdateEmployee()
{
-
+ $aadharfilename ='';
+ $panfilename ='';
+ $voterfilename = '';
$EmpId = $this->input->post('employeeid');
$this->load->library('form_validation');
@@ -677,8 +644,8 @@ class employeedetails extends BaseController
$this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
$this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
$this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]');
- $this->form_validation->set_rules('aadharno', 'aadharno ','trim|max_length[14]');
- $this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]');
+ //$this->form_validation->set_rules('aadharno', 'aadharno ','trim|max_length[14]');
+ //$this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]');
$this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
$this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
$this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
@@ -750,18 +717,52 @@ class employeedetails extends BaseController
$bankbranchname = $this->input->post('bankbranchname');
$bankaddress = $this->input->post('bankaddress');
$aadharno = $this->input->post('aadharno');
- $panno = strtoupper($this->input->post('panno'));
+ //$panno = strtoupper($this->input->post('panno'));
+ $panno = $this->input->post('panno');
$passportno = strtoupper($this->input->post('passportno'));
$ValidTill = $this->input->post('ValidTill');
$addinfo = $this->input->post('addinfo');
$driverlicense = strtoupper($this->input->post ( 'Driverlicense' ));
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
- $VoterID = strtoupper($this->input->post ( 'VoterID' ));
+ //$VoterID = strtoupper($this->input->post ( 'VoterID' ));
+ $VoterID = $this->input->post ( 'VoterID' );
$pfno = strtoupper($this->input->post('pfno'));
$esino = $this->input->post('esino');
$Nominee = $this->input->post('nomineename');
$chked = $this->input->post('isactive');
-
+ $count = $this->input->post('hidecounter');
+ $constant = $this->input->post('hideconstant');
+
+ for($i=1;$i<=$count;$i++){
+ $Ddname = $this->input->post('Ddname');
+ $filename = 'browseFiles'.$i;
+ $Pi = $this->additional($filename);
+ $idproof[$i] = $Ddname[$i]."/".$Pi;
+ }
+
+ if(!empty($idproof)){
+ foreach ($idproof as $key => $value) {
+ $exp = explode("/",$value);
+ if($exp[0] == 'aadhar'){
+ if(!empty($value)){ $aadharfilename = $value ; }
+ else{ $aadharfilename = null; }
+ //$aadharfilename = (!empty($aadharno)) ? $aadharno : null;
+ }
+ elseif($exp[0] == 'pan' ){
+ if(!empty($value)){ $panfilename = $value; }
+ else{ $panfilename=null; }
+ //$panfilename = (!empty($panno)) ? $panno : null;
+ }
+ elseif($exp[0] = 'voter'){
+ if(!empty($value)){ $voterfilename = $value;}
+ else{ $voterfilename=null;}
+ }
+ }}
+
+ $voter = (!empty($VoterID)) ? $VoterID : $voterfilename ;
+ $pan = (!empty($panno)) ? $panno : $panfilename;
+ $aadhar = (!empty($aadharno)) ? $aadharno : $aadharfilename;
+
if( $chked != '')
{
$IsActive = '1';
@@ -801,14 +802,14 @@ class employeedetails extends BaseController
'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,
'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,
'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,
- 'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,
+ 'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadhar ,'PANNo'=>$pan ,
'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,
'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,
- 'VoterID'=>$VoterID,'PFNO'=>$pfno,'ESI'=>$esino,'NomineeDetails'=>$Nominee);
-
+ 'VoterID'=>$voter,'PFNO'=>$pfno,'ESI'=>$esino,'NomineeDetails'=>$Nominee);
+ // print_r($Employee);
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
if($result > 0)
@@ -825,201 +826,219 @@ class employeedetails extends BaseController
}
+ function updateidproof(){
+ $id = $this->input->post('id');
+ $name = $this->input->post('name');
+ $deletedata = $this->employeedetails_model->removefiles($name,$id);
+ echo $deletedata;
+ }
+
+
+ /**
+ * To load pagenotfound view
+ */
+ function pageNotFound()
+ {
+ $this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
+ $this->loadViews("404", $this->global, NULL, NULL);
+ }
+
+
/**
* To export report of supplier details in excel
*/
function export_employee(){
- $this->load->library('excel');
- $this->excel->setActiveSheetIndex(0)->mergeCells('L3:S3');
- $this->excel->setActiveSheetIndex(0)->getStyle('L3')->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,));
+ $this->load->library('excel');
+ $this->excel->setActiveSheetIndex(0)->mergeCells('L3:S3');
+ $this->excel->setActiveSheetIndex(0)->getStyle('L3')->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,));
- $this->excel->getActiveSheet()->setTitle('Employee details');
+ $this->excel->getActiveSheet()->setTitle('Employee details');
- $this->excel->getActiveSheet()->setCellValue('L3', 'RESICO INDUSTRIES Employee Details');
+ $this->excel->getActiveSheet()->setCellValue('L3', 'RESICO INDUSTRIES Employee Details');
- $this->excel->getActiveSheet()->setCellValue('C5', 'EmpID');
- $this->excel->getActiveSheet()->setCellValue('D5', 'FirstName-LastName');
- $this->excel->getActiveSheet()->setCellValue('E5', 'FatherName');
- $this->excel->getActiveSheet()->setCellValue('F5', 'Gender');
- $this->excel->getActiveSheet()->setCellValue('G5', 'Date of Birth');
- $this->excel->getActiveSheet()->setCellValue('H5', 'ContactNumber');
- $this->excel->getActiveSheet()->setCellValue('I5', 'EmailId');
- $this->excel->getActiveSheet()->setCellValue('J5', 'BloodGroup');
- $this->excel->getActiveSheet()->setCellValue('K5', 'MartialStatus');
- $this->excel->getActiveSheet()->setCellValue('L5', 'DateofJoining');
- $this->excel->getActiveSheet()->setCellValue('M5', 'PreviousYearsOfExp');
- $this->excel->getActiveSheet()->setCellValue('N5', 'Designation');
- $this->excel->getActiveSheet()->setCellValue('O5', 'DepartmentName');
- $this->excel->getActiveSheet()->setCellValue('P5', 'PresentAddress');
- $this->excel->getActiveSheet()->setCellValue('Q5', 'PermanentAddress');
- $this->excel->getActiveSheet()->setCellValue('R5', 'EmergencyContactName');
- $this->excel->getActiveSheet()->setCellValue('S5', 'EmergencyContactNumber');
- $this->excel->getActiveSheet()->setCellValue('T5', 'Edu_Qualification');
- $this->excel->getActiveSheet()->setCellValue('U5', 'Additional_Qualification');
- $this->excel->getActiveSheet()->setCellValue('V5', 'Reference_Name');
- $this->excel->getActiveSheet()->setCellValue('W5', 'Reference_ContactNumber');
- $this->excel->getActiveSheet()->setCellValue('X5', 'BankStatemant');
- $this->excel->getActiveSheet()->setCellValue('Y5', 'AadharNo');
- $this->excel->getActiveSheet()->setCellValue('Z5', 'PANNo');
- $this->excel->getActiveSheet()->setCellValue('AA5', 'PassportNo');
- $this->excel->getActiveSheet()->setCellValue('AB5', 'Passport_Valid_till');
- $this->excel->getActiveSheet()->setCellValue('AC5', 'Voter ID');
- $this->excel->getActiveSheet()->setCellValue('AD5', 'Driving License');
- $this->excel->getActiveSheet()->setCellValue('AE5', 'Driving License Expiry Date');
- $this->excel->getActiveSheet()->setCellValue('AF5', 'Official Email ID');
- $this->excel->getActiveSheet()->setCellValue('AG5', 'IsActive');
- $this->excel->getActiveSheet()->setCellValue('AH5', 'PFNO');
- $this->excel->getActiveSheet()->setCellValue('AI5', 'ESI');
- $this->excel->getActiveSheet()->setCellValue('AJ5', 'Nominee Details');
- $this->excel->getActiveSheet()->setCellValue('AK5', 'Remarks');
- $this->excel->getActiveSheet()->setCellValue('AL5', 'CreatedBy');
- $this->excel->getActiveSheet()->setCellValue('AM5', 'UpdatedBY');
+ $this->excel->getActiveSheet()->setCellValue('C5', 'EmpID');
+ $this->excel->getActiveSheet()->setCellValue('D5', 'FirstName-LastName');
+ $this->excel->getActiveSheet()->setCellValue('E5', 'FatherName');
+ $this->excel->getActiveSheet()->setCellValue('F5', 'Gender');
+ $this->excel->getActiveSheet()->setCellValue('G5', 'Date of Birth');
+ $this->excel->getActiveSheet()->setCellValue('H5', 'ContactNumber');
+ $this->excel->getActiveSheet()->setCellValue('I5', 'EmailId');
+ $this->excel->getActiveSheet()->setCellValue('J5', 'BloodGroup');
+ $this->excel->getActiveSheet()->setCellValue('K5', 'MartialStatus');
+ $this->excel->getActiveSheet()->setCellValue('L5', 'DateofJoining');
+ $this->excel->getActiveSheet()->setCellValue('M5', 'PreviousYearsOfExp');
+ $this->excel->getActiveSheet()->setCellValue('N5', 'Designation');
+ $this->excel->getActiveSheet()->setCellValue('O5', 'DepartmentName');
+ $this->excel->getActiveSheet()->setCellValue('P5', 'PresentAddress');
+ $this->excel->getActiveSheet()->setCellValue('Q5', 'PermanentAddress');
+ $this->excel->getActiveSheet()->setCellValue('R5', 'EmergencyContactName');
+ $this->excel->getActiveSheet()->setCellValue('S5', 'EmergencyContactNumber');
+ $this->excel->getActiveSheet()->setCellValue('T5', 'Edu_Qualification');
+ $this->excel->getActiveSheet()->setCellValue('U5', 'Additional_Qualification');
+ $this->excel->getActiveSheet()->setCellValue('V5', 'Reference_Name');
+ $this->excel->getActiveSheet()->setCellValue('W5', 'Reference_ContactNumber');
+ $this->excel->getActiveSheet()->setCellValue('X5', 'BankStatemant');
+ $this->excel->getActiveSheet()->setCellValue('Y5', 'AadharNo');
+ $this->excel->getActiveSheet()->setCellValue('Z5', 'PANNo');
+ $this->excel->getActiveSheet()->setCellValue('AA5', 'PassportNo');
+ $this->excel->getActiveSheet()->setCellValue('AB5', 'Passport_Valid_till');
+ $this->excel->getActiveSheet()->setCellValue('AC5', 'Voter ID');
+ $this->excel->getActiveSheet()->setCellValue('AD5', 'Driving License');
+ $this->excel->getActiveSheet()->setCellValue('AE5', 'Driving License Expiry Date');
+ $this->excel->getActiveSheet()->setCellValue('AF5', 'Official Email ID');
+ $this->excel->getActiveSheet()->setCellValue('AG5', 'IsActive');
+ $this->excel->getActiveSheet()->setCellValue('AH5', 'PFNO');
+ $this->excel->getActiveSheet()->setCellValue('AI5', 'ESI');
+ $this->excel->getActiveSheet()->setCellValue('AJ5', 'Nominee Details');
+ $this->excel->getActiveSheet()->setCellValue('AK5', 'Remarks');
+ $this->excel->getActiveSheet()->setCellValue('AL5', 'CreatedBy');
+ $this->excel->getActiveSheet()->setCellValue('AM5', 'UpdatedBY');
-
- $this->excel->getActiveSheet()->getStyle('L3')->getFont()->setSize(14);
- $this->excel->getActiveSheet()->getStyle('L3')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('R5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('R5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('S5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('S5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('T5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('T5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('U5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('U5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('V5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('V5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AC5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AC5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AD5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AD5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AE5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AE5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AF5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AF5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AG5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AG5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AH5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AH5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AI5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AI5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AJ5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AJ5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AK5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AK5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AL5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AL5')->getFont()->setBold(true);
- $this->excel->getActiveSheet()->getStyle('AM5')->getFont()->setSize(12);
- $this->excel->getActiveSheet()->getStyle('AM5')->getFont()->setBold(true);
-
+
+ $this->excel->getActiveSheet()->getStyle('L3')->getFont()->setSize(14);
+ $this->excel->getActiveSheet()->getStyle('L3')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('R5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('R5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('S5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('S5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('T5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('T5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('U5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('U5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('V5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('V5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AC5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AC5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AD5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AD5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AE5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AE5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AF5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AF5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AG5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AG5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AH5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AH5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AI5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AI5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AJ5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AJ5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AK5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AK5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AL5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AL5')->getFont()->setBold(true);
+ $this->excel->getActiveSheet()->getStyle('AM5')->getFont()->setSize(12);
+ $this->excel->getActiveSheet()->getStyle('AM5')->getFont()->setBold(true);
+
- $exportData = $this->employeedetails_model->export_excel();
+ $exportData = $this->employeedetails_model->export_excel();
- if ($exportData) {
- $i = 6;
- $s = 1;
-
- foreach ($exportData as $data) {
-
-
- $this->excel->getActiveSheet()->setCellValue('C'. $i,$data['EmpID']);
- $this->excel->getActiveSheet()->setCellValue('D'. $i,$data['FirstName'].'-'.$data['LastName']);
- $this->excel->getActiveSheet()->setCellValue('E'. $i,$data['FatherName']);
- $this->excel->getActiveSheet()->setCellValue('F'. $i,$data['Gender']);
- $this->excel->getActiveSheet()->setCellValue('G'. $i,$data['DateofBirth']);
- $this->excel->getActiveSheet()->setCellValue('H'. $i,$data['ContactNumber']);
- $this->excel->getActiveSheet()->setCellValue('I'. $i,$data['EmailId']);
- $this->excel->getActiveSheet()->setCellValue('J'. $i,$data['BloodGroup']);
- $this->excel->getActiveSheet()->setCellValue('K'. $i,$data['MartialStatus']);
- $this->excel->getActiveSheet()->setCellValue('L'. $i,$data['DateofJoining']);
- $this->excel->getActiveSheet()->setCellValue('M'. $i,$data['PreviousYearsOfExp']);
- $this->excel->getActiveSheet()->setCellValue('N'. $i,$data['Designation']);
- $this->excel->getActiveSheet()->setCellValue('O'. $i,$data['DepartmentName']);
- $this->excel->getActiveSheet()->setCellValue('P'. $i,$data['PresentAddress']);
- $this->excel->getActiveSheet()->setCellValue('Q'. $i,$data['PermanentAddress']);
- $this->excel->getActiveSheet()->setCellValue('R'. $i,$data['EmergencyContactName']);
- $this->excel->getActiveSheet()->setCellValue('S'. $i,$data['EmergencyContactNumber']);
- $this->excel->getActiveSheet()->setCellValue('T'. $i,$data['Edu_Qualification']);
- $this->excel->getActiveSheet()->setCellValue('U'. $i,$data['Additional_Qualification']);
- $this->excel->getActiveSheet()->setCellValue('V'. $i,$data['Reference_Name']);
- $this->excel->getActiveSheet()->setCellValue('W'. $i,$data['Reference_ContactNumber']);
- $this->excel->getActiveSheet()->setCellValue('X'. $i,$data['BankAccountNo'].'-'.$data['IFSCCode'].'-'.$data['BankBranchName'].$data['BankAddress']);
- $this->excel->getActiveSheet()->setCellValue('Y'. $i,$data['AadharNo']);
- $this->excel->getActiveSheet()->setCellValue('Z'. $i,$data['PANNo']);
- $this->excel->getActiveSheet()->setCellValue('AA'. $i,$data['PassportNo']);
- $this->excel->getActiveSheet()->setCellValue('AB'. $i,$data['Passport_Valid_till']);
- $this->excel->getActiveSheet()->setCellValue('AC'. $i,$data['VoterID']);
- $this->excel->getActiveSheet()->setCellValue('AD'. $i,$data['DriverLicense']);
- $this->excel->getActiveSheet()->setCellValue('AE'. $i,$data['LicenseValidtill']);
- $this->excel->getActiveSheet()->setCellValue('AF'. $i,$data['personalEmailId']);
- $this->excel->getActiveSheet()->setCellValue('AG'. $i,$data['IsActive']);
- $this->excel->getActiveSheet()->setCellValue('AH'. $i,$data['PFNO']);
- $this->excel->getActiveSheet()->setCellValue('AI'. $i,$data['ESI']);
- $this->excel->getActiveSheet()->setCellValue('AJ'. $i,$data['NomineeDetails']);
- $this->excel->getActiveSheet()->setCellValue('AK'. $i,$data['Remarks']);
- $this->excel->getActiveSheet()->setCellValue('AL'. $i,$data['CreatedByName']);
- $this->excel->getActiveSheet()->setCellValue('AM'. $i,$data['UpdatedByName']);
-
- $i++;
- $s++;
- }
- }
-
- $filename = 'Employee_Details' .' '. '.xls'; //save our workbook as this file name
- header('Content-Type: application/vnd.ms-excel'); //mime type
- header('Content-Disposition: attachment;filename="' . $filename . '"'); //tell browser what's the file name
- header('Cache-Control: max-age=0'); //no cache
- $objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
- if (ob_get_contents()) ob_end_clean();
- ob_start();
- $objWriter->save('php://output');
-
-
- }
+ if ($exportData) {
+ $i = 6;
+ $s = 1;
+ foreach ($exportData as $data) {
+
+
+ $this->excel->getActiveSheet()->setCellValue('C'. $i,$data['EmpID']);
+ $this->excel->getActiveSheet()->setCellValue('D'. $i,$data['FirstName'].'-'.$data['LastName']);
+ $this->excel->getActiveSheet()->setCellValue('E'. $i,$data['FatherName']);
+ $this->excel->getActiveSheet()->setCellValue('F'. $i,$data['Gender']);
+ $this->excel->getActiveSheet()->setCellValue('G'. $i,$data['DateofBirth']);
+ $this->excel->getActiveSheet()->setCellValue('H'. $i,$data['ContactNumber']);
+ $this->excel->getActiveSheet()->setCellValue('I'. $i,$data['EmailId']);
+ $this->excel->getActiveSheet()->setCellValue('J'. $i,$data['BloodGroup']);
+ $this->excel->getActiveSheet()->setCellValue('K'. $i,$data['MartialStatus']);
+ $this->excel->getActiveSheet()->setCellValue('L'. $i,$data['DateofJoining']);
+ $this->excel->getActiveSheet()->setCellValue('M'. $i,$data['PreviousYearsOfExp']);
+ $this->excel->getActiveSheet()->setCellValue('N'. $i,$data['Designation']);
+ $this->excel->getActiveSheet()->setCellValue('O'. $i,$data['DepartmentName']);
+ $this->excel->getActiveSheet()->setCellValue('P'. $i,$data['PresentAddress']);
+ $this->excel->getActiveSheet()->setCellValue('Q'. $i,$data['PermanentAddress']);
+ $this->excel->getActiveSheet()->setCellValue('R'. $i,$data['EmergencyContactName']);
+ $this->excel->getActiveSheet()->setCellValue('S'. $i,$data['EmergencyContactNumber']);
+ $this->excel->getActiveSheet()->setCellValue('T'. $i,$data['Edu_Qualification']);
+ $this->excel->getActiveSheet()->setCellValue('U'. $i,$data['Additional_Qualification']);
+ $this->excel->getActiveSheet()->setCellValue('V'. $i,$data['Reference_Name']);
+ $this->excel->getActiveSheet()->setCellValue('W'. $i,$data['Reference_ContactNumber']);
+ $this->excel->getActiveSheet()->setCellValue('X'. $i,$data['BankAccountNo'].'-'.$data['IFSCCode'].'-'.$data['BankBranchName'].$data['BankAddress']);
+ $this->excel->getActiveSheet()->setCellValue('Y'. $i,$data['AadharNo']);
+ $this->excel->getActiveSheet()->setCellValue('Z'. $i,$data['PANNo']);
+ $this->excel->getActiveSheet()->setCellValue('AA'. $i,$data['PassportNo']);
+ $this->excel->getActiveSheet()->setCellValue('AB'. $i,$data['Passport_Valid_till']);
+ $this->excel->getActiveSheet()->setCellValue('AC'. $i,$data['VoterID']);
+ $this->excel->getActiveSheet()->setCellValue('AD'. $i,$data['DriverLicense']);
+ $this->excel->getActiveSheet()->setCellValue('AE'. $i,$data['LicenseValidtill']);
+ $this->excel->getActiveSheet()->setCellValue('AF'. $i,$data['personalEmailId']);
+ $this->excel->getActiveSheet()->setCellValue('AG'. $i,$data['IsActive']);
+ $this->excel->getActiveSheet()->setCellValue('AH'. $i,$data['PFNO']);
+ $this->excel->getActiveSheet()->setCellValue('AI'. $i,$data['ESI']);
+ $this->excel->getActiveSheet()->setCellValue('AJ'. $i,$data['NomineeDetails']);
+ $this->excel->getActiveSheet()->setCellValue('AK'. $i,$data['Remarks']);
+ $this->excel->getActiveSheet()->setCellValue('AL'. $i,$data['CreatedByName']);
+ $this->excel->getActiveSheet()->setCellValue('AM'. $i,$data['UpdatedByName']);
+
+ $i++;
+ $s++;
+ }
+ }
+
+ $filename = 'Employee_Details' .' '. '.xls'; //save our workbook as this file name
+ header('Content-Type: application/vnd.ms-excel'); //mime type
+ header('Content-Disposition: attachment;filename="' . $filename . '"'); //tell browser what's the file name
+ header('Cache-Control: max-age=0'); //no cache
+ $objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
+ if (ob_get_contents()) ob_end_clean();
+ ob_start();
+ $objWriter->save('php://output');
+
+
+}
+
}
?>
\ No newline at end of file
diff --git a/application/models/employeedetails_model.php b/application/models/employeedetails_model.php
index 5438fb8d..98d454e4 100644
--- a/application/models/employeedetails_model.php
+++ b/application/models/employeedetails_model.php
@@ -235,6 +235,24 @@ class employeedetails_model extends CI_Model
$result = $query->result();
return $result;
}
+
+ function removefiles($value,$Empid){
+ $str = explode("/",$value);
+ if($str[0] == 'pan'){ $this->db->set('PANNo', null); }
+ else if( $str[0] == 'aadhar'){ $this->db->set('AadharNo', null); }
+ else if( $str[0] == 'voter'){ $this->db->set('VoterID', null); }
+ unlink("uploads/images/".$str[1]);
+ $this->db->where('EmpID =',$Empid);
+ $this->db->update('T_Employee_Details');
+ $aff = $this->db->affected_rows();
+ return $aff;
+
+ // $this->db->set('PANNo', null);
+ // $this->db->where('EmpID =',$Empid);
+ // $this->db->update('T_Employee_Details');
+ // $aff = $this->db->affected_rows();
+ // return $aff;
+ }
/**
* To get Asset's information for export xl
diff --git a/application/views/addemployee.php b/application/views/addemployee.php
index b9afef1f..dcf96942 100644
--- a/application/views/addemployee.php
+++ b/application/views/addemployee.php
@@ -1,385 +1,4 @@
-
-