From ebe1f954265edf8276d76f3ace844238bb445fe2 Mon Sep 17 00:00:00 2001 From: venkathraman786 <81867990+venkathraman786@users.noreply.github.com> Date: Sat, 13 May 2023 00:50:13 -0500 Subject: [PATCH] Latest Changes: Venkateshwaran --- .gitignore | 51 +---- application/controllers/CompanyController.php | 11 +- .../controllers/EmployeeController.php | 38 +--- application/controllers/LoginController.php | 4 +- application/models/EmployeeModel.php | 11 - application/views/AddEmp.php | 4 +- application/views/DisableEmployeeList.php | 6 +- application/views/EditEmp.php | 33 ++- application/views/EmpIDCard.php | 18 +- application/views/EmpPreview.php | 12 +- application/views/EmployeeList.php | 3 +- application/views/Gsetting.php | 41 ++-- application/views/chancepass.php | 69 ------ application/views/changepass.php | 133 +++++------ application/views/companylist.php | 3 +- application/views/editcompanylist.php | 84 ++++++- application/views/nouserinfo.php | 19 ++ assets/style.css | 72 ++++-- composer.json | 1 + composer.lock | 98 +++++++-- uploads/1683262677.png | Bin 33172 -> 0 bytes uploads/1683262978.png | Bin 33172 -> 0 bytes uploads/1683263065.png | Bin 0 -> 19152 bytes uploads/1683282445.png | Bin 784311 -> 0 bytes uploads/1683282719.png | Bin 788469 -> 0 bytes uploads/1683282767.png | Bin 744561 -> 0 bytes uploads/1683283052.png | Bin 788469 -> 0 bytes uploads/1683289319.png | Bin 482691 -> 0 bytes uploads/1683350088.png | Bin 153593 -> 0 bytes uploads/1683350201.png | Bin 788469 -> 0 bytes uploads/1683350344.png | Bin 788469 -> 0 bytes uploads/1683608638.png | Bin 1273 -> 0 bytes uploads/1683613859.png | Bin 0 -> 19152 bytes uploads/1683614792.png | Bin 0 -> 19152 bytes uploads/1683615045.png | Bin 0 -> 19152 bytes uploads/1683615200.png | Bin 0 -> 19152 bytes uploads/1683616017.png | Bin 0 -> 19152 bytes uploads/1683616574.png | Bin 1273 -> 0 bytes uploads/1683617325.png | Bin 0 -> 19152 bytes vendor/composer/ClassLoader.php | 41 ++-- vendor/composer/InstalledVersions.php | 17 +- vendor/composer/autoload_namespaces.php | 1 + vendor/composer/autoload_real.php | 27 +-- vendor/composer/autoload_static.php | 11 + vendor/composer/installed.json | 104 +++++++-- vendor/composer/installed.php | 33 ++- vendor/composer/platform_check.php | 4 +- vendor/doctrine/instantiator/composer.json | 14 +- .../Exception/ExceptionInterface.php | 2 + .../Exception/InvalidArgumentException.php | 6 +- .../Exception/UnexpectedValueException.php | 14 +- .../Doctrine/Instantiator/Instantiator.php | 31 +-- .../Instantiator/InstantiatorInterface.php | 6 +- vendor/endroid/qr-code/README.md | 26 ++- vendor/endroid/qr-code/composer.json | 10 +- .../endroid/qr-code/src/Builder/Builder.php | 6 +- .../qr-code/src/Builder/BuilderInterface.php | 2 +- vendor/endroid/qr-code/src/Color/Color.php | 17 +- .../endroid/qr-code/src/Encoding/Encoding.php | 9 +- .../src/Exception/ValidationException.php | 5 - .../qr-code/src/ImageData/LabelImageData.php | 11 +- .../qr-code/src/ImageData/LogoImageData.php | 39 +--- .../endroid/qr-code/src/Label/Font/Font.php | 16 +- .../qr-code/src/Label/Font/NotoSans.php | 8 +- .../qr-code/src/Label/Font/OpenSans.php | 8 +- vendor/endroid/qr-code/src/Label/Label.php | 12 +- .../qr-code/src/Label/Margin/Margin.php | 17 +- vendor/endroid/qr-code/src/Logo/Logo.php | 25 +-- .../qr-code/src/Logo/LogoInterface.php | 4 +- vendor/endroid/qr-code/src/Matrix/Matrix.php | 13 +- vendor/endroid/qr-code/src/QrCode.php | 22 +- .../endroid/qr-code/src/WritableInterface.php | 7 - .../qr-code/src/Writer/BinaryWriter.php | 2 +- .../qr-code/src/Writer/ConsoleWriter.php | 10 +- .../qr-code/src/Writer/DebugWriter.php | 2 +- .../endroid/qr-code/src/Writer/EpsWriter.php | 2 +- .../endroid/qr-code/src/Writer/PdfWriter.php | 8 +- .../endroid/qr-code/src/Writer/PngWriter.php | 208 +----------------- .../src/Writer/Result/AbstractResult.php | 8 +- .../qr-code/src/Writer/Result/DebugResult.php | 22 +- .../qr-code/src/Writer/Result/EpsResult.php | 13 +- .../qr-code/src/Writer/Result/PdfResult.php | 10 +- .../qr-code/src/Writer/Result/PngResult.php | 21 +- .../qr-code/src/Writer/Result/SvgResult.php | 10 +- .../endroid/qr-code/src/Writer/SvgWriter.php | 4 +- .../qr-code/src/Writer/WriterInterface.php | 4 +- 86 files changed, 719 insertions(+), 884 deletions(-) delete mode 100644 application/views/chancepass.php create mode 100644 application/views/nouserinfo.php delete mode 100644 uploads/1683262677.png delete mode 100644 uploads/1683262978.png create mode 100644 uploads/1683263065.png delete mode 100644 uploads/1683282445.png delete mode 100644 uploads/1683282719.png delete mode 100644 uploads/1683282767.png delete mode 100644 uploads/1683283052.png delete mode 100644 uploads/1683289319.png delete mode 100644 uploads/1683350088.png delete mode 100644 uploads/1683350201.png delete mode 100644 uploads/1683350344.png delete mode 100644 uploads/1683608638.png create mode 100644 uploads/1683613859.png create mode 100644 uploads/1683614792.png create mode 100644 uploads/1683615045.png create mode 100644 uploads/1683615200.png create mode 100644 uploads/1683616017.png delete mode 100644 uploads/1683616574.png create mode 100644 uploads/1683617325.png delete mode 100644 vendor/endroid/qr-code/src/WritableInterface.php 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() {
}
})
-
-
-
-
-