From e5c14bc2822977bbf68154fc357be3b2cab02bc2 Mon Sep 17 00:00:00 2001 From: suseendhiran17 <58357088+suseendhiran17@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:30:48 +0530 Subject: [PATCH] suseendhiran --- application/modules/Auth/controllers/Auth.php | 26 ++++- .../modules/Auth/models/Auth_model.php | 1 + application/modules/Auth/views/login.php | 17 ++- .../Layout/views/includes/default_header.php | 17 ++- application/modules/User/controllers/User.php | 6 +- .../modules/User/models/User_model.php | 12 +++ application/modules/User/views/add_user.php | 78 ++------------ application/modules/User/views/business.php | 24 +++-- .../modules/User/views/change_password.php | 24 ++--- .../modules/User/views/edit_profile.php | 6 +- application/modules/User/views/edit_user.php | 20 +++- application/modules/User/views/profile.php | 63 ++++++++--- application/modules/User/views/user_list.php | 22 +--- assets/default/customize/ajax.js | 97 ++++++++++------- assets/default/customize/style.css | 101 ++++++++++++++++++ assets/uploads/logo/company-logo.png | Bin 0 -> 1698 bytes assets/uploads/logo/company-logo1.png | Bin 0 -> 1698 bytes .../profile_picture/Screenshot_(237)11.png | Bin 0 -> 215949 bytes .../profile_picture/Screenshot_(237)2.png | Bin 0 -> 215949 bytes .../profile_picture/Screenshot_(237)21.png | Bin 0 -> 215949 bytes .../uploads/profile_picture/company-logo.png | Bin 0 -> 1698 bytes .../uploads/profile_picture/company-logo1.png | Bin 0 -> 1698 bytes .../profile_picture/company-logo11.png | Bin 0 -> 1698 bytes .../profile_picture/company-logo12.png | Bin 0 -> 1698 bytes .../profile_picture/company-logo121.png | Bin 0 -> 1698 bytes .../profile_picture/company-logo122.png | Bin 0 -> 1698 bytes .../profile_picture/company-logo13.png | Bin 0 -> 1698 bytes assets/uploads/profile_picture/profile10.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile11.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile12.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile31.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile41.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile5.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile6.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile7.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile8.jpg | Bin 0 -> 7540 bytes assets/uploads/profile_picture/profile9.jpg | Bin 0 -> 7540 bytes .../venba-information-technology1.png | Bin 0 -> 9536 bytes 38 files changed, 322 insertions(+), 192 deletions(-) create mode 100644 assets/default/customize/style.css create mode 100644 assets/uploads/logo/company-logo.png create mode 100644 assets/uploads/logo/company-logo1.png create mode 100644 assets/uploads/profile_picture/Screenshot_(237)11.png create mode 100644 assets/uploads/profile_picture/Screenshot_(237)2.png create mode 100644 assets/uploads/profile_picture/Screenshot_(237)21.png create mode 100644 assets/uploads/profile_picture/company-logo.png create mode 100644 assets/uploads/profile_picture/company-logo1.png create mode 100644 assets/uploads/profile_picture/company-logo11.png create mode 100644 assets/uploads/profile_picture/company-logo12.png create mode 100644 assets/uploads/profile_picture/company-logo121.png create mode 100644 assets/uploads/profile_picture/company-logo122.png create mode 100644 assets/uploads/profile_picture/company-logo13.png create mode 100644 assets/uploads/profile_picture/profile10.jpg create mode 100644 assets/uploads/profile_picture/profile11.jpg create mode 100644 assets/uploads/profile_picture/profile12.jpg create mode 100644 assets/uploads/profile_picture/profile31.jpg create mode 100644 assets/uploads/profile_picture/profile41.jpg create mode 100644 assets/uploads/profile_picture/profile5.jpg create mode 100644 assets/uploads/profile_picture/profile6.jpg create mode 100644 assets/uploads/profile_picture/profile7.jpg create mode 100644 assets/uploads/profile_picture/profile8.jpg create mode 100644 assets/uploads/profile_picture/profile9.jpg create mode 100644 assets/uploads/profile_picture/venba-information-technology1.png diff --git a/application/modules/Auth/controllers/Auth.php b/application/modules/Auth/controllers/Auth.php index fbafb17..509556d 100644 --- a/application/modules/Auth/controllers/Auth.php +++ b/application/modules/Auth/controllers/Auth.php @@ -53,12 +53,28 @@ public function index() public function authendicate() { $user = $this->auth_model->validate_user(); - //print_r($user);die(); + // print_r($user);die(); // echo hash_password('password');die(); - if (empty($user)) { - redirect('login'); - } + $this->session->set_flashdata('msg', "username not avaiable"); + redirect('login'); + } + if (!empty($user) && $user->is_active == 0) { + $this->session->set_flashdata('msg', "deactivate user"); + redirect('login'); + } + // if (!empty($user)) { + // if ($user->is_active == 0) { + // $this->session->set_flashdata('msg', $user); + // redirect('login'); + // } + // else{ + // $this->session->set_flashdata('msg', $user); + // redirect('login'); + // } + // } + + // if (!empty($user) && $user->status == 0) { // // account pending // echo json_encode(array('st'=>2)); @@ -105,6 +121,8 @@ public function authendicate() $this->session->set_userdata($data); redirect('dashboard'); } + // pass the value 1 when the username or password is wrong + $this->session->set_flashdata('msg',"password doesn't match"); redirect('login'); } diff --git a/application/modules/Auth/models/Auth_model.php b/application/modules/Auth/models/Auth_model.php index fa14f56..777babb 100644 --- a/application/modules/Auth/models/Auth_model.php +++ b/application/modules/Auth/models/Auth_model.php @@ -130,6 +130,7 @@ function validate_user() $this->db->from('users'); $this->db->where('email', $this->input->post('user_name')); $this->db->or_where('user_name', $this->input->post('user_name')); + // $this->db->where('is_active', 1); $this->db->limit(1); $query = $this->db->get(); if($query->num_rows() == 1){ diff --git a/application/modules/Auth/views/login.php b/application/modules/Auth/views/login.php index bc4599a..7732a3c 100644 --- a/application/modules/Auth/views/login.php +++ b/application/modules/Auth/views/login.php @@ -39,25 +39,32 @@
session->flashdata('msg'); ?>
+New to site? +
©2016 All Rights Reserved. Venba Infotech! is a Bootstrap 4 template. Privacy and Terms
+ +All Rights Reserved.Privacy and Terms