| Server IP : 84.32.84.242 / Your IP :
216.73.216.109 [
Web Server : LiteSpeed System : Linux nl-srv-web1124.main-hosting.eu 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64 User : u964240598 ( 964240598) PHP Version : 8.4.19 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u964240598/domains/hofam.org/public_html/churchapp/application/controllers/ |
Upload File : |
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
require APPPATH . '/libraries/BaseController.php';
/**
* Class : Settings (SettingsController)
* Settings Class to control all app settings related operations
*/
class Settings extends BaseController
{
/**
* This is default constructor of the class
*/
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->isLoggedIn();
$this->load->model('settings_model');
$data['settings'] = $this->settings_model->getSettings();
$this->load->template('settings', $data); // this will load the view file
}
public function searchIndex(){
$this->isLoggedIn();
$this->load->model('search_model');
$this->search_model->checkIndexExists();
$data['status'] = $this->search_model->msg==true?"Index Already Created.":"";
$this->load->template('searchindex', $data);
}
function updateSettings()
{
$this->isLoggedIn();
$this->load->library('session');
$this->load->library('form_validation');
$this->load->model('settings_model');
$data = array('fcm_server_key'=>$this->input->post('fcm_server_key')
,'ads_interval'=>$this->input->post('ads_interval')
,'privacy'=>$this->input->post('privacy')
,'terms'=>$this->input->post('terms')
,'aboutus'=>$this->input->post('aboutus')
,'facebook_page'=>$this->input->post('facebook_page')
,'youtube_page'=>$this->input->post('youtube_page')
,'twitter_page'=>$this->input->post('twitter_page')
,'website_url'=>$this->input->post('website_url')
,'image_one'=>$this->input->post('image_one')
,'image_two'=>$this->input->post('image_two')
,'image_three'=>$this->input->post('image_three')
,'image_four'=>$this->input->post('image_four')
,'image_five'=>$this->input->post('image_five')
,'image_six'=>$this->input->post('image_six')
,'image_seven'=>$this->input->post('image_seven')
,'image_eight'=>$this->input->post('image_eight')
,'instagram_page'=>$this->input->post('instagram_page')
,'mail_username'=>$this->input->post('mail_username')
,'mail_password'=>$this->input->post('mail_password'),'mail_smtp_host'=>$this->input->post('mail_smtp_host')
,'mail_protocol'=>$this->input->post('mail_protocol'),'mail_port'=>$this->input->post('mail_port'));
$this->settings_model->updateSettings($data);
if($this->settings_model->status == "ok")
{
$this->session->set_flashdata('success', $this->settings_model->message);
}
else
{
$this->session->set_flashdata('error', $this->settings_model->message);
}
redirect('settings');
}
public function privacy()
{
$this->load->model('settings_model');
$data['churchname'] = "Connected Faith";
$data['title'] = "Privacy Policy";
$data['content'] = $this->settings_model->getSettings()->privacy;
$this->load->view('otherview', $data);
}
public function terms()
{
$this->load->model('settings_model');
$data['churchname'] = "Connected Faith";
$data['title'] = "Terms & Conditions";
$data['content'] = $this->settings_model->getSettings()->terms;
$this->load->view('otherview', $data);
}
public function aboutus()
{
$this->load->model('settings_model');
$data['churchname'] = "Connected Faith";
$data['title'] = "About Us";
$data['content'] = $this->settings_model->getSettings()->aboutus;
$this->load->view('otherview', $data);
}
//create new elastic search index
function createElasticIndex(){
$this->isLoggedIn();
$this->load->model('search_model');
$this->search_model->createIndex();
$data['status'] = $this->search_model->msg;
$this->load->template('searchindex', $data);
}
}
?>
Anon7 - 2022
AnonSec Team
