<div class="actionPanelLeft">
	<div class="actionPanelRight p16">
		<div id="actionTop">
			<form action="{FILTER_LINK}" method="POST" id="pageCounterForm">
			<table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
			<td>
				<div class="button" id="actionNew">
					<div class="buttonRight">
						<div class="buttonMiddle">{rs:ACTION_ADD} {rs:ACTION_USER}</div>
					</div>
				</div>
			</td>

			<td class="space"><div class="labelBox">{rs:COUNT_PER_PAGE}:</div></td>
			<td>
				<select name="_cp">
				{row:REC_COUNT}
				<option value="{title}" {selected}>{title}</option>
				{/row}
				</select>
			</td>
			</tr>

			<tr>
			<td width="100%"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></td>
			<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></td>
			<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></td>
			</tr>
			</table>
			</form>
		</div>
	</div>
</div>
<div class="middleLeft">
	<div class="middleRight p16">

		{ERROR}
		{MESSAGE}
		<form method="POST" id="recordsList">
		<table width="100%" cellspacing="0" cellpadding="5" border="0" class="table">
		<tr class="header">
		<td><input type="checkbox" name="all" value=""></td>
		<td><a href="{sort_by_login}" class="{sort_login_img}">{rs:LOGIN}</a></td>
		<td><a href="{sort_by_name}" class="{sort_name_img}">{rs:NAME}</a></td>
		<td><a href="{sort_by_mail}" class="{sort_mail_img}">{rs:MAIL}</a></td>
		<td colspan="2">&nbsp;</td>
		</tr>

		{row:LINE}
		<tr class="line{if:disabled} grey{/if}">
		<td><input type="checkbox" name="del[]" value="{id}"></td>
		<td class="title">{login}</td>
		<td>{name}{if:!name}&nbsp;{/if}</td>
		<td><a href="mailto:{mail}">{mail}</a></td>
		<td class="action">{unless:system_status}<a href="{global:LINK}{if:global:LINK}&{/if}{if:global:!LINK}?{/if}permission={id}">{rs:ACTION_PERMISSION}</a>{/unless}{if:system_status}{rs:ACTION_PERMISSION}{/if}</td>
		<td class="action"><a href="{global:LINK}{if:global:LINK}&{/if}{unless:global:LINK}?{/unless}edit={id}">{rs:ACTION_EDIT}</a></td>
		</tr>
		{/row}

		{if:!count}<tr><td class="emptyResult" colspan="5">{rs:EMPTY}</td></tr>{/if}

		<tr>
		<td><img src="{global:PATH}img/spacer.gif" width="20" height="1" border="0" /></td>
		<td width="20%"><img src="{global:PATH}img/spacer.gif" width="100" height="1" border="0" /></td>
		<td width="40%"><img src="{global:PATH}img/spacer.gif" width="100" height="1" border="0" /></td>
		<td width="40%"><img src="{global:PATH}img/spacer.gif" width="100" height="1" border="0" /></td>
		<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></td>
		<td><img src="{global:PATH}img/spacer.gif" width="50" height="1" border="0" /></td>
		</tr>
		</table>
		</form>
		{if:offset}<div class="offset">{offset}</div>{/if}
	</div>
</div>
<div class="actionPanelLeft">
	<div class="actionPanelRight">
		<div class="actionPanelBottom">
			<div class="actionPanelBottomLeft">
				<div class="actionPanelBottomRight p16">
					<div id="actionBottom">
						<div class="button actionDelete">
							<div class="buttonRight">
								<div class="buttonMiddle">{rs:ACTION_DEL}</div>
							</div>
						</div>
						<div class="br"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script>
	$("#pageCounterForm").find("select[name='_cp']").change(function() {
		$("#pageCounterForm").submit();
	});
	$("#actionOk").click(function() {$("#pageCounterForm").submit();});
	$("#actionNew").click(function() {window.location.href="{global:LINK}{if:LINK}&{/if}{unless:LINK}?{/unless}edit=0";});
	$(".actionDelete").click(function() {
		if (confirm("{rs:SURE_DELETE_USERS}")) $("#recordsList").submit();
	});
	$("input[name='all']").click(function() {
		$("input[name*='del']").attr('checked', this.checked);
	});
</script>
