<?php

	class Udash extends CI_Controller{



		public function index(){

			if(!file_exists(APPPATH.'views/pages/home.php')){

				show_404();

			}



			$data['title'] = ucfirst($page);



			$this->load->view('templates/header', $data);

			$this->load->view('pages/home', $data);

			$this->load->view('templates/footer');

		}



		public function about($page = 'about'){

			if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){

				show_404();

			}



			$data['title'] = ucfirst($page);



			$this->load->view('templates/header', $data);

			$this->load->view('pages/'.$page, $data);

			$this->load->view('templates/footer');

		}



		public function how($page = 'how'){

			if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){

				show_404();

			}



			$data['title'] = 'HOW IT WORKS';



			$this->load->view('templates/header', $data);

			$this->load->view('pages/'.$page, $data);

			$this->load->view('templates/footer');

		}



		public function blog($page = 'blog'){

			if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){

				show_404();

			}



			$data['title'] = ucfirst($page);



			$this->load->view('templates/header', $data);

			$this->load->view('pages/'.$page, $data);

			$this->load->view('templates/footer');

		}

	}