<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Home extends CI_Controller {
	
	public function index()
	{                                                              
                $data['current']  = "home";   
                $data['sliders']  = $this->general->getAllRecordsWhere(SLIDER , array("is_active" => 1),"id" , "asc"); 
		$this->load->view('home',$data);
	}
        
        public function view($slug)
        {
            $data['current']  = "$slug";   
            $pagedetails = $this->general->getRecordWhere(PAGES,array("menu_slug"=>$slug));
             $data['pagetitle']  = $pagedetails->menu_title;   
             $data['pagecontent']  = $pagedetails->page_content;
             $data['pageimage']  = $pagedetails->banner_image;
            $this->load->view('view',$data);
        }
}
