<!--<?php
if($action=='banuser'){print <<<EOT
-->
<div style="width:450px;">
<form action="masingle.php?action=banuser&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>會員禁言</div>
<table width="100%" class="mb5 z vt">
	<tr class="tr3"><td width="70">禁言對象︰</td>
		<td>$userinfo[username]
<!--
EOT;
if($showTips){print <<<EOT
-->
<span class="s1">（該用戶為 <b>{$userLevel}</b>，
<!--
EOT;
if($otherGroups){print <<<EOT
-->
	隱含 <b>$otherGroups</b> 用戶組頭餃
<!--
EOT;
}print <<<EOT
-->
請確認是否要禁言）</span>
<!--
EOT;
}
print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言範圍︰</td>
		<td><label class="mr20"><input type="radio" name="range" value="0" checked />{$forum[$fid][name]}</label>
<!--
EOT;
if($isGM || $SYSTEM['banuser']==2){print <<<EOT
-->
				<label class="mr20"><input type="radio" name="range" value="1" />全局禁言</label>
<!--
EOT;
if ($SYSTEM[banuserip]){print <<<EOT
-->
				<label><input type="checkbox" name="banip" value="1" /> 禁止該 IP</label>
<!--
EOT;
}}print <<<EOT
-->
		</ul>
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言類型︰</td>
		<td><label class="mr20"><input type="radio" name="type" value="1" checked />定期禁言</label>
<!--
EOT;
if($isGM || $SYSTEM['bantype']){print <<<EOT
-->
			<label><input type="radio" name="type" value="2" />永久禁言</label>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言時間︰</td>
		<td><input class="input" type="text" name="limit" value="1" size="5" /> 天(最大天數<span class="s1">$pwBanMax</span>天)</td>
	</tr>
	<tr class="tr3">
		<td>刪除主題︰</td>
		<td>
			<label class="mr20"><input type="radio" name="deltopic" value="0" checked />不刪除</label>
			<label class="mr20"><input type="radio" name="deltopic" value="1" />當前主題</label>
			<label class="mr20"><input type="radio" name="deltopic" value="2" />所有主題</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知︰</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label><input type="radio" name="ifmsg" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td><p><input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" /></p>
	<!--
	EOT;
	if($db_adminreason){print <<<EOT
	-->
			<div class="mb5"><select name="" size="6" onchange="this.form.atc_content.value=this.value" style="width:320px">$reason_sel</select></div>
	<!--
	EOT;
	}print <<<EOT
	-->
		</td>
	</tr>
</table>
<input type="hidden" name="uid" value="$uid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="step" value="3" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="masingle(this.form);">提 交</button></span></span></div></form>
</div>
<script type="text/javascript">
masingle = function(fp){
	var reasion = '$SYSTEM[enterreason]';
	if(reasion == 1 && fp['atc_content'].value == ""){
		ajax.showError('請輸入操作原因！');return false;
	}
    ajax.submit(fp);
}
</script>
<!--
EOT;
}elseif($action=='banfree'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=banfree&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>會員解禁</div>
<table width="100%" class="mb5 z vt">
	<tr class="tr3"><td width="70">解禁對象︰</td>
		<td>$userinfo[username]</td>
	</tr>
	<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label><input type="radio" name="ifmsg" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>解禁理由︰</td>
		<td><textarea name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="textareaA"></textarea></td>
	</tr>
</table>
<input type="hidden" name="uid" value="$uid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="step" value="3" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='shield'){print <<<EOT
-->
<form action="masingle.php?action=$action&ajax=1" method="post">
<div style="width:450px;">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>帖子屏蔽</div>
<input type="hidden" name="verify" value="$verifyhash" />
<table width="100%" class="vt z mb5">
	<tr class="tr3">
		<td class="tar">屏蔽數量</td>
		<td>$count 篇</td>
	</tr>
	<tr class="tr3"><td class="tar">操作類型:</td>
		<td><input type="radio" name="step" value="3" checked />屏蔽
			<input type="radio" name="step" value="5" />取消屏蔽 
		</td>
	</tr>
	<tr class="tr3"><td class="tar">消息通知:</td>
		<td><input type="radio" name="ifmsg" value="1" checked />開啟
			<input type="radio" name="ifmsg" value="0" />關閉
		</td>
	</tr>
	<tr id="ok3" class="tr3">
		<td>屏蔽理由:</td>
		<td>
			<input type="text" class="input" style="width:312px;" name="atc_content" id="atc_content" onkeydown="ajax.quickpost(event,this.form)" />
			<div>
			<select onchange="this.form.atc_content.value=this.value;" style="width:320px;" size="6">
				$reason_sel
			</select>
			</div>
			<div>
				<div id="atc_content_warn" class="gray">限100字節</div>
			</div>
		</td>
	</tr>
</table>
</div>
<div class="popBottom">
<span class="btn2"><span>
<button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button>
</span></span></div>
<!--
EOT;
foreach($postdb as $value){
print <<<EOT
-->
<input type="hidden" name="selid[]" value="{$value['pid']}" />
<!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="page" value="$page" />
</form>
<script>
onReady(function(){
	initCheckTextNum('atc_content','atc_content_warn', 100);
})
</script>
<!--
EOT;
} elseif ($action == 'viewip') {print <<<EOT
-->
<div>
	<div class="p10">IP:$readdb[userip] - 來自:$readdb[ipfrom]</div>
<!--
EOT;
	if (in_array($readdb['userip'], $bannedIps)) {print <<<EOT
-->
	<div class="popBottom">此IP已禁止<a href="javascript:" onclick="sendmsg('masingle.php?action=banuserip&fid=$fid&tid=$tid&pid=$pid&ajax=1&restore=1', '');return false;" class="s4">[恢復]</a></div>
<!--
EOT;
	} else {print <<<EOT
-->
	<div class="popBottom"><a href="javascript:" onclick="sendmsg('masingle.php?action=banuserip&fid=$fid&tid=$tid&pid=$pid&ajax=1', '');return false;" class="s4">[禁止此IP]</a></div>
<!--
EOT;
	}print <<<EOT
-->
</div>
<!--
EOT;
}elseif($action=='banuserip'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=banuserip&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="step" value="3" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>禁止ip</div>
<table width="100" class="mb5 vt z">
	<tr class="tr3"><td width="70">用戶名:</td>
<!--
EOT;
if($readdb['anonymous'] && !$isGM && !pwRights($isBM,'anonyhide')){ print <<<EOT
-->
		<td>$db_anonymousname</td>
<!--
EOT;
}else{ print <<<EOT
-->
		<td>$readdb[username]</td>
<!--
EOT;
} print <<<EOT
-->
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
			<div><select style="width:320px;" onchange="this.form.atc_content.value=this.value" size="6">
				{$reason_sel}
			</select></div>
		</td>
	</tr>
</table>
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='bansignature'){ print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=bansignature&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>禁止帖子簽名</div>
<table width="100" class="mb5 vt z">
	<tr class="tr3"><td width="70">操作對象:</td>
<!--
EOT;
if($readdb['anonymous'] && !$isGM && !pwRights($isBM,'anonyhide')){ print <<<EOT
-->
		<td>$db_anonymousname</td>
<!--
EOT;
}else{ print <<<EOT
-->
		<td>$readdb[username]</td>
<!--
EOT;
} print <<<EOT
-->
	</tr>
	<tr class="tr3">
		<td>禁止類型:</td>
		<td><label class="mr20"><input type="radio" name="step" value="3" $check_Y />禁止</label>
			<label><input type="radio" name="step" value="5" $check_N />解除</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知:</td>
		<td><label class="mr20"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label><input type="radio" name="ifmsg" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
			<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='remind'){ print <<<EOT
-->
<form action="masingle.php?action=$action&ajax=1" method="post">
<div style="width:450px;">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>帖子提醒</div>
<input type="hidden" name="verify" value="$verifyhash" />
<table width="100%" class="vt z mb5">
	<tr class="tr3">
		<td class="tar">提醒數量</td>
		<td>$count 篇</td>
	</tr>
	<tr class="tr3"><td class="tar">操作類型:</td>
		<td><input type="radio" name="step" value="3" checked />提醒
			<input type="radio" name="step" value="5" />取消提醒
		</td>
	</tr>
	<tr class="tr3"><td class="tar">消息通知:</td>
		<td><input type="radio" name="ifmsg" value="1" checked />開啟
			<input type="radio" name="ifmsg" value="0" />關閉
		</td>
	</tr>
	<tr id="ok3" class="tr3">
		<td>提醒理由:</td>
		<td>
			<input type="text" class="input" style="width:312px;" name="atc_content" id="atc_content" onkeydown="ajax.quickpost(event,this.form)" />
			<div class="mb5">
			<select onchange="this.form.atc_content.value=this.value;" style="width:320px;" size="6" class="mb5">
				$reason_sel
			</select>
			</div>
			<div>
				
				<div id="atc_content_warn" class="gray">限100字節</div>
			</div>
		</td>
	</tr>
</table>
</div>
<div class="popBottom">
<span class="btn2"><span>
<button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button>
</span></span></div>
<!--
EOT;
foreach($postdb as $value){
print <<<EOT
-->
<input type="hidden" name="selid[]" value="{$value['pid']}" />
<!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="page" value="$page" />
</form>
<script>
onReady(function(){
	initCheckTextNum('atc_content','atc_content_warn', 100);
})
</script>
<!--
EOT;
}elseif($action=='split'){print <<<EOT
-->
<form action="masingle.php?action=split&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="step" value="3" />
<!--
EOT;
foreach($selid as $key=>$val){print <<<EOT
-->
<input type="hidden" name="selid[]" value="$val" />
<!--
EOT;
}print <<<EOT
-->
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>拆分操作</div>
<script>
function splitds() {
	var val = document.getElementsByName('splittype');
	var type;
	for(var i = 0; i< val.length; i++){
     if(val[i].checked){
      	if (val[i].value== 1){ 
	  		type = 1;
	 	 }else {
		 	type = 0;
		 }
	  }
    }
	var stitle = document.getElementById('splittitle');
	var sid = document.getElementById('splitid');
	if(type == 1){
		stitle.style.display = 'none';
		sid.style.display = '';
	}else{
		stitle.style.display = '';
		sid.style.display = 'none';
	}

}
</script>
<table width="100%" class="vt z">
	<tr class="tr3"><td width="70">拆分數量</td><td>$splitNum 篇</td></tr>
<tr class="tr3">
	<td width="80">拆分目標:</td>
	<td><input name="splittype" onclick="splitds()" type="radio" checked="checked" value="0" />新帖&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input name="splittype" onclick="splitds()" type="radio" value="1" />合並到帖子
	</td>
</tr>
<tr class="tr3" id="splittitle">
	<td width="80">新帖標題:</td>
	<td><input name="splittitle" class="input" size="50" />
	</td>
</tr>
<tr class="tr3" id="splitid" style="display:none;">
	<td width="80">帖子ID:</td>
	<td><input name="splitid" class="input" size="10" />
	</td>
</tr>
<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label><input type="radio" name="ifmsg" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3"><td>操作原因::</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
		<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='delatc'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=delatc&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="step" value="3" />
<!--
EOT;
foreach($threaddb as $key=>$val){print <<<EOT
-->
<input type="hidden" name="selid[]" value="$val[pid]" />
<!--
EOT;
}print <<<EOT
-->
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>刪除回復操作</div>
<table width="100%" class="mb5 vt z">
	<tr class="tr3"><td width="70">刪除數量:</td><td>$count 篇</td></tr>
	<tr class="tr3">
		<td>扣除積分:</td>
		<td>
			<label class="mr20"><input type="radio" name="ifdel" value="1" checked />開啟</label>
			<label><input type="radio" name="ifdel" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label><input type="radio" name="ifmsg" value="0" />關閉</label>
		</td>
	</tr>
	<tr class="tr3"><td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" class="input" style="width:312px;" onkeydown="ajax.quickpost(event,this.form)" />
		<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='pingcp'){print <<<EOT
--><div style="width:580px;">
<form action="masingle.php?action=$action&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="rpage" value="$rpage" />
<input type="hidden" name="step" value="2" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">關閉</span>評分記錄管理</div>
<div>
<table width="100%" class="mb5 vt z">
	<tr class="tr3 s4">
		<td width="30">選擇</td>
		<td width="90">操作者</td>
		<td width="70">積分情況</td>
		<td width="23%">評分時間</td>
		<td>評分理由</td>
	</tr>
<script>
function cutStrContent(obj){
	if(strlen(getObj(obj).value) > 100 ) {
		getObj(obj).value = substr(getObj(obj).value,100);
		alert ('評分理由請不要超過100字節');
	}
}

</script>
<!--
EOT;
foreach($pingdb as $val){print<<<EOT
-->
	<tr class="tr3">
		<td><input type="checkbox" name="selid[]" value="$val[id]"></td>
		<td>$val[pinger]</td>
		<td>$val[name] $val[point]</td>
		<td>$val[pingdate]</td>
		<td title="雙擊修改評分記錄" ondblclick="editrecord('$val[id]')"><span id="ping_$val[id]">$val[record]</span><span id="edit_$val[id]" style="display:none"><input type="text" class="input input_wa" id="editbox_$val[id]" value="$val[record]" onchange="cutStrContent(this.id);" onkeyup="cutStrContent(this.id);" onkeydown="cutStrContent(this.id);"> <img title="保存" alt="保存" onclick="savePingLog('$val[id]');" src="$imgpath/post/c_editor/save.gif" style="cursor:pointer;" align="absmiddle"></span></td>
	</tr>
<!--
EOT;
}print<<<EOT
-->
</table>
<div class="cc" style="padding:5px 0 10px 10px;">$pages</div>
</div>
<div class="popBottom">
	<span class="fl"><input type="checkbox" onclick="CheckAll(this.form)" />全選</span>
	<span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,marked);">刪 除</button></span></span>
</div>
</form>
<script id="ajax_viewpinglist">
function editrecord(id) {
	var r = getObj('ping_' + id);
	if (r.style.display == 'none') {
		return;
	}
	r.style.display = 'none';
	getObj('edit_' + id).style.display = '';
}
function savePingLog(id) {
	var record = getObj('editbox_' + id).value; 
	ajax.send('pw_ajax.php?action=savepinglog&id=' + id + '&record=' + record, '', function() {
		var rText = ajax.request.responseText;
		if (rText == 'success') {
			getObj('ping_' + id).innerHTML = record;
			getObj('ping_' + id).style.display = '';
			getObj('edit_' + id).style.display = 'none';
		} else {
			ajax.guide();
		}
	});
}
function ajaxViewPingcp(href) {
	ajax.send(href + '&ajax=1', '', ajax.get);
	return false;
}
</script>
</div>
<!--
EOT;
} elseif ($action == 'inspect') {
if ($iftypeavailable == 1) {print <<<EOT
-->
	<tr class="tr3"><td>後續操作:</td>
		<td><label><input type="checkbox" name="nextto" value="type">&nbsp;轉移主題分類</label></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div>
</form>
</div>
<!--
EOT;
}?>-->