<?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('graph_helper');
				
		echo '<div id="default_container">';
			echo '<div class="button-group" style="margin-left:20px;margin-top:10px;">';
				switch($modeType){
					case 1: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/1/'.$modeSta."/".$year) . '" class="button active">Spolu</a>';						
						echo '<a href="'. base_url('statistics/redirectGraphDriver/2/'.$modeSta."/".$year) . '" class="button">Vodič</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/3/'.$modeSta."/".$year) . '" class="button">Zamestnanec</a>';
					break;
					case 2: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/1/'.$modeSta."/".$year) . '" class="button">Spolu</a>';						
						echo '<a href="'. base_url('statistics/redirectGraphDriver/2/'.$modeSta."/".$year) . '" class="button active">Vodič</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/3/'.$modeSta."/".$year) . '" class="button">Zamestnanec</a>';
					break;
					case 3: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/1/'.$modeSta."/".$year) . '" class="button">Spolu</a>';						
						echo '<a href="'. base_url('statistics/redirectGraphDriver/2/'.$modeSta."/".$year) . '" class="button">Vodič</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/3/'.$modeSta."/".$year) . '" class="button active">Zamestnanec</a>';
					break;
				}
				echo '</div>';
			echo '<div class="button-group" style="margin-left:20px;margin-top:10px;">';
				switch($modeSta){
					case 1: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/1/'.$year) . '" class="button active">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/2/'.$year) . '" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/3/'.$year) . '" class="button">Odpracované hodiny</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/4/'.$year) . '" class="button">Absolvované inventúry</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/5/'.$year) . '" class="button">Najazdených kilometrov</a>';
					break;
					case 2: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/1/'.$year) . '" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/2/'.$year) . '" class="button active">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/3/'.$year) . '" class="button">Odpracované hodiny</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/4/'.$year) . '" class="button">Absolvované inventúry</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/5/'.$year) . '" class="button">Najazdených kilometrov</a>';
					break;
					case 3: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/1/'.$year) . '" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/2/'.$year) . '" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/3/'.$year) . '" class="button active">Odpracované hodiny</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/4/'.$year) . '" class="button">Absolvované inventúry</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/5/'.$year) . '" class="button">Najazdených kilometrov</a>';
					break;
					case 4: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/1/'.$year) . '" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/2/'.$year) . '" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/3/'.$year) . '" class="button">Odpracované hodiny</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/4/'.$year) . '" class="button active">Absolvované inventúry</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/5/'.$year) . '" class="button">Najazdených kilometrov</a>';
					break;
					case 5: 
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/1/'.$year) . '" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/2/'.$year) . '" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/3/'.$year) . '" class="button">Odpracované hodiny</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/4/'.$year) . '" class="button">Absolvované inventúry</a>';
						echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/5/'.$year) . '" class="button active">Najazdených kilometrov</a>';
					break;					
				}
				echo '</div>';
				echo '<div class="button-group" style="margin-left:20px;margin-top:10px;">';		
					echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/'.$modeSta.'/'.($year-1)).'" class="button" style="margin-right:10px;">&laquo;</a>';
					echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/'.$modeSta.'/'.($year-1)).'" class="button">'.($year-1).'</a>';
					echo '<a href="" class="button active">'.$year.'</a>';
					echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/'.$modeSta.'/'.($year+1)).'" class="button">'.($year+1).'</a>';
					echo '<a href="'. base_url('statistics/redirectGraphDriver/'.$modeType.'/'.$modeSta.'/'.($year+1)).'" class="button" style="margin-left:10px;">&raquo;</a>';
				echo '</div>';
				echo "<div class='div_curve' style='height:370px'>";
				echo '<div class="divForGraph">';
				switch($modeType){
					case 1:						
						drawGraphEmployee($this->session->userdata['id_zamestnanca'],$modeSta,$year);										 
					break;
					case 2:
						drawGraphDriverAsDriver($this->session->userdata['id_zamestnanca'],$modeSta,$year);	 
					break;
					case 3:
						drawGraphDriverAsEmployee($this->session->userdata['id_zamestnanca'],$modeSta,$year); 
					break;
				}
			echo '</div>';
		echo '</div>';
		

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

	
	
	


