<?php
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//za sigurnost
if (!defined('SIGURICA')) die();



$sql="select * from lvl3 where vidljivost='1' order by opis_lvl1 asc, opis_lvl2 asc, opis_lvl3 asc";
$rez99=mysql_query($sql,$conn); 
$num99=mysql_num_rows($rez99);


?>
<style type="text/css">

#main_content table {
	border-collapse: collapse;
	margin: 24px;
}
#main_content th {
	background: #c2d9ee;
	color: #000;
	font-weight: bold;
	padding: 6px;
	text-align: left;
	border-right: 1px solid #fff;
	line-height: 1.2;
	font-family:Verdana, Geneva, sans-serif;
	font-size:12px;
}
#main_content td {
	border-bottom: 1px solid #95bce2;
	border-right: 1px solid #fff;
	vertical-align: top;
}
#main_content td {
	padding: 5px;
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
}

#main_content td a {font-weight:normal; text-decoration:underline; color:#06C;
}
#main_content td a:hover {	color:#333;}

#main_content tr.alt td {
	background: #efefef;
}

#main_content tr.over td {
	background: #fff;
}
#main_content a.gray_normal {text-decoration:none; color:#999; font-weight:normal;}
#main_content a.gray_normal:hover {color:#333;}
</style>

<div id="main_content">
<?php
if ($num99>0) {
	$cur99=1;
	?>
	<table id="tableID" cellpadding="5" cellspacing="2" border="0">
    <tr>
    <?php
	echo '<th colspan="2">Akcija</th>'."\n";
	echo '<th>nivo 3</th>'."\n";
	echo '<th>Arhinet</th>'."\n";
	echo '<th>nivo 2</th>'."\n";
	echo '<th>nivo 1</th>'."\n";
	?> 
    </tr>
    <?php
	while ($num99>=$cur99) {
		$row99=mysql_fetch_array($rez99);	
		
		$id_lvl3=$row99['id_lvl3'];
		$opis_lvl3=$row99['opis_lvl3'];
		$id_lvl2=$row99['id_lvl2'];
		$opis_lvl2=$row99['opis_lvl2'];
		$id_lvl1=$row99['id_lvl1'];
		$opis_lvl1=$row99['opis_lvl1'];
		$arhinet=$row99['arhinet'];

		?>
		<tr>
		<?php
		//uređivanje
		echo '<td><a href="glavna.php?modul=fondovi&amp;akcija=lokacije_promjeni_stroj&amp;data_id='.$id_lvl3.'">Uređivanje</a></td>'."\n";
		
	
		//brisanje
		if ($user_dozvola_brisanje==1) {
			echo '<td><a href="glavna.php?modul=fondovi&amp;akcija=lokacije_obrisi_stroj&amp;data_id='.$id_lvl3.'" onclick="return verify()">Obriši</a></td>'."\n";
		} else {
			echo '<td>&nbsp;</td>'."\n";	
		}
		
		if ($arhinet) {
			echo '<td>'.$opis_lvl3.'</td><td><a href="'.$arhinet.'" target="_blank">'.$arhinet.'</a></td>'."\n";
		} else {
			echo '<td>'.$opis_lvl3.'</td><td>&nbsp;</td>'."\n";
		}
		
		echo '<td>'.$opis_lvl2.'</td>'."\n";
		echo '<td>'.$opis_lvl1.'</td>'."\n";
		
		
		
		?> 
       	</tr>
        <?php
		$cur99++;
	}
	?>
    </table>
    <?php
}
?>
</div>