From 1f7915d5034cb232c03613418594d22a76976300 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Wed, 27 Sep 2023 11:28:57 +0530 Subject: [PATCH] logo fixes : ps --- app/Controllers/Authentication.php | 2 ++ app/Controllers/BaseController.php | 2 ++ app/Models/AuthenticationModel.php | 3 ++- app/Views/template/header.php | 8 ++++---- app/Views/template/topbar.php | 8 ++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Controllers/Authentication.php b/app/Controllers/Authentication.php index 02a87ca0..874c3ee8 100755 --- a/app/Controllers/Authentication.php +++ b/app/Controllers/Authentication.php @@ -267,6 +267,8 @@ class Authentication extends BaseController $data['loggedin_person_role'] = $details[0]['role']; $data['favicon'] = file_exists(FCPATH."public/uploads/".$details[0]['favicon']) ? base_url("public/uploads/".$details[0]['favicon']) : base_url("public/uploads/default.ico"); $data['profile_picture'] = file_exists(FCPATH."public/uploads/".$details[0]['profile_picture']) ? base_url("public/uploads/" . $details[0]['profile_picture']) : base_url("public/assets/images/users/avatar-9.jpg"); + $data['company_logo_small'] = file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png"); + $data['company_logo_large'] = file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png"); $successMessage = session()->getFlashdata('success'); $validationErrors = session()->getFlashdata('error'); // Load and display the form view with the above data diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index b88adb39..9217c5af 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -76,6 +76,8 @@ abstract class BaseController extends Controller $data['loggedin_person_role'] = $details[0]['role']; $data['favicon'] = file_exists(FCPATH."public/uploads/".$details[0]['favicon']) ? base_url("public/uploads/".$details[0]['favicon']) : base_url("public/uploads/default.ico"); $data['profile_picture'] = file_exists(FCPATH."public/uploads/".$details[0]['profile_picture']) ? base_url("public/uploads/" . $details[0]['profile_picture']) : base_url("public/assets/images/users/avatar-9.jpg"); + $data['company_logo_small'] = file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png"); + $data['company_logo_large'] = file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png"); $data['browser_title'] = $data['company_name'] . ' | ' . $data['company_short_name'] . ' ' . $data['page_name']; $data['heading'] = $data['page_name'] == "Dashboard" ? 'Welcome to ' . $data['company_name'] : ""; echo view('template/header.php', $data); diff --git a/app/Models/AuthenticationModel.php b/app/Models/AuthenticationModel.php index 2e31c064..04acf241 100644 --- a/app/Models/AuthenticationModel.php +++ b/app/Models/AuthenticationModel.php @@ -10,8 +10,9 @@ class AuthenticationModel extends Model public function getheringDetailsForHeader($user_id) { $builder = $this->db->table('users'); - $builder->select('user_id,user_name,email,first_name,last_name,password,mobile_no,date_of_birth,address,gender,profile_picture,city,state,postal_code,users.country,role,setting_id,site_name,site_title,favicon,logo,terms_service,footer_about,admin_email,mobile,copyright,pagination_limit,site_info,about_info,mail_protocol,mail_title,mail_host,mail_port,mail_encryption,mail_username,mail_password,currency,settings.country'); + $builder->select('user_id,user_name,users.email,users.first_name,users.last_name,users.password,users.mobile_no,date_of_birth,users.address,gender,profile_picture,users.city,users.state,users.postal_code,users.country,role,setting_id,site_name,site_title,favicon,logo,terms_service,footer_about,admin_email,mobile,copyright,pagination_limit,site_info,about_info,mail_protocol,mail_title,mail_host,mail_port,mail_encryption,mail_username,mail_password,currency,settings.country,settings.logo as company_logo_large,business.business_logo as company_logo_small'); $builder->join('settings', 'settings.business_id = users.business_id', 'left'); + $builder->join('business', 'business.business_id = users.business_id', 'left'); $builder->where('user_id', $user_id); //$template_mapping_details['fk_entity_id']; $query = $builder->get(); diff --git a/app/Views/template/header.php b/app/Views/template/header.php index e2a2ccc5..2af77f23 100644 --- a/app/Views/template/header.php +++ b/app/Views/template/header.php @@ -45,11 +45,11 @@
diff --git a/app/Views/template/topbar.php b/app/Views/template/topbar.php index 37fa1f4d..561a4fe9 100644 --- a/app/Views/template/topbar.php +++ b/app/Views/template/topbar.php @@ -272,11 +272,11 @@