<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Welcome 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
     */
    public function __construct() {
        error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
        ini_set('display_errors', 1);
        ini_set('memory_limit', '-1');
        $ci = &get_instance();
        //$this->load->library('excel');
        parent::__construct();
        $this->load->model('site');
        $this->load->library('form_validation');
        session_start();
    }

	public function getInducteeAmount($category){
		$this->site->getInducteeAmount($category);
	}
	
	public function addGuest() {
        $data['categories'] = $this->site->getAll('confcat');
        $data['grade'] = $this->site->getAll('grade');
        $data['state'] = $this->site->getAll('state');
        $data['country'] = $this->site->getAll('countries');
        $this->load->view('headerProfile');
        if ($_SESSION['roles_id'] == '1') {
            $this->load->view('leftNav');
        } else {
            $this->load->view('leftNav2');
        }
        $this->load->view('addGuest', $data);
    }
}