<?php
		if ($this->session->userdata('permisson')==3) {
		$CI =& get_instance();
		$CI->load->library('libraryprofile');
		$CI->libraryprofile->showMenuBarDriver($this->session->userdata('meno'),$this->session->userdata('priezvisko'),$this->session->userdata('id_zamestnanca'));
		
		$this->load->helper("employee_helper");
		
		echo '<div id="default_container">';
			
				if ($vehicle->Pocet_miest==5){	
					if($vehicle->Nazov=="Toyota Avensis"){
						echo "<div style='position:absolute; margin-left:370px; margin-top:55px'>";
						echo "<img src='".base_url('pictures/avensis.png')."' height='238px'>";	
					}elseif ($vehicle->Nazov=="Toyota Auris"){
						echo "<div style='position:absolute; margin-left:370px; margin-top:25px'>";
						echo "<img src='".base_url('pictures/auris.png')."' height='300px'>";		
					}else{
						echo "<div style='position:absolute; margin-left:370px; margin-top:160px'>";
						echo "<img src='".base_url('pictures/sedan_sivy.png')."' height='100px'>";	
					}																	
					
				} elseif ($vehicle->Pocet_miest==7){
					if($vehicle->Nazov=="Toyota Prius"){
						echo "<div style='position:absolute; margin-left:370px; margin-top:-30px'>";
						echo "<img src='".base_url('pictures/prius.png')."' height='380px'>";	
					}else{
						echo "<div style='position:absolute; margin-left:370px; margin-top:160px'>";
						echo "<img src='".base_url('pictures/combi_sivy.png')."' height='100px'>";	
					}										
				} elseif ($vehicle->Pocet_miest==9){
					if($vehicle->Nazov=="Opel Vivaro"){
						echo "<div style='position:absolute; margin-left:370px; margin-top:0px'>";
						echo "<img src='".base_url('pictures/vivaro.png')."' height='350px'>";	
					}else{
						echo "<div style='position:absolute; margin-left:370px; margin-top:160px'>";
						echo "<img src='".base_url('pictures/van_sivy.png')."' height='100px'>";	
					}																	
				} else {
					echo "<div style='position:absolute; margin-left:370px; margin-top:160px'>";									
					echo "<img src='".base_url('pictures/bus_sivy.png')."' height='100px'>";
				}
			echo "</div>";
			echo '<h3>Detail vozidla:</h3>';
				echo '<table id="newCustomerInfoTable" style="margin-left:50px; margin-top:10px">';
					echo "<tr>";
						echo "<td style='width:160px'>";
							echo "&nbsp"; 
						echo "</td>";													
					echo "</tr>";
					
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>ID vozidla: </b>";
						echo "</td>";
						echo "<td>";										
							if (strlen($vehicle->ID_VOZ)==1) {
								echo "0000";
								echo $vehicle->ID_VOZ;
							} elseif (strlen($vehicle->ID_VOZ)==2) {
								echo "000";
								echo $vehicle->ID_VOZ;
							} elseif (strlen($vehicle->ID_VOZ)==3) {
								echo "00";
								echo $vehicle->ID_VOZ;
							} elseif (strlen($vehicle->ID_VOZ)==4) {
								echo "0";
								echo $vehicle->ID_VOZ;
							} else {
								echo $vehicle->ID_VOZ;
							}
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>Názov vozidla: </b>";
						echo "</td>";
						echo "<td>";																	
							echo $vehicle->Nazov;							
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>ŠPZ vozidla: </b>";
						echo "</td>";
						echo "<td>";																	
							echo $vehicle->SPZ;							
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td style='width:160px'>";
							echo "&nbsp"; 
						echo "</td>";													
					echo "</tr>";
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>Počet miest: </b>";
						echo "</td>";
						echo "<td>";																	
							echo $vehicle->Pocet_miest;							
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>Typ vozidla: </b>";
						echo "</td>";
						echo "<td>";																	
							switch($vehicle->Typ_vozidla){
								case 1: echo "Sedan"; break;
								case 2: echo "Combi"; break;
								case 3: echo "Van"; break;
								case 4: echo "Autobus"; break;
							}							
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td style='width:160px'>";
							echo "&nbsp"; 
						echo "</td>";													
					echo "</tr>";
					echo "<tr>";
						echo "<td  style='width:160px'>";
							echo "<b>Status vozidla: </b>";
						echo "</td>";
						
						echo "<td>";																	
							switch($vehicle->Status_vozidla){
								case 1: echo "Aktívne"; break;
								case 2: echo "Neaktívne"; break;
							}							
						echo "</td>";																														
					echo "</tr>";
					echo "<tr>";
						echo "<td style='width:160px'>";
							echo "&nbsp"; 
						echo "</td>";													
					echo "</tr>";
				echo "</table>";
			echo "<div class='vehicle_div' style='align:center; margin-top:15px; margin-bottom:-10px'></div>";
			
			echo '<div class="button-group" style="margin-left:50px;margin-top:25px;">';
				echo '<a href="javascript:window.history.go(-1);" class="button">Späť</a>'; 
			echo "</div>";		
			
		echo "</div>";

	} else {
		redirect(base_url('main/restricted'));
	}	
?>

	
	
	


