<script language="JavaScript">
<!--
	var me = '{$smarty.server.PHP_SELF}';
	{literal}
		
	function popupUser(id) {
		window.open(me + '?op=edit&use_js=1&user_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1');
	}
	{/literal}
// -->
</script>
<table border="0" width="100%">
	<tr>
		<td valign="top">
			<b>&nbsp;{$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&user_id=0&filter={$filter}" onClick="popupUser(0); return false;">{$STRING.addnew} User</a>
			<hr size="1">
			<form>
			<div align="center">
				<select name="filter" onChange="document.location.href='{$smarty.server.PHP_SELF}?filter=' + this.options[this.selectedIndex].value">{build_select box=user_filter selected=$filter}</select> 
				<input type="submit" value="Filter">
			</div>
			</form>
			<table border="0" width="100%">
				<tr>
					<th class="{$headers.login.class}"><a href="{$headers.login.url}">Login</a></th>
					<th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th>
					<th class="{$headers.date.class}"><a href="{$headers.date.url}">Created</a></th>
					<th class="{$headers.active.class}"><a href="{$headers.active.url}">Active</a></th>
				</tr>
				{section name=user loop=$users}
				<tr{if $smarty.section.user.iteration is even} class="alt"{/if}>
					<td><a href="{$smarty.server.PHP_SELF}?op=edit&user_id={$users[user].user_id}&filter={$filter}" onClick="popupUser({$users[user].user_id}); return false;">{$users[user].login|stripslashes}</a></td>
					<td align="center">{$users[user].first_name|stripslashes} {$users[user].last_name|stripslashes}</td>
					<td align="center">{$users[user].created_date|date:DATE_FORMAT}</td>
					<td align="center">{if $users[user].active}Yes{else}No{/if}</td>
				</tr>
				{/section}
				<tr>
					<td colspan="3" align="center">
						<br>
  					{$first} - {$last} of {$total}
						<br>
						{if $pages ne "1"}[ {$pages} ]{/if}
  					<br>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
