<?php
if($_SESSION['login'] == 'Da'){
	if(!isset($_GET['page'])) $_GET['page'] = '';
		switch($_GET['page']) {
			case '':
			include "cauta.php";
			break;
			case 'cauta':
			include "cauta.php";
			break;
			case 'adauga':
			include "adauga.php";
			break;
			case 'cautare':
			include "cautare.php";
			break;
			case 'arata':
			include "arata.php";
			break;
			case 'istoric':
			include "istoric.php";
			break;
			case 'arata-istoric':
			include "arata-istoric.php";
			break;
			case 'top-clienti':
			include "top20.php";
			break;
			case 'arata-top':
			include "arata-top.php";
			break;
			case 'arata-top-agent':
			include "arata-top-agent.php";
			break;
			case 'incarca-stoc':
			include "incarca-stoc.php";
			break;
			case 'adauga-in-db':
			include "adauga-in-db.php";
			break;
			case 'modifica-in-db':
			include "modifica-in-db.php";
			break;
		}
}else{	
	echo "<script>alert('Pentru acces in aceasta categorie este nevoie de autentificare')</script>";
	echo "<script>location.replace('login.php')</script>";
} 
?>	