?
Current Path : /home1/savoy/public_html/savoyeducation.com/Backup23-11-16/backup/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/public_html/savoyeducation.com/Backup23-11-16/backup/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->library('Fpaginate'); $this->load->helper('captcha'); $this->load->model('adminmodel'); } function index($page='') { if($page=='') $page='home'; redirect('site/'.$page); } function home() { $_SESSION['page']='home'; $_SESSION['title']='Savoy Education Center'; $data['news']=$this->mastermodel->getdatastable('news','news_date','desc'); $this->load->view('site/home',$data); } function about() { $_SESSION['page']='about'; $_SESSION['title']='Savoy Education Center | About Us'; $this->load->view('site/about'); } function programs() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Programs'; $this->load->view('site/programs'); } function entrance_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Entrance Coaching'; $this->load->view('site/entrance-coaching'); } function engineering_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Engineering Coaching'; $this->load->view('site/engineering-coaching'); } function medicine_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Medicine Coaching'; $this->load->view('site/medicine-coaching'); } function ca_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | CA Coaching'; $this->load->view('site/ca-coaching'); } function law_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Law Coaching'; $this->load->view('site/law-coaching'); } function bba_coaching() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Business Administration Coaching'; $this->load->view('site/bba-coaching'); } function tuition() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Tuition'; $this->load->view('site/tuition'); } function ucmas() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | UNIVERSAL CONCEPT OF MENTAL ARITHMETIC SYSTEM (UCMAS)'; $this->load->view('site/ucmas'); } function sos() { $_SESSION['page']='programs'; $_SESSION['title']='Savoy Education Center | Stars of Success (SOS)'; $this->load->view('site/sos'); } function entrance() { $_SESSION['page']='entrance'; $_SESSION['title']='Savoy Education Center | Entrance Exams'; $this->load->view('site/entrance'); } function engineering_entrance() { $_SESSION['page']='engineering_entrance'; $_SESSION['title']='Savoy Education Center | Engineering Entrance'; $this->load->view('site/engineering-entrance'); } function medicine_entrance() { $_SESSION['page']='medicine_entrance'; $_SESSION['title']='Savoy Education Center | Engineering Entrance'; $this->load->view('site/medicine-entrance'); } function ca_entrance() { $_SESSION['page']='entrance'; $_SESSION['title']='Savoy Education Center | CA Entrance'; $this->load->view('site/ca-entrance'); } function law_entrance() { $_SESSION['page']='law_entrance'; $_SESSION['title']='Savoy Education Center | LAW Entrance'; $this->load->view('site/law-entrance'); } function bba_entrance() { $_SESSION['page']='bba_entrance'; $_SESSION['title']='Savoy Education Center | BBA Entrance'; $this->load->view('site/bba-entrance'); } function news() { $_SESSION['page']='news'; $_SESSION['title']='Savoy Education Center | News'; $data['news']=$this->mastermodel->getdatastable('news','news_date','desc'); $this->load->view('site/news',$data); } function news_details($news_id) { $_SESSION['page']='news'; $_SESSION['title']='Savoy Education Center | '; $data['news']=$this->mastermodel->get_data_srow('news',$news_id,'news_id'); $data['news_all']=$this->mastermodel->getdatastable('news','news_date','desc'); $this->load->view('site/news-details',$data); } function gallery() { $_SESSION['page']='gallery'; $_SESSION['title']='Savoy Education Center | Gallery'; $output=$this->mastermodel->getdatas('directory','sort','asc'); $data['folders']=$output['results']; $this->load->view('site/gallery',$data); } function photo_gallery($directory_id) { $_SESSION['page']='gallery'; $_SESSION['title']='Savoy Education Center | Gallery'; $output=$this->mastermodel->get_data('gallery',$directory_id,'directory_id','sort'); $data['gallery']=$output['results']; $this->load->view('site/photo-gallery',$data); } function contact() { $_SESSION['page']='contact'; $_SESSION['title']='Savoy Education Center | Contact Us'; $this->load->view('site/contact'); } function insert_contact() { $postdata = $this->mastermodel->get_post_values(); $data['viewinfo']=$postdata; $this->mastermodel->insert_contact($postdata); $data['msg'] = "Thank You! <br/> WE WILL GET IN TOUCH WITH YOU SOON"; $_SESSION['page']='contact'; $_SESSION['title']=''; $this->load->view('site/view-message',$data); } function secadmin() { $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 */