<!--{if $urcmd == 'list'}-->
<form method="post" name="urpage" onsubmit="admin.php">
	<input type="hidden" name="mode" value="urlist">
	<input type="hidden" id="urcmd" name="urcmd" value="list">
	<!--{if $pagecmd=='check'}-->
		<input type="hidden" name="pagecmd" value="check">
		<input type="hidden" name="urorder" value="$urorder">
		<input type="hidden" name="urorder2" value="$urorder2">
	<!--{elseif $pagecmd=='find'}-->
		<input type="hidden" name="pagecmd" value="find">
		<input type="hidden" name="checkinfo" value="$checkinfo">
		<input type="hidden" name="checkmode" value="$checkmode">
	<!--{/if}-->
	<input type="hidden" name="start" value="$start">
	<input type="hidden" id="pagemode" name="pagemode" value="">
	<input type="submit" value="上一页" onclick="$('pagemode').value='up';">
	<span class="yellow">$resultinfo</span>
	<input type="submit" value="下一页" onclick="$('pagemode').value='down';">
	<!--{if $urdata}-->
	<table class="admin">
		<tr>
			<th></th>
			<th>ACCOUNT</th>
			<th>PASSWORD</th>
			<th>PERMISSION</th>
			<th>NEWEST ROUND</th>
			<th>ip</th>
			<th>SCORE 1</th>
			<th>SCORE 2</th>
			<th>Gender</th>
			<th>Avatar</th>
			<th>Club</th>
			<th>Achievement</th>
			<th>Titles</th>
			<th>Comment</th>
			<th>Kill Note</th>
			<th>Last Note</th>
			<th>Operations</th>
		</tr>
		<!--{if $urdata}-->
		<!--{loop $urdata $n $ur}-->
		<tr>
			<!--{if $ur['groupid']>$mygroup}-->
			<td><input type="checkbox" id="user_$n" name="user_$n" value="{$ur['uid']}" disabled="true"></td>
			<td>{$ur['username']}</td>
			<td><input type="text" name="pass_$n" size="20" maxlength="20" value="CANNOT EDIT" disabled="true"></td>
			<td>{$urgroup[$ur['groupid']]}</td>
			<td>ROUND {$ur['lastgame']}</td>
			<td>{$ur['ip']}</td>
			<td><input type="text" name="credits_$n" size="6" maxlength="10" value="$ur['credits']" disabled="true"></td>
			<td><input type="text" name="credits2_$n" size="6" maxlength="10" value="$ur['credits2']" disabled="true"></td>
			<td>
				<select name="gender_$n" disabled="true">
					<option value="0" <!--{if $ur['gender']==0}-->selected<!--{/if}-->>$ursex['0']
					<option value="m" <!--{if $ur['gender']=='m'}-->selected<!--{/if}-->>$ursex['m']
					<option value="f" <!--{if $ur['gender']=='f'}-->selected<!--{/if}-->>$ursex['f']
				</select>
			</td>
			<td><input type="text" name="icon_$n" size="2" maxlength="2" value="$ur['icon']" disabled="true"></td>
			<td>{$clubinfo[$ur['club']]}</td>
			<td><input type="text" name="achievement_$n" size="20" maxlength="400" value="$ur['achievement']" disabled="true"></td>
			<td><input type="text" name="nicks_$n" size="20" maxlength="300" value="$ur['nicks']" disabled="true"></td>
			<td><input type="text" name="motto_$n" size="20" maxlength="60" value="$ur['motto']" disabled="true"></td>
			<td><input type="text" name="killmsg_$n" size="20" maxlength="20" value="$ur['killmsg']" disabled="true"></td>
			<td><input type="text" name="lastword_$n" size="20" maxlength="20" value="$ur['lastword']" disabled="true"></td>
			<td>
				<input type="submit" value="修改" disabled="true">
			</td>
			<!--{else}-->
			<td><input type="checkbox" id="user_$n"  name="user_$n" value="{$ur['uid']}"></td>
			<td>{$ur['username']}</td>
			<td><input type="text" name="pass_$n" size="20" maxlength="20" value=""></td>
			<td>{$urgroup[$ur['groupid']]}</td>
			<td>ROUND {$ur['lastgame']}</td>
			<td>{$ur['ip']}</td>
			<td><input type="text" name="credits_$n" size="6" maxlength="10" value="$ur['credits']"></td>
			<td><input type="text" name="credits2_$n" size="6" maxlength="10" value="$ur['credits2']"></td>
			<td>
				<select name="gender_$n">
					<option value="0" <!--{if $ur['gender']==0}-->selected<!--{/if}-->>$ursex['0']
					<option value="m" <!--{if $ur['gender']=='m'}-->selected<!--{/if}-->>$ursex['m']
					<option value="f" <!--{if $ur['gender']=='f'}-->selected<!--{/if}-->>$ursex['f']
				</select>
			</td>
			<td><input type="text" name="icon_$n" size="2" maxlength="2" value="$ur['icon']"></td>
			<td>{$clubinfo[$ur['club']]}</td>
			<td><input type="text" name="achievement_$n" size="20" maxlength="400" value="$ur['achievement']"></td>
			<td><input type="text" name="nicks_$n" size="20" maxlength="300" value="$ur['nicks']"></td>
			<td><input type="text" name="motto_$n" size="20" maxlength="60" value="$ur['motto']"></td>
			<td><input type="text" name="killmsg_$n" size="20" maxlength="60" value="$ur['killmsg']"></td>
			<td><input type="text" name="lastword_$n" size="20" maxlength="60" value="$ur['lastword']"></td>
			<td>
				<input type="submit" value="修改" onclick="$('urcmd').value='edit_{$n}_{$ur['uid']}'">
			</td>
			<!--{/if}-->
		</tr>
		<!--{/loop}-->
		<tr>
			<td colspan=2><input type="checkbox" name="user_all" onchange="for(i=0; i<=$n;i++){if(! $('user_'+i).disabled){if(this.checked==true){$('user_'+i).checked=true}else{$('user_'+i).checked=false}}}">全选</td>
			<td colspan=12 style="text-align:center;">
				<input type="submit" name="submit" value="BAN PLAYER" onclick="$('urcmd').value='ban'">
				<input type="submit" name="submit" value="UNBAN PLAYER" onclick="$('urcmd').value='unban'">
				<input type="submit" name="submit" value="DELETE PLAYER" onclick="$('urcmd').value='del'">
			</td>
		</tr>
		<!--{/if}-->
	</table>
	
	<!--{/if}-->
</form>
<form method="post" name="backtolist" onsubmit="admin.php">
	<input type="hidden" name="mode" value="urlist">
	<input type="hidden" name="command" value="">
	<input type="submit" name="submit" value="Back to Account Management">
</form>
<!--{else}-->
<form method="post" name="urlist" onsubmit="admin.php">
	<input type="hidden" name="mode" value="urlist">
	<input type="hidden" name="pagecmd" id="pagecmd" value="">
	<input type="hidden" name="urcmd" value="list">
	<table class="admin">
		<tr>
			<th>Search Account</th>
			<th>Browse Account</th>
		</tr>
		<tr>
			<td>
				Search：
				<select name="checkmode">
					<option value="username" selected>Username
					<option value="ip">User IP
				</select>
				LIKE
				<input size="30" type="text" name="checkinfo" id="checkinfo" maxlength="30" />
			</td>
			<td>
				As of：
				<select name="urorder">
					<option value="groupid" selected>Usergroup
					<option value="lastgame">Last Round
					<option value="uid">UID
				</select>
				<select name="urorder2">
					<option value="DESC" selected>DESC
					<option value="ASC">ASC
				</select>
			</td>
		</tr>
		<tr>
			<td style="text-align:center;"><input style="width:100px;height:30px;" type="submit" value="SEARCH" onclick="$('pagecmd').value='find';"></td>
			<td style="text-align:center;"><input style="width:100px;height:30px;" type="submit" value="EDIT" onclick="$('pagecmd').value='check';"></td>
		</tr>
	</table>

</form>
<!--{/if}-->