<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once('models/ModelKorisnik.php');

class Korisnik{
    
    public function __construct() {
        session_start();
        if (!isset($_SESSION['korisnik'])) {
            header("Location: ?controller=gost&akcija=index"); 
        } 
    }
    
    public function index($trazi=NULL){
		$controller="korisnik";
        require_once("views/sablon/header_korisnik.php");
        require_once("views/pretraga.php");
        require_once("views/sablon/footer.php");
    }
    
    public function logout(){
        session_destroy();
        header("Location: ?controller=gost&akcija=index");
    }
	
	public function potvrdi(){
		$id = $_GET['id'];
		$broj = $_GET['broj'];
		//model
		require_once("views/sablon/header_korisnik.php");
        require_once("views/potvrda_rezervacije.php");
        require_once("views/sablon/footer.php");	
	}

}
