<!--<?php
include_once PrintEot('left');
${'current' . $action} = 'class="current"';
$adminitem == 'viewban' && $currentviewban = 'class="current"';
print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li $currentbanuser><a href="$basename&adminitem=banuser&action=banuser">手動禁言</a></li>
      <li $currentautoban><a href="$basename&adminitem=banuser&action=autoban">自動禁言</a></li>
      <li $currentfreeuser><a href="$basename&adminitem=banuser&action=freeuser">解除禁言</a></li>
      <li $currentviewban><a href="$basename&adminitem=viewban">查看禁言</a></li>
    </ul>
</div>
<!--
EOT;
if ($adminitem == 'banuser') {
print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend"><ol>
	<li><span class="xia">自動禁言</span>:自動禁言在管理員給會員評分時起作用<br />如:後台設定{$db_rvrcname}小于 0 時自動禁言 1 天，那麼當管理員扣除會員的{$db_rvrcname}至小于 0 時，則該會員就會被自動禁言 1 天</li>
	<li><span class="xia">禁言用戶</span>:禁言單個用戶，輸入用戶名，選擇禁言類型和期限完成禁言</li>
	<li><span class="xia">解除禁言</span>:輸入用戶名，解除用戶的禁言</li>
	<li><font color=blue>強制禁言</font>:使用此功能禁言用戶同時將禁言該用戶的其他帳號的發表權限</li></ol>
	<br />注:此功能可有效控制某些用戶使用多個帳號破壞站點秩序</div>
</div>
<!--
EOT;
} else {
print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">禁言用戶列表，管理員可使用此功能解除禁言用戶</div>
</div>
<!--
EOT;
}
if ($adminitem == 'banuser' && $action == 'banuser') {
print <<<EOT
-->
<form action="$basename&adminitem=$adminitem" method=post>
<h2 class="h1"><b>會員禁言</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">用戶名</td>
		<td class="td2"><input type="text" class="input" size=20 maxlength=15 name="username" value="$username" /></td>
	</tr>
    <tr class="tr1 vt">
		<td class="td1">uid</td>
		<td class="td2"><input type="text" class="input" size=20 maxlength=15 name="userid" value="$userid" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">類型</td>
		<td class="td2">
			<ul class="list_A">
				<li><input type=radio name="type" value=1 checked="checked" />定期禁言</li>
				<li><input type=radio name="type" value=2 />永久禁言(不需要設定禁言期限)</li>
				<li><input type=radio name="type" value=3 />強制禁言</li>
			</ul>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">禁言期限[天]</td>
		<td class="td2"><input type="text" class="input input_wa"  name='limit' /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">禁言理由</td>
		<td class="td2"><textarea class="textarea" name="ban_reason"></textarea></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<input type="hidden" name="step" value=2 />
<input type="hidden" name="action" value='banuser' />
</form>
<!--
EOT;
} elseif ($adminitem == 'banuser' && $action == 'autoban') {
print <<<EOT
-->
<form action="$basename&adminitem=$adminitem" method=post>
<input type="hidden" name="action" value="autoban">
<input type="hidden" name="step" value=2 />
<h2 class="h1"><b>自動禁言設置</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">自動禁言</td>
		<td class="td2">
			<ul class="list_A list_80 cc">
				<li><input type=radio name=ban[autoban] value=1 $autoban_Y />開啟</li>
				<li><input type=radio name=ban[autoban] value=0 $autoban_N />關閉</li>
			</ul>
		</td>
		<td class="td2"><div class="help_a">開啟後，自動禁言生效</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">積分依據</td>
		<td class="td2">
			<select name=ban[banby]>
				<option value=1 $select[1]>發帖</option>
				<option value=2 $select[2]>{$db_rvrcname}</option>
				<option value=3 $select[3]>{$db_moneyname}</option>
			</select>
		</td>
	    <td class="td2"><div class="help_a">與 <b>積分小于</b> 聯合使用，是指當此類型的積分小于下方的設定值時，會被自動禁言</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">類型</td>
		<td class="td2">
			<ul class="list_A ">
				<li><input type=radio name=ban[bantype] value=1 $bantype_1 />定期禁言</li>
				<li><input type=radio name=ban[bantype] value=2 $bantype_2 />永久禁言(不需要設定禁言期限)</li>
			</ul>
		</td>
		<td class="td2"><div class="help_a">可以設定的禁言類型</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">禁言期限[天]</td>
		<td class="td2"><input type="text" class="input input_wa"  name='ban[banlimit]' value='$db_banlimit' /></td>
		<td class="td2"><div class="help_a"></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">積分小于</td>
		<td class="td2"><input type="text" class="input input_wa" name='ban[banmax]' value='$db_banmax' /></td>
		<td class="td2"><div class="help_a">設定禁言的積分上限值</div></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
} elseif ($adminitem == 'banuser' && $action == 'freeuser') {
print <<<EOT
-->
<form action="$basename&adminitem=$adminitem" method=post>
<h2 class="h1"><b>解除禁言</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">用戶名</td>
		<td class="td2"><input type="text" class="input input_wa" maxlength="15" name="username" /></td>
	</tr>
    <tr class="tr1 vt">
		<td class="td1">uid</td>
		<td class="td2"><input type="text" class="input input_wa" maxlength="15" name="userid" /></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<input type=hidden name=action value='freeuser' />
<input type="hidden" name="step" value=2 />
</form>
<!--
EOT;
} elseif ($adminitem == 'viewban') {
print <<<EOT
-->
<form action="$basename&adminitem=$adminitem" method="post">
<script type="text/javascript" src="js/date.js"></script>
<h2 class="h1">搜索</h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td2" width="150">禁言類型:
			<select name="bantype">
				<option value="">全部類型</option>
				<option value="1">定期禁言</option>
				<option value="2">永久禁言</option>
				<option value="3">強制禁言</option>
			</select>
		</td>
		<td class="td2" width="135">用戶名:
			<input type="text" class="input input_wc" name="banuser" />
		</td>
        <td class="td2" width="135">uid:
			<input type="text" class="input input_wc" name="banuseruid" />
		</td>
		<td class="td2" width="135">管理員:
			<input type="text" class="input input_wc" name="adminban" />
		</td>
		<td class="td2" width="260">禁言時間:
			<input type="text" class="input input_wc" id="starttime" name="starttime" onClick="javascript:ShowCalendar(this.id)" /> -
			<input type="text" class="input input_wc" id="endtime" name="endtime" onClick="javascript:ShowCalendar(this.id)" />
		</td>
		<td class="td2"><span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span></td>
	</tr>
</table>
</div>
</form>

<form action="$basename&adminitem=$adminitem" method="post">
<input type="hidden" name="action" value="freeban">
<h2 class="h1">禁言用戶</h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 td_bgB">
		<td width="24">ID</td>
		<td width="80">用戶名</td>
        <td width="60">uid</td>
		<td width="60">禁言範圍</td>
		<td width="60">禁言類型</td>
		<td width="110">禁言時間</td>
		<td width="50">禁言天數</td>
		<td width="50">管理員</td>
		<td>禁言原因</td>
		<td width="35">解禁?</td>
	</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($bandb as $ban){
$num++;
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2">$num</td>
		<td class="td2"><a href="u.php?username={$ban[username]}" target="_blank">$ban[username]</a></td>
        <td class="td2">$ban[uid]</td>
		<td class="td2">
<!--
EOT;
if($ban['fid']){print <<<EOT
-->
			<a href="thread.php?fid=$ban[fid]">{$forum[$ban[fid]][name]}</a>
<!--
EOT;
}else{print <<<EOT
-->
			全局禁言
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2">
<!--
EOT;
if($ban['type']==1){print <<<EOT
-->
			定期禁言
<!--
EOT;
}elseif($ban['type']==2){print <<<EOT
-->
			永久禁言
<!--
EOT;
}elseif($ban['type']==3){print <<<EOT
-->
			強制禁言
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2">$ban[date]</td>
		<td class="td2">$ban[days]</td>
		<td class="td2">$ban[admin]</td>
		<td class="td2"><p class="lh_18" title="$ban[reason]">$ban[reason]</p></td>
		<td class="td2">&nbsp;<input type="checkbox" name="free[]" value="$ban[uid]" onclick="pwJsCheck(this)" /></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">$pages</div>
<div class="tac mb10">
	<span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 選</button></span></span>
	<span class="btn"><span><button type="submit" name="hello">提 交</button></span></span>
</div>
</form>
<!--
EOT;
}
include_once PrintEot('adminbottom');
?>
-->