<?php
	if ($this->session->userdata('permisson')==1) {		
		$CI =& get_instance();
		$CI->load->library('libraryprofile');		
		$CI->libraryprofile->showMenuBarManager($this->session->userdata('meno'),$this->session->userdata('priezvisko')); 				
		$this->load->helper('graph_helper');
		$this->load->helper('manager_helper');	
		
		if($modeDet==4){
			echo '<div id="default_container">';	
		}else{
			echo '<div id="default_container">';	
		}		  			
			switch($modeDet){
				case 1:
					echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">'; 
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/1/'.$id_emp.'/1/2016') . '" class="button active">Všeobecné informácie</a>'; 
						if($type_emp!=1){
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/2/'.$id_emp.'/1/2016') . '" class="button">Inventúry</a>'; 								
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/1/2016') . '" class="button">Štatistiky</a>'; 									
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/4/' . $id_emp.'/1/2016') . '" class="button">Pokuty</a>'; 																					
						}
					echo '</div>';
								
					echo "<div class='vehicle_div' style='align:center; margin-top:15px; margin-bottom:10px'></div>";
						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>Typ zamestnanca: </b>";
								echo "</td>";
								echo "<td>";										
									switch($employee->ID_TYP_Z){
										case 1:
											echo "Manažér";
										break;
										case 2:
											echo "Vedúci inventúr";
										break;
										case 3:
											echo "Vodič";
										break;
										case 4:
											echo "Zamestnanec";
										break;
									}
								echo "</td>";
								echo "<td  style='width:160px'>";
								echo "</td>";
								if($employee->ID_TYP_Z>1){
								echo "<td  style='width:160px'>";
									echo "<b>Status zamestnanca: ";
								echo "</td>";
								echo "<td  style='width:160px'>";									
										switch($employee->Status){
										case 1: echo "Aktívny"; break;
										case 2: echo "Neaktívny"; break;
										case 3: echo "Prepustený"; break;
										}																		
								echo "</td>";	
								}																				
							echo "</tr>";
							
							echo "<tr>";
								echo "<td  style='width:160px'>";
									echo "<b>ID zamestnanca: </b>";
								echo "</td>";
								echo "<td>";										
									if (strlen($employee->ID_ZAM)==1) {
										echo "0000";
										echo $employee->ID_ZAM;
									} elseif (strlen($employee->ID_ZAM)==2) {
										echo "000";
										echo $employee->ID_ZAM;
									} elseif (strlen($employee->ID_ZAM)==3) {
										echo "00";
										echo $employee->ID_ZAM;
									} elseif (strlen($employee->ID_ZAM)==4) {
										echo "0";
										echo $employee->ID_ZAM;
									} else {
										echo $employee->ID_ZAM;
									}
								echo "</td>";
								echo "<td  style='width:160px'>";
								echo "</td>";
								if($employee->ID_TYP_Z>1){
								echo "<td  style='width:160px'>";
									echo "<b>Dátum nástupu: ";
								echo "</td>";
								echo "<td  style='width:160px'>";
									echo date("d.m.Y",strtotime($employee->Prijaty));
								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>Meno a priezvisko: </b>";
								echo "</td>";
								echo "<td>";										
									echo $employee->Meno." ".$employee->Priezvisko;
								echo "</td>";
								echo "<td  style='width:160px'>";
								echo "</td>";
																					
							echo "</tr>";
							
							echo "<tr>";
								echo "<td style='width:160px'>";
									echo "<b>Rodné číslo: </b>";
								echo "</td>";
								echo "<td>";										
									echo $employee->Rodne_cislo;
								echo "</td>";
								echo "<td  style='width:160px'>";
								echo "</td>";
								
								echo "<td  style='width:160px'>";
									switch($employee->Status){
										case 2:
											echo "Dátum zmeny aktivity:"; 
										break;
										case 3:
											echo "Prepustený:"; 
										break;
									}
								echo "</td>";
								echo "<td  style='width:160px'>";
									switch($employee->Status){
										case 2:
											echo date("d.m.Y",strtotime($employee->Prepusteny));
										break;
										case 3:
											echo date("d.m.Y",strtotime($employee->Prepusteny)); 
										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>E-mail: </b>";
								echo "</td>";
								echo "<td>";										
									echo $employee->Email;
								echo "</td>";													
							echo "</tr>";
							
							echo "<tr>";
								echo "<td style='width:160px'>";
									echo "<b>Telefónne číslo: </b>";
								echo "</td>";
								echo "<td>";
									if($employee->Tel_cislo_zamestnanca==""){
										echo "-nevyplnené-";
									}else{
										echo "00421".$employee->Tel_cislo_zamestnanca;	
									}																	
								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>Kontaktná adresa: </b>";
								echo "</td>";
								echo "<td>";
									if($employee->Mesto_zamestnanca=="" OR $employee->Ulica_zamestnanca=="" OR $employee->Cislo_domu_zamestnanca=="" OR $employee->PSC_zamestnanca==""){
										echo "-nevyplnené-";
										echo "</td>";
									echo "<tr>";
										echo "<td>";
											echo "&nbsp";
										echo "</td>";
									echo "</tr>";
									}else{
										echo $employee->Ulica_zamestnanca." ".$employee->Cislo_domu_zamestnanca;
										echo "</td>";
										echo "<tr>";
											echo "<td style='width:160px'>";
												echo "&nbsp";
											echo "</td>";
											echo "<td>";
												echo $employee->PSC_zamestnanca.", ".$employee->Mesto_zamestnanca;
											echo "</td>";
										echo "</tr>";		
									}																																				
							echo "</tr>";
							echo "<tr>";
								echo "<td style='width:160px'>";
									echo "&nbsp";
								echo "</td>";													
							echo "</tr>";
							
							echo "<tr>";
								echo "<td style='width:160px'>";
									echo "<b>Poistovňa: </b>";
								echo "</td>";
								echo "<td>";																	
									if($employee->Nazov_poistovne==""){
										echo "-nevyplnené-";
									}else{
										echo $employee->Nazov_poistovne." / ".$employee->Kod_poistovne;	
									}
								echo "</td>";													
							echo "</tr>";
							
							echo "<tr>";
								echo "<td style='width:160px'>";
									echo "<b>Číslo účtu: </b>";
								echo "</td>";
								echo "<td>";										
									if($employee->Cislo_uctu=="" OR $employee->Kod_banky==""){
										echo "-nevyplnené-";
									}else{
										echo $employee->Cislo_uctu." / ";
										if(strlen($employee->Kod_banky)==3){
											echo "0".$employee->Kod_banky;	
										}else{
											echo $employee->Kod_banky;
										}
									}
								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>";		
				break;
				case 2: 
					echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/1/' . $id_emp.'/1/2016') . '" class="button">Všeobecné informácie</a>'; 
						if($type_emp!=1){
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/2/' . $id_emp.'/1/2016') . '" class="button active">Inventúry</a>'; 								
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/' . $id_emp.'/1/2016') . '" class="button">Štatistiky</a>'; 									
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/4/' . $id_emp.'/1/2016') . '" class="button">Pokuty</a>'; 															
						}
					echo '</div>';										
					echo "<div class='vehicle_div' style='align:center; margin-top:15px; margin-bottom:0px'></div>";
					if(count($inventories)==0 OR $inventories==Array()){
						echo "<h3>Zamestnanec poslednú dobu nebol na žiadnej inventúre.</h3>";	
					}else{
						foreach($inventories as $inventory){
							echo "<div class='vehicle_div' align='center'>";
								echo "<table class='vehicle_table' style='margin-left:0px; padding-top:15px;margin-top:0px; margin-bottom:10px;'>";
									echo "<tr>";
										echo "<td width='0px' style='text-align: center'>";
										echo "</td>";
										echo "<td width='100px' style='text-align: center; margin-left:0px'>";
											echo "<b>ID inventúry</b>";					
											echo "</br>";
											if (strlen($inventory->ID_INV)==1) {
													echo "0000".$inventory->ID_INV;
											} elseif (strlen($inventory->ID_INV)==2) {
													echo "000".$inventory->ID_INV;
											} elseif (strlen($inventory->ID_INV)==3) {
													echo "00".$inventory->ID_INV;
											} elseif (strlen($inventory->ID_INV)==4) {
													echo "0".$inventory->ID_INV;
											} else {
													echo $inventory->ID_INV;
											}
										echo "</td>";
											echo "<td width='160px' style='text-align: center'>";
											echo "<b>Zákazník</b>";
											echo "</br>";
											echo $inventory->Nazov_spolocnosti.", ".$inventory->Mesto;
										echo "</td>";
										
										echo "<td width='90px' style='text-align: center'>";
											echo "<b>Počet zam.</b>";
											echo "</br>";
											echo $inventory->Pocet_zamestnancov;
										echo "</td>";
										
										echo "<td width='120px' style='text-align: center'>";
											echo "<b>Vedúci inventúry</b>";
											echo "</br>";
											if ($inventory->Meno==""){
												echo "-neurčené-";
											} else {
												echo $inventory->Meno."&nbsp".$inventory->Priezvisko;	
											}
										echo "</td>";
										echo "<td width='160px' style='text-align: center'>";
						echo "<b>Dátum a čas začiatku</b>";
						echo "</br>";
						echo date('d.m.Y G:i',strtotime($inventory->Datum_zaciatku));
					echo "</td>";
					
					echo "<td width='160px' style='text-align: center'>";
						echo "<b>Dátum a čas konca</b>";
						echo "</br>";
						echo date('d.m.Y G:i',strtotime($inventory->Datum_konca));
					echo "</td>";
					echo "<td>"; 
						echo '<div class="button-group">';
							switch($modeInv){
								case 4:
									echo '<a href="'.base_url('manager/redirectInventoryDetail/6/1/'.$inventory->ID_INV).'" class="button">Detail</a>';																
								break;
								case 3:
									echo '<a href="'.base_url('manager/redirectInventoryDetail/7/1/'.$inventory->ID_INV).'" class="button">Detail</a>';																
								break;
								case 2:
									echo '<a href="'.base_url('manager/redirectInventoryDetail/8/1/'.$inventory->ID_INV).'" class="button">Detail</a>';																
								break;
								case 0:
									echo '<a href="'.base_url('manager/redirectInventoryDetail/9/1/'.$inventory->ID_INV).'" class="button">Detail</a>';																
								break;								
							}
						echo '</div>';
					echo "<td>"; 
				echo "</tr>";
				echo "</table>";
				
			echo "</div>";						
						}	
						
					}	
				break;
				case 3: 
					echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/1/' . $id_emp.'/1/2016') . '" class="button">Všeobecné informácie</a>'; 
						if($type_emp!=1){
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/2/' . $id_emp.'/1/2016') . '" class="button">Inventúry</a>'; 								
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/' . $id_emp.'/1/2016') . '" class="button  active">Štatistiky</a>'; 									
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/4/' . $id_emp.'/1/2016') . '" class="button">Pokuty</a>'; 															
						}echo '</div>';
					echo '<div class="button-group" style="margin-left:40px;margin-top:10px;">';
						switch($modeSta){
							case 1:
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/1/'.$year).'" class="button active">Mzdy v hrubom</a>';
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/2/'.$year).'" class="button">Odpracované hodiny</a>'; 
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/3/'.$year).'" class="button">Počet inventúr</a>'; 
							break;
							case 2:
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/1/'.$year).'" class="button">Mzdy v hrubom</a>';
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/2/'.$year).'" class="button active">Odpracované hodiny</a>'; 
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/3/'.$year).'" class="button">Počet inventúr</a>'; 
							break;
							case 3:
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/1/'.$year).'" class="button">Mzdy v hrubom</a>';
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/2/'.$year).'" class="button">Odpracované hodiny</a>'; 
								echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/3/'.$year).'" class="button active">Počet inventúr</a>'; 
							break;
						}																			
					echo '</div>';
					echo '<div class="button-group" style="margin-left:40px;margin-top:10px;">';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/'.$modeSta.'/'.($year-1)).'" class="button" style="margin-right:10px;">&laquo;</a>';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/'.$modeSta.'/'.($year-1)).'" class="button">'.($year-1).'</a>';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/'.$modeSta.'/'.$year).'" class="button active">'.$year.'</a>'; 
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/'.$modeSta.'/'.($year+1)).'" class="button">'.($year+1).'</a>';	
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/'.$id_emp.'/'.$modeSta.'/'.($year+1)).'" class="button" style="margin-left:10px;">&raquo;</a>';												
					echo '</div>';
					echo "<div class='vehicle_div' style='align:center; margin-top:15px; margin-bottom:10px'></div>";
					echo '<div class="divForGraph" style="height:350px;margin-top:-11px">';				
					  	drawGraphManagerEmployees($modeSta,$id_emp,$type_emp,$year);					
					echo '</div>';
					echo "<div class='vehicle_div' style='align:center; margin-top:350px; margin-bottom:10px'></div>";		
				break;
				case 4:
				echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">';
						echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/1/' . $id_emp.'/1/2016') . '" class="button">Všeobecné informácie</a>'; 
						if($type_emp!=1){
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/2/' . $id_emp.'/1/2016') . '" class="button">Inventúry</a>'; 								
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/3/' . $id_emp.'/1/2016') . '" class="button">Štatistiky</a>'; 									
							echo '<a href="'. base_url('manager/redirectDetailEmployee/'.$modeInv.'/4/' . $id_emp.'/1/2016') . '" class="button  active">Pokuty</a>'; 															
						}echo '</div>';
					echo "<div class='vehicle_div' style='align:center; margin-top:15px; margin-bottom:0px'></div>";

					if($amercements==FALSE){
						echo "<h3>Zamestnanec absolvoval všetky inventúry na ktoré bol prihlásený.</h3>";		
					}else{
						foreach($amercements as $amercement){
							$now = date("Y-m", time());
							$date = substr($amercement->Datum_zaciatku,0,7);
							echo "<table class='postTable'>"; 
								echo "<tr>";
							echo "<td rowspan='2' style='width:62px;'>";
								echo "&nbsp";
							echo '</td>';
							echo "<td rowspan='2' style='width:50px;'>";
								if($amercement->Vyplatene==0){
									if($now==$date){
										echo "<img src='http://martinbendik.studenthosting.sk/pictures/que.png' height='20' width='20' style='margin-top:3px'>";	
									}else{
										echo "<img src='http://martinbendik.studenthosting.sk/pictures/no.png' height='20' width='20' style='margin-top:3px'>";
									}
																	 
								}else{
									echo "<img src='http://martinbendik.studenthosting.sk/pictures/yes.png' height='20' width='20' style='margin-top:3px'>";								 									
								}
							echo "</td>";
							echo "<td style='width:150px'>";
								if(($amercement->Vyplatene==0) && ($now==$date)){
								echo "<b>";
								}
								echo "ID inventúry:";
							echo "</td>";	
							echo "<td style='width:170px'>";
							if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							echo "Status:";
						echo "</td>";
						echo "<td style='width:300px'>";
							if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							echo "Zakazník:";
						echo "</td>";
						echo "<td style='width:100px'>";
						if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							echo "Absencia dňa:";
						echo "</td>";
						echo "<td rowspan='2' width='305px''>";
							
							if($now==$date){
								if(($amercement->Vyplatene==0) && ($now==$date)){
									echo '<div class="button-group" style="margin-top:4px; margin-left:30px">';
										echo '<a class="button" href="'.base_url("manager/penaltyEmployee/".$id_emp."/".$amercement->ID_REP).'">Pokutovať</a>';
									echo '</div>';
									echo "</td>";									
								}else{
									echo '<div class="button-group" style="margin-top:4px; margin-left:30px"">';
										echo '<a class="button" href="'.base_url("manager/unpenaltyEmployee/".$id_emp."/".$amercement->ID_REP).'">Zrušiť pokutu</a>';
									echo '</div>';
									echo "</td>";							
								}
									
							}else{
								echo "<p style='font-style: italic; font-size:11px'>Vyplatné pásky boli vytvorené, už nie je možné pokutovať zamestnanca.</p>";
								echo "</td>";
							}
												
					echo "</tr>";
					///////////
					echo "<tr>";
						echo "<td>";
							if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							if (strlen($amercement->ID_INV)==1) {
								echo "0000";
								echo $amercement->ID_INV;
							} elseif (strlen($amercement->ID_INV)==2) {
								echo "000";
								echo $amercement->ID_INV;
							} elseif (strlen($amercement->ID_INV)==3) {
								echo "00";
								echo $amercement->ID_INV;
							} elseif (strlen($amercement->ID_INV)==4) {
								echo "0";
								echo $amercement->ID_INV;
							} else {
								echo $amercement->ID_INV;
							}
						echo "</td>";
						echo "<td style='width:150px'>";
							if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
							 echo "Bez pokuty";
						 	}else{
							 echo "Pokutovaný: ".$amercement->Vyplatene." €";	 
							}
						echo "</td>";
						echo "<td style='width:120px'>";
						if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							echo $amercement->Nazov_spolocnosti."-".$amercement->Mesto;
						echo "</td>";
						echo "<td style='width:120px'>";
						if(($amercement->Vyplatene==0) && ($now==$date)){
							 echo "<b>";
						 	}
							echo date("d.m.Y",strtotime($amercement->Datum_zaciatku));
						echo "</td>";
					echo "</tr>";
				echo "</table>";
		echo "<div class='vehicle_div' style='align:center;'></div>";	
						}
					}
					
					
					
					 
				break;	
			}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '<div class="button-group" style="margin-left:50px;margin-top:30px;">';
	switch($modeInv){
		case 0:
			switch($modeDet){
				case 1: 
					echo '<a href="'. base_url('manager/getAllEmployees/') . '" class="button" style="margin-top:-8px">Späť</a>';  
				break;
				case 2:
					echo '<a href="'. base_url('manager/getAllEmployees/') . '" class="button" style="margin-top:5px">Späť</a>';  				 
				break;
				case 3:
					echo '<a href="'. base_url('manager/getAllEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
				case 4:
					echo '<a href="'. base_url('manager/getAllEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
			} 
		break;
		case 1:
			switch($modeDet){
				case 1: 
					echo '<a href="'. base_url('manager/getManagers/') . '" class="button" style="margin-top:-8px">Späť</a>';  
				break;
				case 2:
					echo '<a href="'. base_url('manager/getManagers/') . '" class="button" style="margin-top:5px">Späť</a>';  				 
				break;
				case 3:
					echo '<a href="'. base_url('manager/getManagers/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
				case 4:
					echo '<a href="'. base_url('manager/getManagers/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
			}  
		break;
		case 2: 
			switch($modeDet){
				case 1: 
					echo '<a href="'. base_url('manager/getLeadEmployees/') . '" class="button" style="margin-top:-8px">Späť</a>';  
				break;
				case 2:
					echo '<a href="'. base_url('manager/getLeadEmployees/') . '" class="button" style="margin-top:5px">Späť</a>';  				 
				break;
				case 3:
					echo '<a href="'. base_url('manager/getLeadEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
				case 4:
					echo '<a href="'. base_url('manager/getLeadEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
			} 
		break;
		case 3: 
			switch($modeDet){
				case 1: 
					echo '<a href="'. base_url('manager/getDrivers/') . '" class="button" style="margin-top:-8px">Späť</a>';  
				break;
				case 2:
					echo '<a href="'. base_url('manager/getDrivers/') . '" class="button" style="margin-top:5px">Späť</a>';  				 
				break;
				case 3:
					echo '<a href="'. base_url('manager/getDrivers/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
				case 4:
					echo '<a href="'. base_url('manager/getDrivers/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break ;
			}
		break;
		case 4:
			switch($modeDet){
				case 1: 
					echo '<a href="'. base_url('manager/getEmployees/') . '" class="button" style="margin-top:-8px">Späť</a>';  
				break;
				case 2:
					echo '<a href="'. base_url('manager/getEmployees/') . '" class="button" style="margin-top:5px">Späť</a>';  				 
				break;
				case 3:
					echo '<a href="'. base_url('manager/getEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
				case 4:
					echo '<a href="'. base_url('manager/getEmployees/') . '" class="button" style="margin-top:-14px">Späť</a>';  				 
				break;
			}

		break;		
	}	
echo '</div>';
	echo '</div>';	
	} else {
		redirect(base_url('main/restricted'));
	}	
?>
	


