<?php
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//sigurnost:
if (!defined('SIGURICA')) die('Nedozvoljen pristup!');
if ($prava_pristup_admin!=1) die('Nedozvoljen pristup!');
?>
<script type="text/javascript">
$(document).ready(function(){
//JQuery ready is quicker than onload
$(".stripeMe tr").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
$(".stripeMe tr:even").addClass("alt");
});
</script>
<div id="main_content">
<?php
//lista administratora
$sql99 = "select * from b7_user order by username asc";
$rez99=mysql_query($sql99,$conn);
if ($rez99) $num99=mysql_num_rows($rez99);
if ($num99>0) {
	$cur99=1;
	?>
	<table  class="stripeMe" cellpadding="5" cellspacing="1" border="0">
    <tr>
    <th>ID</th>
    <th>Username</th>
    <th>Password</th>
    <th>Ime</th>
    <th>Telefon</th>
    <th>e-mail</th>
    <th colspan="3">Akcija</th>
    </tr>
    <?php
	while ($num99>=$cur99) {
		$row99=mysql_fetch_array($rez99);	
		$id=$row99[0];
		$username=$row99[1];
		$passwd=$row99[2];
		$ime=$row99[3];
		$tel=$row99[4];
		$email=$row99[5];
		?>
        <tr>
        <td><?php echo $id; ?></td>
        <td><?php echo $username; ?></td>
        <td><?php echo $passwd; ?></td>
        <td><?php echo $ime; ?></td>
        <td><?php echo $tel; ?></td>
        <td><?php if ($email) echo '<a href="mailto:'.$email.'">'.$email.'</a>'; ?></td>
        <td><a href="glavna.php?modul=admin&amp;akcija=form_edit_admin&amp;admin_id=<?php echo $id; ?>">Uredi</a></td>
        <td><a href="glavna.php?modul=admin&amp;akcija=form_edit_prava_admin&amp;admin_id=<?php echo $id; ?>">Promjeni prava</a></td>
        <td><a href="glavna.php?modul=admin&amp;akcija=del_admin&amp;admin_id=<?php echo $id; ?>" onclick="return verify()">Obriši</a></td>
       	</tr>
        <?php
		$cur99++;
	}
	?>
    </table>
    <?php	
}
?>
</div>