?
Current Path : /home1/savoy/www/savoyglobal.net/application/controllers/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/application/controllers/site.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Site extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ function __construct() { parent::__construct(); session_start(); $this->load->model('mastermodel'); $this->load->model('adminmodel'); $this->load->library('Fpaginate'); $this->load->library('mail'); } public function index() { $_SESSION['current_menu'] = "index"; $_SESSION['current_title'] = "Home"; $data['news'] = $this->mastermodel->get_news(); $this->load->view('site/index',$data); } function about() { $_SESSION['current_title'] = "About Us"; $_SESSION['current_menu'] = "company"; $this->load->view('site/about'); } function team() { $_SESSION['current_title'] = "Team"; $_SESSION['current_menu'] = "company"; $this->load->view('site/team'); } function training() { $_SESSION['current_menu'] = "services"; $_SESSION['current_title'] = "Traing"; $this->load->view('site/training'); } function john_maxwell_leadership() { $_SESSION['current_menu'] = "services"; $_SESSION['current_title'] = "John Maxwell Leadership"; $this->load->view('site/john_maxwell_leadership'); } function consulting() { $_SESSION['current_menu'] = "services"; $_SESSION['current_title'] = "Consulting"; $this->load->view('site/consulting'); } function software_development() { $_SESSION['current_menu'] = "services"; $_SESSION['current_title'] = "Software Development"; $this->load->view('site/software_development'); } function photography() { $_SESSION['current_menu'] = "services"; $_SESSION['current_title'] = "Photography"; $this->load->view('site/photography'); } function gallery_thumb() { $_SESSION['current_menu'] = "gallery"; $_SESSION['current_title'] = "Gallery"; $data['directory'] = $this->mastermodel->get_directory(); $this->load->view('site/gallery_thumb', $data); } function gallery($id) { $_SESSION['current_menu'] = 'gallery'; $_SESSION['current_title'] = "Gallery"; $data['gallery'] = $this->mastermodel->get_gallery($id); $this->load->view('site/gallery',$data); } function contact() { $_SESSION['current_menu'] = 'contact'; $_SESSION['current_title'] = "Contact Us"; $this->load->view('site/contact'); } function admin() { $this->load->view('admin/login'); } public function login($res="") { if($res=='false') $data['result']='<font color="red" size=2px; >Username and Password does not match</font>'; else $data['result']=''; $this->load->view('admin/login',$data); } public function authenticate() { $username=mysql_real_escape_string($this->input->post('username')); $password=mysql_real_escape_string($this->input->post('password')); $data=$this->adminmodel->authenticate($username,$password); if ($data['numrows']>0) { $_SESSION['loggedin']='true'; $_SESSION['userid']=$data['userid']; $_SESSION['username']=$data['username']; redirect('admin/home/'); } else { redirect('site/login/false'); } } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */