<!--{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>账号</th>
			<th>密码</th>
			<th>权限</th>
			<th>最新游戏</th>
			<th>ip</th>
			<th>分数1</th>
			<th>分数2</th>
			<th>性别</th>
			<th>头像</th>
			<th>口头禅</th>
			<th>杀人留言</th>
			<th>遗言</th>
			<th>添加头衔</th>
			<th>删除头衔</th>
			<th>操作</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="无法修改" disabled="true"></td>
			<td>{$urgroup[$ur['groupid']]}</td>
			<td>第{$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><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 id="ur_$n">{$ur['username']}</td>
			<td><input type="text" name="pass_$n" size="20" maxlength="20" value=""></td>
			<td>{$urgroup[$ur['groupid']]}</td>
			<td>第{$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><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>
				<select name="addtitles_$n"
				onmousemove="$('ur_{$n}').style.cssText='background:yellow;'"
				onmouseleave= "$('ur_{$n}').style.cssText='background:#E3E3EA;'">
					<!--{loop $titles_list $nkey $ninfo}-->
						<option value="$nkey">$ninfo</option>
					<!--{/loop}-->
				</select>
			</td>
			<td>
				<select name="deltitles_$n"
				onmousemove="$('ur_{$n}').style.cssText='background:yellow;'"
				onmouseleave= "$('ur_{$n}').style.cssText='background:#E3E3EA;'">
					<!--{loop $ur['nicksrev']['nicks'] $nkey}-->
						<option value="$nkey">$titles_list[$nkey]</option>
					<!--{/loop}-->
				</select>
			</td>
			<td>
				<input type="submit" value="修改" onclick="$('urcmd').value='edit_{$n}_{$ur['uid']}'"
					onmousemove="$('ur_{$n}').style.cssText='background:yellow;'"
					onmouseleave= "$('ur_{$n}').style.cssText='background:#E3E3EA;'"
				>
			</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=16 style="text-align:center;">
				<input type="submit" name="submit" value="封停选中玩家" onclick="$('urcmd').value='ban'">
				<input type="submit" name="submit" value="解封选中玩家" onclick="$('urcmd').value='unban'">
				<input type="submit" name="submit" value="删除选中玩家" onclick="$('urcmd').value='del'">
				<!--{if $show_reverse_migration}-->
				<input type="submit" name="submit" value="反向迁移选中玩家" onclick="$('urcmd').value='reverse_migrate'" style="background-color: #FFE4B5;">
				<!--{/if}-->
			</td>
		</tr>
		<tr>
			<td colspan=2></td>
			<td colspan=12 style="text-align:center;">
				标题：
				<input type="text" name="stitle" size="6" maxlength="20" value="发放奖励">&nbsp;&nbsp;&nbsp;
				正文：
				<input type="text" name="scontent" size="20" maxlength="30" value="您获得了奖励，请查收！">&nbsp;&nbsp;&nbsp;
				附件：
				<input type="text" name="senclosure" size="20" maxlength="30" value="getqiegao_0;gettitle_0">&nbsp;&nbsp;&nbsp;
				<input type="submit" name="submit" value="发送站内邮件" onclick="$('urcmd').value='sendmessage'">
			</td>
		</tr>
		<!--{if $show_reverse_migration}-->
		<tr>
			<td colspan=2 style="background-color: #FFE4B5; font-weight: bold;">反向迁移</td>
			<td colspan=12 style="text-align:center; background-color: #FFF8DC;">
				远端用户名：
				<input type="text" name="remote_username" size="15" maxlength="30" placeholder="远端从服务器用户名">&nbsp;&nbsp;&nbsp;
				远端密码：
				<input type="password" name="master_password" size="15" maxlength="30" placeholder="远端从服务器密码">&nbsp;&nbsp;&nbsp;
				<span style="color: #8B4513; font-size: 12px;">注意：将推送选中用户的数据到远端从服务器，需要远端服务器的有效账户进行身份验证</span>
			</td>
		</tr>
		<!--{/if}-->
		<!--{/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="返回玩家帐户管理">
</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>搜索指定帐户</th>
			<th>查看帐户列表</th>
		</tr>
		<tr>
			<td>
				条件：
				<select name="checkmode">
					<option value="username" selected>用户名
					<option value="ip">用户IP
				</select>
				类似
				<input size="30" type="text" name="checkinfo" id="checkinfo" maxlength="30" />
			</td>
			<td>
				按：
				<select name="urorder">
					<option value="groupid" selected>用户所属组
					<option value="lastgame">最新游戏
					<option value="uid">用户编号
				</select>
				<select name="urorder2">
					<option value="DESC" selected>降序排列
					<option value="ASC">升序排列
				</select>
			</td>
		</tr>
		<tr>
			<td style="text-align:center;"><input style="width:100px;height:30px;" type="submit" value="搜索" onclick="$('pagecmd').value='find';"></td>
			<td style="text-align:center;"><input style="width:100px;height:30px;" type="submit" value="查看" onclick="$('pagecmd').value='check';"></td>
		</tr>
	</table>

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