From 413d807e22b8734dcd38eb831301c7217a0b4352 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Thu, 25 Jan 2024 05:09:26 +0100 Subject: [PATCH] added logo parameters --- application/controllers/Themes.php | 8 +++++--- application/models/Themes_model.php | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/application/controllers/Themes.php b/application/controllers/Themes.php index 10b285e9e..d2aabc73e 100644 --- a/application/controllers/Themes.php +++ b/application/controllers/Themes.php @@ -39,6 +39,8 @@ class Themes extends CI_Controller { $this->form_validation->set_rules('name', 'Theme Name', 'required'); $this->form_validation->set_rules('foldername', 'Folder Name', 'required'); $this->form_validation->set_rules('theme_mode', 'Theme Mode', 'required'); + $this->form_validation->set_rules('header_logo', 'Header Logo', 'required'); + $this->form_validation->set_rules('main_logo', 'Main Logo', 'required'); if ($this->form_validation->run() == FALSE) { @@ -66,12 +68,12 @@ class Themes extends CI_Controller { $this->form_validation->set_rules('name', 'Theme Name', 'required'); $this->form_validation->set_rules('foldername', 'Folder Name', 'required'); $this->form_validation->set_rules('theme_mode', 'Theme Mode', 'required'); + $this->form_validation->set_rules('header_logo', 'Header Logo', 'required'); + $this->form_validation->set_rules('main_logo', 'Main Logo', 'required'); if ($this->form_validation->run() == FALSE) { - $this->load->view('interface_assets/header', $data); - $this->load->view('themes/edit'); - $this->load->view('interface_assets/footer'); + $this->load->view('themes/edit', $data); } else { diff --git a/application/models/Themes_model.php b/application/models/Themes_model.php index 145bb37a9..a2ddf52d9 100644 --- a/application/models/Themes_model.php +++ b/application/models/Themes_model.php @@ -22,6 +22,8 @@ class Themes_model extends CI_Model { 'name' => xss_clean($this->input->post('name', true)), 'foldername' => xss_clean($this->input->post('foldername', true)), 'theme_mode' => xss_clean($this->input->post('theme_mode', true)), + 'header_logo' => xss_clean($this->input->post('header_logo', true)), + 'main_logo' => xss_clean($this->input->post('main_logo', true)), ); $this->db->insert('themes', $data); @@ -44,6 +46,8 @@ class Themes_model extends CI_Model { 'name' => xss_clean($this->input->post('name', true)), 'foldername' => xss_clean($this->input->post('foldername', true)), 'theme_mode' => xss_clean($this->input->post('theme_mode', true)), + 'header_logo' => xss_clean($this->input->post('header_logo', true)), + 'main_logo' => xss_clean($this->input->post('main_logo', true)), ); $this->db->where('id', $id);