?
Current Path : /home1/savoy/public_html/savoyglobal.net/badminton2013/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/savoyglobal.net/badminton2013/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'); } 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_singles() { $_SESSION['page']='participants'; $data['viewinfo']=$this->mastermodel->get_data_table('registration_singles','1','active','registration_singles_company_name'); $this->load->view('site/participants_singles',$data); } function participants_doubles() { $_SESSION['page']='participants'; $data['viewinfo']=$this->mastermodel->get_data_table('registration_doubles','1','active','registration_doubles_company_name'); $this->load->view('site/participants_doubles',$data); } function participants_mixed() { $_SESSION['page']='participants'; $data['viewinfo']=$this->mastermodel->get_data_table('registration_mixed','1','active','registration_mixed_company_name'); $this->load->view('site/participants_mixed',$data); } function registration($flag=1) { $data=array(); //$data['msg'] = "Registration has been closed for Savoy Global Badminton Tournament 2013."; //$this->load->view('site/view-message',$data); $data['flag']=$flag; $this->load->view('site/registration',$data); } function results() { $_SESSION['page']='results'; $this->load->view('site/results'); } function draws() { $_SESSION['page']='draws'; $this->load->view('site/draws'); } function singles_draw() { $_SESSION['page']='draws'; $this->load->view('site/singles-draw'); } function doubles_draw() { $_SESSION['page']='draws'; $this->load->view('site/doubles-draw'); } function mixed_doubles_draw() { $_SESSION['page']='draws'; $this->load->view('site/mixed-doubles-draw'); } 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 */