<?php
	if ($this->session->userdata('permisson')==4) {
		$CI =& get_instance();
		$CI->load->library('libraryprofile');
		$CI->libraryprofile->showMenuBarEmployee($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/redirectGraphEmployee/1/'.$year).'" class="button active">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/2/'.$year).'" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/4/'.$year).'" class="button">Počet inventúr</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/5/'.$year).'" class="button">Počet kilometrov</a>'; 
					break;
					case 2: 
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/1/'.$year).'" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/2/'.$year).'" class="button active">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/4/'.$year).'" class="button">Počet inventúr</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/5/'.$year).'" class="button">Počet kilometrov</a>'; 
					break;
					case 3:
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/1/'.$year).'" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/2/'.$year).'" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/3/'.$year).'" class="button active">Odpracovaných hodín</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/4/'.$year).'" class="button">Počet inventúr</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/5/'.$year).'" class="button">Počet kilometrov</a>'; 					 
					break;
					case 4: 
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/1/'.$year).'" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/2/'.$year).'" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/4/'.$year).'" class="button active">Počet inventúr</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/5/'.$year).'" class="button">Počet kilometrov</a>'; 					
					break;
					case 5:
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/1/'.$year).'" class="button">Mzdy v hrubom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/2/'.$year).'" class="button">Mzdy v čistom</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/3/'.$year).'" class="button">Odpracovaných hodín</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/4/'.$year).'" class="button">Počet inventúr</a>';
						echo '<a href="'. base_url('statistics/redirectGraphEmployee/5/'.$year).'" class="button active">Počet kilometrov</a>'; 					 
					break;
				}
							
			echo '</div>';
			echo '<div class="button-group" style="margin-left:50px;margin-top:10px;">';
				echo '<a href="'. base_url('statistics/redirectGraphEmployee/'.$mode.'/'.($year-1)).'" class="button" style="margin-right:10px;">&laquo;</a>';
				echo '<a href="" class="button">'.($year-2).'</a>';
				echo '<a href="" class="button">'.($year-1).'</a>';
				echo '<a href="" class="button active">'.$year.'</a>';
				echo '<a href="" class="button">'.($year+1).'</a>';
				echo '<a href="" class="button">'.($year+2).'</a>';
				echo '<a href="'. base_url('statistics/redirectGraphEmployee/'.$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'));
	}		
?>


