<?php

	if ($this->session->userdata('permisson')==2) {		
		$CI =& get_instance();
		$CI->load->library('libraryprofile');
		$CI->libraryprofile->showMenuBarLeadEmployee($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:50px;margin-top:10px;">';
			switch($mode){
				case 1:
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/1/'.$year).'" class="button active">Mzda v hrubom</a>';				
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/2/'.$year).'" class="button">Mzda v čistom</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/4/'.$year).'" class="button">Absolvovaných inventúr</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/5/'.$year).'" class="button">Najazdených kilometrov</a>'; 
				break;
				case 2:
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/1/'.$year).'" class="button">Mzda v hrubom</a>';				
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/2/'.$year).'" class="button active">Mzda v čistom</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/4/'.$year).'" class="button">Absolvovaných inventúr</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/5/'.$year).'" class="button">Najazdených kilometrov</a>'; 
				break;
				case 3:
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/1/'.$year).'" class="button">Mzda v hrubom</a>';				
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/2/'.$year).'" class="button">Mzda v čistom</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/3/'.$year).'" class="button active">Odpracovaných hodín</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/4/'.$year).'" class="button">Absolvovaných inventúr</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/5/'.$year).'" class="button">Najazdených kilometrov</a>'; 
				break;
				case 4:
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/1/'.$year).'" class="button">Mzda v hrubom</a>';				
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/2/'.$year).'" class="button">Mzda v čistom</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/4/'.$year).'" class="button active">Absolvovaných inventúr</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/5/'.$year).'" class="button">Najazdených kilometrov</a>'; 
				break;
				case 5:
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/1/'.$year).'" class="button">Mzda v hrubom</a>';				
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/2/'.$year).'" class="button">Mzda v čistom</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/4/'.$year).'" class="button">Absolvovaných inventúr</a>';
					echo '<a href="'.base_url('statistics/redirectGraphLeadEmployee/5/'.$year).'" class="button active">Najazdených kilometrov</a>'; 
				break;	
			}				
			echo '</div>';
			
			echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year-1)).'" class="button" style="margin-right:10px;">&laquo;</a>';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year-2)).'" class="button">'.($year-2).'</a>';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year-1)).'" class="button">'.($year-1).'</a>';
				echo '<a href="" class="button active">'.$year.'</a>';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year+1)).'" class="button">'.($year+1).'</a>';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year+2)).'" class="button">'.($year+2).'</a>';
				echo '<a href="'. base_url('statistics/redirectGraphLeadEmployee/'.$mode.'/'.($year+1)).'" class="button" style="margin-left:10px;">&raquo;</a>';
			echo '</div>';
			
			echo "<div class='div_curve' style='height:370px'>";	
					echo '<div class="divForGraph">';
							drawGraphEmployee($this->session->userdata['id_zamestnanca'],$mode,$year);					
					echo '</div>';	
		
	} else {
		redirect(base_url('main/restricted'));
	}	
?>
	


