<?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('manager_helper');
		echo '<div id="default_container" style="padding-right: ">';
			if($post->Vyriesil==NULL){
				echo "<h3><img src='http://martinbendik.studenthosting.sk/pictures/que.png' height='20' width='20' style='margin-right:15px; margin-bottom:-4px'>Detail hlásenia</h3>";
			}else{
				echo "<h3><img src='http://martinbendik.studenthosting.sk/pictures/yes.png' height='20' width='20' style='margin-right:15px; margin-bottom:-4px'>Detail hlásenia</h3>";				
			}	
				echo "<table style='margin-left:50px;margin-top:15px'>";
					echo "<tr height='25px'>";
						echo "<td width='200px'>";
							echo "<b>Identifikačné číslo: </b>";
						echo "</td>";
						echo "<td>";
							if (strlen($post->ID_HLA)==1) {
								echo "0000";
								echo $post->ID_HLA;
							} elseif (strlen($post->ID_HLA)==2) {
								echo "000";
								echo $post->ID_HLA;
							} elseif (strlen($post->ID_HLA)==3) {
								echo "00";
								echo $post->ID_HLA;
							} elseif (strlen($post->ID_HLA)==4) {
								echo "0";
								echo $post->ID_HLA;
							} else {
								echo $post->ID_HLA;
							}
						echo "</td>";
					echo "</tr>";
					echo "<tr  height='25px'>";
						echo "<td>";
							echo "<b>Hlásenie podal: </b>";
						echo "</td>";
						echo "<td>";
							echo getEmployeeName($post->ID_ZAM);
						echo "</td>";
					echo "</tr>";
					echo "<tr height='25px'>";
						echo "<td>";
							echo "<b>Dátum a čas podania: </b>";
						echo "</td>";
						echo "<td>";
							echo $post->Datum_podania;
						echo "</td>";
					echo "</tr>";
					echo "<tr height='25px'>";
						echo "<td>";
							echo "<b>Predmet </b>";
						echo "</td>";
						echo "<td>";
							echo $post->Predmet;
						echo "</td>";
					echo "</tr>";
					echo "<tr height='25px'>";
						echo "<td>";
							echo "<b>Hlásenie: </b>";
						echo "</td>";
						echo "<td>";
							echo $post->Hlasenie;
						echo "</td>";
					echo "</tr>";
					if($post->Vyriesil==NULL){
						
					}else{
					echo "<tr height='25px'>";
						echo "<td>";
							echo "<b>Vyriešil: </b>";
						echo "</td>";
						echo "<td>";
							echo getEmployeeName($post->Vyriesil);
						echo "</td>";
					echo "</tr>";
					echo "<tr height='25px'>";
						echo "<td>";
							echo "<b>Dátum a čas vyriešenia: </b>";
						echo "</td>";
						echo "<td>";
							echo date('d.m.Y h:i', strtotime($post->Datum_vyriesenia));
						echo "</td>";
					echo "</tr>";
					}
				echo "</table>";
					echo "<div class='vehicle_div' style='align:center;margin-top:15px'></div>";
							
					echo '<div class="button-group" style="margin-top:15px;margin-left:50px">';
						echo '<a href="'.base_url('manager/redirectPosts').'" class="button">Späť</a>';
						if($post->Vyriesil==NULL){
						echo '<a class="button" href="'.base_url('manager/setPostAsDone/'.$post->ID_HLA).'">Potvrdiť vyriešenie</a>';
						}
					echo '</div>';
		echo '</div>';	
	} else {
		redirect(base_url('main/restricted'));
	}	
?>

	
	



