?
Current Path : /home1/savoy/www/savoyglobal.net/talentquest2013/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/talentquest2013/application/controllers/site.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Site extends CI_Controller { function __construct() { parent::__construct(); session_start(); $this->load->model('mastermodel'); $this->load->model('adminmodel'); $this->load->library('Fpaginate'); $this->load->library('mail'); } function index($page='') { if($page=='') $page='home'; redirect('site/'.$page); } function home() { $_SESSION['page']='home'; $this->load->view('site/home'); } function schedule() { $_SESSION['page']='schedule'; $this->load->view('site/schedule'); } function rules() { $_SESSION['page']='rules'; $this->load->view('site/rules'); } function participants($event_id) { $_SESSION['page']='participants'; $data['viewinfo']=$this->mastermodel->get_participants($event_id); $data['event']=$this->mastermodel->get_data_srow('event',$event_id,'event_id'); $this->load->view('site/participants',$data); } function registration($event_id) { $data=array(); $data['viewinfo'] = $this->mastermodel->get_data_srow('event',$event_id,'event_id'); $this->load->view('site/registration',$data); } function events() { $_SESSION['page']='events'; $this->load->view('site/events'); } function spell_champ() { $_SESSION['page']='events'; $this->load->view('site/spell-champ'); } function group_dance() { $_SESSION['page']='events'; $this->load->view('site/group-dance'); } function ad_zap() { $_SESSION['page']='events'; $this->load->view('site/ad-zap'); } function dumb_charades() { $_SESSION['page']='events'; $this->load->view('site/dumb-charades'); } function just_minute() { $_SESSION['page']='events'; $this->load->view('site/just-minute'); } function contact_us() { $_SESSION['page']='contact_us'; $this->load->view('site/contact-us'); } function insert_contact() { $postdata = $this->mastermodel->get_post_values(); $this->mastermodel->insert_contact($postdata); $data['msg'] = "Thank You! <br/> YOU WILL HEAR FROM US SHORTLY."; $_SESSION['page']='contact_us'; $_SESSION['spage']=''; $this->load->view('site/view-message',$data); } function insert_registration() { $postdata = $this->mastermodel->get_post_values(); $this->mastermodel->insert_registration($postdata); $data['msg'] = "Thank You! <br/> YOU WILL HEAR FROM US SHORTLY."; $_SESSION['page']='contact_us'; $_SESSION['spage']=''; $this->load->view('site/view-message',$data); } 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 site.php */ /* Location: ./application/controllers/site.php */