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

class Dashboard extends CI_Controller {

	public function __construct(){
		parent::__construct();
		$this->load->model('Dashboard_model');
		if(isUserLoggedIn()==false){
			redirect(base_url());
		}
	}

	public function index()
	{

		$countMenu = $this->Dashboard_model->getMenu();
		$countcategory = $this->Dashboard_model->getCate();
		$counthotelcategory = $this->Dashboard_model->getHotelCate();
		$countFacilities = $this->Dashboard_model->getFacilities();
		$completeHotels = $this->Dashboard_model->gethotels();

		$pageDetails = array(
			'header'=>array(
				'pageTitle'=>"Dashboard",
			),
			'body'=>array(
				'countMenu'=>$countMenu,
				'countcategory'=>$countcategory,
				'counthotelcategory'=>$counthotelcategory,
				'countFacilities'=>$countFacilities,
				'completeHotels'=>$completeHotels,
			),
			'footer'=>array()
		);

		loadView('dashboard/dashboard',$pageDetails);
	}

	

}
