<form method="post" name="gmlist" onsubmit="admin.php">
	<input type="hidden" id="mode" name="mode" value="gmlist">
	<input type="hidden" id="command" name="command" value="">
	<input type="hidden" id="adminuid" name="adminuid" value="">
	<table class="admin">
		<tr>
			<th>UID</th>
			<th width="250px">Accounts</th>
			<th>Permission</th>
			<th>Actions</th>
		</tr>
		<!--{loop $gmdata $n $gm}-->
		<tr>
			<td>{$gm['uid']}</td>
			<td>{$gm['username']}</td>	
			<td>
				<!--{if $gm['groupid'] >= $mygroup}-->
				<span class="red">$gm['groupid']</span>
				<!--{else}-->
				<select name="{$gm['uid']}_group">
					<!--{loop Array(2,3,4,5,6,7,8,9) $i}-->
						<option value="$i" <!--{if $gm['groupid'] == $i}-->selected="true"<!--{/if}-->>$i</option>
					<!--{/loop}-->
				</select>
				<!--{/if}-->
			</td>		
			<td>
			<input type="submit" value="EDIT" <!--{if $gm['groupid'] >= $mygroup}-->disabled="true"<!--{/if}--> onclick="$('command').value='edit';$('adminuid').value='$gm['uid']';">
			<input type="submit" value="REMOVE" <!--{if $gm['groupid'] >= $mygroup}-->disabled="true"<!--{/if}--> onclick="$('command').value='del';$('adminuid').value='$gm['uid']';">
			</td>
		</tr>
		<!--{/loop}-->
		<tr>
			<td>Add</td>
			<td><input type="text" name="addname" value="" size="30" maxlength="15"></td>	
			<td>
				<select name="addgroup">
					<option value="2" selected="true">2</option>
					<!--{loop Array(3,4,5,6,7,8,9) $i}-->
					<option value="$i">$i</option>
					<!--{/loop}-->
				</select>
			</td>
			<td><input type="submit" value="ADD" onclick="$('command').value='add'"></td>
		</tr>
	</table>
</form>
