diff --git a/.gitignore b/.gitignore index b24d71e..49ce3c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1 @@ -# These are some examples of commonly ignored file patterns. -# You should customize this list as applicable to your project. -# Learn more about .gitignore: -# https://www.atlassian.com/git/tutorials/saving-changes/gitignore - -# Node artifact files -node_modules/ -dist/ - -# Compiled Java class files -*.class - -# Compiled Python bytecode -*.py[cod] - -# Log files -*.log - -# Package files -*.jar - -# Maven -target/ -dist/ - -# JetBrains IDE -.idea/ - -# Unit test reports -TEST*.xml - -# Generated by MacOS -.DS_Store - -# Generated by Windows -Thumbs.db - -# Applications -*.app -*.exe -*.war - -# Large media files -*.mp4 -*.tiff -*.avi -*.flv -*.mov -*.wmv - +/vendor \ No newline at end of file diff --git a/application/controllers/CompanyController.php b/application/controllers/CompanyController.php index b5c94cc..2f4f39c 100644 --- a/application/controllers/CompanyController.php +++ b/application/controllers/CompanyController.php @@ -28,11 +28,9 @@ class CompanyController extends CI_Controller{ public function addcompany(){ - - + if($this->input->post('submit')){ - print_r($this->input->post());die(); $config = array( 'file_name'=>time(), @@ -77,6 +75,7 @@ class CompanyController extends CI_Controller{ $branch['comp_id'] = $id; $branch['branch_name']= $this->input->post('branch_name')[$i]; $branch['branch_address'] = $this->input->post('address')[$i]; + $branch['maplink'] = $this->input->post('maplink')[$i]; // echo '
'; print_r($branch); die();
@@ -171,7 +170,6 @@ class CompanyController extends CI_Controller{
// print_r($this->input->post('new_branch_name'));die();
for($i=0;$i<$count;$i++)
{
- // echo $this->input->post('branch_id')[$i];die();
$id = $this->input->post('branch_id')[$i];
$branch['branch_name']= $this->input->post('branch_name')[$i];
$branch['branch_address'] = $this->input->post('address')[$i];
@@ -180,9 +178,10 @@ class CompanyController extends CI_Controller{
// echo ''; echo $id; print_r($branch); die();
$this->CompanyModel->updatebranches($branch, $id);
}
+ // $count1 = count($this->input->post('new_branch_name'));
if ($this->input->post('new_branch_name')) {
$count1 = count($this->input->post('new_branch_name'));
-
+
for($i=0;$i<$count1;$i++) {
@@ -196,7 +195,7 @@ class CompanyController extends CI_Controller{
$result=$this->CompanyModel->branches($branch);
}
- }
+ }
$this->session->set_flashdata('status', '"'. $company['comp_name'] .'" -Company Updated Sucessfully');
redirect('CompanyController/companylist');
diff --git a/application/controllers/EmployeeController.php b/application/controllers/EmployeeController.php
index 5c7c21c..1a67b6e 100644
--- a/application/controllers/EmployeeController.php
+++ b/application/controllers/EmployeeController.php
@@ -55,7 +55,7 @@ public function addemp()
/* 'max_width'=>'300',
'max_height'=>'300', */
'max_size'=>'2048',
- 'allowed_types' => "jpg|png",
+ 'allowed_types' => "jpg|png|jpeg",
'upload_path'=>'./uploads/'
);
@@ -147,7 +147,7 @@ public function addemp()
'overwrite'=>TRUE,
/* 'max_width'=>'300',
'max_height'=>'300', */
- 'max_size'=>'2048',
+ /* 'max_size'=>'2048', */
'allowed_types' => "jpg|png|jpeg",
'upload_path'=>'./uploads/'
@@ -214,13 +214,15 @@ public function addemp()
$result['view'] = $this->EmployeeModel->viewEmployee($id);
if ($result['view'] == '') {
- echo 'User information not avaiable';
+ // echo 'User information not avaiable';
+ $this->load->view('nouserinfo');
} else {
$this->load->view('EmpPreview', $result);
}
}
else {
- echo 'User information not avaiable';
+ // echo 'User information not avaiable';
+ $this->load->view('nouserinfo');
}
@@ -232,7 +234,8 @@ public function addemp()
{
$result['view'] = $this->EmployeeModel->viewEmployee($id);
if ($result['view'] == '') {
- echo 'User information not avaiable';
+ // echo 'User information not avaiable';
+ $this->load->view('nouserinfo');
} else {
$this->load->view('EmpIDCard', $result);
}
@@ -362,30 +365,5 @@ public function deleteEmp()
$this->db->update('employees');
redirect( 'EmployeeController/DisableEmployeeList' );
}
-
-public function check_emp_code()
-{
- if($this->input->post('emp_code'))
- {
- $data = $this->EmployeeModel->check_code_exist($this->input->post('emp_code'));
- if ($data)
- {
- echo true;
- }
- else
- {
- echo false;
- }
- }
}
-
-
-}
-
-
-
-
-
-
-
?>
\ No newline at end of file
diff --git a/application/controllers/LoginController.php b/application/controllers/LoginController.php
index 5ec5c42..15d8bc0 100644
--- a/application/controllers/LoginController.php
+++ b/application/controllers/LoginController.php
@@ -74,14 +74,14 @@ class LoginController extends CI_Controller
else{
- if ($user && $password == $user->password)
+ if ($user && password_verify($password, $user->password))
{
$this->session->set_userdata('user_id', $user->email);
redirect('Dashboard');
}
else
{
- $this->session->set_userdata('user_id', $user->email);
+ $this->session->set_flashdata('username', $this->input->post('email'));
$this->session->set_flashdata('password', $this->input->post('password'));
$this->session->set_flashdata('pass',"Invalid Password");
$this->load->view('login');
diff --git a/application/models/EmployeeModel.php b/application/models/EmployeeModel.php
index 8511971..2c52ad2 100644
--- a/application/models/EmployeeModel.php
+++ b/application/models/EmployeeModel.php
@@ -69,17 +69,6 @@ return $query->result();
}
- public function check_code_exist($id)
- {
- $this->db->select();
- $this->db->from('employees');
- $this->db->where('emp_code', $id);
- $this->db->where('is_active', 1);
- $query = $this->db->get();
- $query = $query->result_array();
- return $query;
- }
-
public function updateemp($employee, $id){
diff --git a/application/views/AddEmp.php b/application/views/AddEmp.php
index f1f2dd7..a1a04f3 100644
--- a/application/views/AddEmp.php
+++ b/application/views/AddEmp.php
@@ -81,7 +81,7 @@ $('#empidErr').hide();
data:{ empid:empid},
success:function(response)
{
-alert(response)
+// alert(response)
if (response == true)
{
$('#empidErr').show();
@@ -392,7 +392,7 @@ $(document).ready(function() {
$('#empid').on('change', function() {
if ($('#empid').val().length == 0) {
- alert($('#empid').val().length)
+ // alert($('#empid').val().length)
$('#empidErr').html('Please Enter a Employee Code.');
} else {
$('#empidErr').html();
diff --git a/application/views/DisableEmployeeList.php b/application/views/DisableEmployeeList.php
index 79e9c5b..bb2c2a1 100644
--- a/application/views/DisableEmployeeList.php
+++ b/application/views/DisableEmployeeList.php
@@ -37,8 +37,7 @@
Emp ID
- Name
- Email
+ Name
Mobile
Company
Branch
@@ -55,8 +54,7 @@
?>
-
-
+
diff --git a/application/views/EditEmp.php b/application/views/EditEmp.php
index 0abf25f..e0ab788 100644
--- a/application/views/EditEmp.php
+++ b/application/views/EditEmp.php
@@ -52,7 +52,7 @@
@@ -41,7 +41,7 @@
@@ -49,7 +49,7 @@
@@ -57,7 +57,7 @@
- branch_address; ?>
+ branch_address; ?>
@@ -84,8 +84,6 @@ function siteURL() {
$domainName = $_SERVER['HTTP_HOST'];
return $protocol;
}
-
-
document.querySelector('#shareBtn')
.addEventListener('click', event => {
@@ -94,7 +92,6 @@ function siteURL() {
// available
if (navigator.share) {
navigator.share({
-
// Title that occurs over
// web share dialog
title: 'GeeksForGeeks',
@@ -134,10 +131,5 @@ function siteURL() {
}
})
-
-
-
-
-