<?php include_once APP_PATH.'admin/template/header.php';?>

<?php if ($JAK_SPECIALACCESS) { ?>
<div class="ustatus">
<a class="submenu" href="index.php?p=users&amp;sp=newuser"><?php echo $tl["menu"]["m7"];?></a>
</div>
<div class="clear"></div>
<?php } ?>

<section>

<div class="content-border">
<div class="heading_solid">
<h3><?php echo $tl["menu"]["m4"];?></h3>
</div>
<form class="jak_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<table class="table">
<tr class="content-title">
<td class="content-go">#</td>
<td class="content-go"><input type="checkbox" id="jak_delete_all" /></td>
<td><?php echo $tl["user"]["u"];?></td>
<td><?php echo $tl["user"]["u1"];?></td>
<td><?php echo $tl["user"]["u2"];?></td>
<td class="content-go"><button type="submit" name="lock" id="button_lock" class="lock-button"></button></td>
<td class="content-go"></td>
<td class="content-go"><button type="submit" name="delete" id="button_delete" class="delete-button" onclick="if(!confirm('<?php echo $tl["user"]["al"];?>'))return false;"></button></td>
</tr>
<?php if (isset($JAK_USER_ALL) && is_array($JAK_USER_ALL)) foreach($JAK_USER_ALL as $v) { ?>
<tr>
<td class="content-go"><?php echo $v["id"];?></td>
<td class="content-go"><input type="checkbox" name="jak_delete_user[]" class="highlight" value="<?php echo $v["id"];?>" /></td>
<td><a href="index.php?p=users&amp;sp=edit&amp;ssp=<?php echo $v["id"];?>"><?php echo $v["name"];?></a></td>
<td><?php echo $v["email"];?></td>
<td><a href="index.php?p=users&amp;sp=edit&amp;ssp=<?php echo $v["id"];?>"><?php echo $v["username"];?></a></td>
<td class="content-go"><a href="index.php?p=users&amp;sp=lock&amp;ssp=<?php echo $v["id"];?>"><img src="img/<?php if ($v["access"] == '1') { ?>lockedno<?php } else { ?>locked<?php } ?>.png" width="14" height="16" alt="img/<?php if ($v["access"] == '0') { ?>locked<?php } else { ?>notlocked<?php } ?>" /></a></td>
<td class="content-go"><a href="index.php?p=users&amp;sp=edit&amp;ssp=<?php echo $v["id"];?>"><img src="img/edit.png" width="14" height="16" alt="edit" /></a></td>
<td class="content-go"><a href="index.php?p=users&amp;sp=delete&amp;ssp=<?php echo $v["id"];?>"><img src="img/delete.png" width="14" height="16" alt="delete" onclick="if(!confirm('<?php echo $tl["user"]["al"];?>'))return false;" /></a></td>
</tr>
<?php } ?>
</table>
</form>
</div>
	
</section>

<!-- JavaScript for select all -->
<script type="text/javascript">
		$(document).ready(function() {
		
			$("#jak_delete_all").click(function() {
			$("#button_lock").toggleClass("highlight-lock");
			$("#button_delete").toggleClass("highlight-delete");
				var checked_status = this.checked;
				$(".highlight").each(function()
				{
					this.checked = checked_status;
				});
			});
			$(".highlight").click(function() {
			$("#button_lock").addClass("highlight-lock");
			$("#button_delete").addClass("highlight-delete");
			});
					
		});
</script>

		
<?php include_once APP_PATH.'admin/template/footer.php';?>