<?php

class Dashboard extends Controller {
  function Dashboard(){
    parent::Controller();
    session_start();
	$uid=$this->session->userdata('adminuserid');

	if ($uid == ''){
    	redirect('admin','refresh');
    }
  }
  
 
  function index(){	
	$data['liID']=$this->uri->segment(2);
	$data['title'] = "Wines2u | Σελίδες Διαχείρισης Περιεχομένου";
	$data['hideColumn']="hideboth";
	$data['main'] = 'admin/home';
	$this->load->vars($data);
	$this->load->view('admin/dashboard_tpl');
  }

 
 function logout(){
	$this->session->set_userdata("adminuserid",'');
	$_SESSION['adminuserid'] = '';
	$this->session->set_flashdata('error',"You've been logged out!");
	redirect('main','refresh'); 	
 }


}
?>