<!--<?php print <<<EOT
-->
<div id="breadCrumb">
		<img align="absmiddle" src="$imgpath/wind/thread/home.gif" alt="forumlist" class="breadHome" /><em class="breadEm"></em><a href="$db_bfn_temp" title="$db_bbsname">$db_bbsname</a><em>&gt;</em><!--
EOT;
if($action=='del'){print <<<EOT
-->
				刪除文章
<!--
EOT;
}elseif($action=='move'){print <<<EOT
-->
				移動文章
<!--
EOT;
}elseif($action=='copy'){print <<<EOT
-->
				復制文章
<!--
EOT;
}elseif($action=='headtopic'){print <<<EOT
-->
				文章置頂操作
<!--
EOT;
}elseif($action=='digest'){print <<<EOT
-->
				文章精華操作
<!--
EOT;
}elseif($action=='type'){print <<<EOT
-->
				文章分類管理
<!--
EOT;
}elseif($action=='check'){print <<<EOT
-->
				文章審核管理
<!--
EOT;
}elseif($action=='lock'){print <<<EOT
-->
				文章鎖定操作
<!--
EOT;
}elseif($action=='pushtopic'){print <<<EOT
-->
				提前文章
<!--
EOT;
}elseif($action=='edit'){print <<<EOT
-->
				加亮文章標題操作
<!--
EOT;
}elseif($action=='unite'){print <<<EOT
-->
				主題合並操作
<!--
EOT;
}elseif($action=='downtopic'){print <<<EOT
-->
				壓帖操作
<!--
EOT;
}elseif($action == 'push'){print <<<EOT
-->
				推送操作
<!--
EOT;
}elseif($action == 'banuser'){print <<<EOT
-->
				禁言
<!--
EOT;
}elseif($action == 'commend'){print <<<EOT
-->
				版主推薦
<!--
EOT;
}elseif($action == 'multioverprint'){print <<<EOT
-->
				印戳
<!--
EOT;
}print<<<EOT
-->
</div>
<style type="text/css">
.tr3 td,.tr3 th,.tr2 td,.tr2 th{padding-left:10px;}
</style>
<div id="pw_content" class="mb10">
<!--
EOT;
if ($action == 'move' || $action == 'copy') { 
print <<<EOT
-->
<form name="form1" method="post" onsubmit="if(checkThreadCatesType()){return ajax_mawhole(this)};return false;" action="mawhole.php?{$viewbbs}">
<!--
EOT;
} else { 
print <<<EOT
-->
<form name="form1" method="post" action="mawhole.php?{$viewbbs}" onsubmit="return ajax_mawhole(this);">
<!--
EOT;
} print <<<EOT
-->
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="fid"    value="$fid" />
<input type="hidden" name="step"   value="2" />
<input type="hidden" name="ajax"   value="1" />
<!--
EOT;
if($threaddb){print <<<EOT
-->
<div class="t" style="margin-bottom:-1px;">
<div class="h"><!--
EOT;
if($action=='del'){print <<<EOT
-->
				刪除文章
<!--
EOT;
}elseif($action=='move'){print <<<EOT
-->
				移動文章
<!--
EOT;
}elseif($action=='copy'){print <<<EOT
-->
				復制文章
<!--
EOT;
}elseif($action=='headtopic'){print <<<EOT
-->
				文章置頂操作
<!--
EOT;
}elseif($action=='digest'){print <<<EOT
-->
				文章精華操作
<!--
EOT;
}elseif($action=='type'){print <<<EOT
-->
				文章分類管理
<!--
EOT;
}elseif($action=='check'){print <<<EOT
-->
				文章審核管理
<!--
EOT;
}elseif($action=='lock'){print <<<EOT
-->
				文章鎖定操作
<!--
EOT;
}elseif($action=='pushtopic'){print <<<EOT
-->
				提前文章
<!--
EOT;
}elseif($action=='edit'){print <<<EOT
-->
				加亮文章標題操作
<!--
EOT;
}elseif($action=='unite'){print <<<EOT
-->
				主題合並操作
<!--
EOT;
}elseif($action=='downtopic'){print <<<EOT
-->
				壓帖操作
<!--
EOT;
}elseif($action == 'push'){print <<<EOT
-->
				推送操作
<!--
EOT;
}print<<<EOT
--></div>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2">
		<td width="5%">ID</td>
		<td>標題</td>
		<td width="15%">版塊</td>
		<td width="15%">作者</td>
		<td width="8%">回復</td>
		<td width="15%">發表時間</td>
	</tr>
<!--
EOT;
$id=0;
foreach($threaddb as $key=>$val){
$id++;
print <<<EOT
-->
	<tr class="tr3">
		<td><input type="checkbox" style="margin:0;padding:0;" name="tidarray[]" value="$val[tid]" checked /></td>
		<td>
			<a href="read.php?tid=$val[tid]" target="_blank" class="s4">$val[subject]</a>
		</td>
		<td>
			<div style="line-height:18px;height:18px;overflow:hidden;"><a href="thread.php?fid=$val[fid]" target="_blank" title="{$forum[$val[fid]][name]}">{$forum[$val[fid]][name]}</a></div>
		</td>
		<td>
<!--
EOT;
if($val['anonymous'] && !$isGM && !pwRights($isBM,'anonyhide')){ print <<<EOT
-->
			$db_anonymousname
<!--
EOT;
}else{ print <<<EOT
-->
			<a href="u.php?username=$val[author]" target="_blank">$val[author]</a>
<!--
EOT;
} print <<<EOT
-->
		</td>
		<td>$val[replies]</td>
		<td>$val[date]</td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<!--
EOT;
}print <<<EOT
-->
<div class="t">
<script type="text/javascript" src="js/date.js"></script>
<div class="h">管理選項:</div>
<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
if($action=='headtopic'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">管理選項:
<script type="text/javascript">
	function changeForums(toptype,self,tright){
		var seldiv = getObj('forumsDiv');
		if (toptype == 0) {
			seldiv.style.display = 'none';
			return;
		}else{
			seldiv.style.display = '';
			var defaultSelF = getObj('defaultSelForums');
			var selForums = new Array();
			var selForumsIndexs = new Array();
			defaultSelF.value = '';
			var selectedForums = '';
			if(toptype==1){
				selForumsIndexs = JSONParse('$top_1_index');
				selForums = JSONParse('$top_1');
			}else if(toptype==2){
				selForumsIndexs = JSONParse('$top_2_index');
				selForums = JSONParse('$top_2');
			}else if(toptype==3){
				selForumsIndexs = JSONParse('$top_3_index');
				selForums = JSONParse('$top_3');
			}
			selectedForums = getAllIndexFromArray(selForums,toptype);
			if(tright == 4 && toptype!=3){
				selForumsIndexs = JSONParse('$top_3_index');
				selForums = JSONParse('$top_3');
			}
			var selObj = getObj('selForums');
			selObj.options.length=0;
			selObj.onchange = selectAllForums;
			var option = new Option(htmlDecode('全選'),'all');
			selObj.options.add(option);
			for (var temp in selForumsIndexs) {
				var _index = selForumsIndexs[temp];
				defaultSelF.value += temp + ',';
				var option = new Option(htmlDecode(selForums[_index]),_index);
				if(self){
					option.selected = getSelected(_index,self);
				}else{
					option.selected = getSelected(_index,selectedForums);
				}
				if(selForums[_index].match("&gt;&gt;")){
					option.disabled = true;
					option.selected = false;
				}
				selObj.options.add(option);
			}
		}
	}

	function getAllIndexFromArray(arg1,type){
		var indexs = ',';
		for (var temp in arg1) {
			if(type == 1){
				indexs += temp + ',';
				break;
			}else{
				indexs += temp + ',';
			}
		}
		return indexs;
	}

	function getSelected(current,forums){
		var selected = '';
		if((forums && forums.match(","+current+","))){
			selected = 'selected';
		}else{
			selected = '';
		}
		return selected;
	}

	function htmlDecode (str){
	 	var div = document.createElement("div");
	 	div.innerHTML = str;
		return document.all?div.innerText:div.textContent;
	}

	function selectAllForums(){
		var options = this.options;
		if(this.value == 'all'){
			options[this.selectedIndex].selected = false;
			for (var i = 0 ; i < options.length; i++) {
				if(options[i].text.match('>>')){
					options[i].selected = false;
				}else{
					options[i].selected = true;
				}
			}
			options[this.selectedIndex].selected = false;
		}
	}
	
	checkform = function(obj){
	    var el = obj.topped;
	    var flag = false;
	    for(var i=0; i<el.length; i++){
	    	if(el[i].checked){
	    		flag = true;break;
	    	}
	    }
	    if(flag == false){
	        showDialog({type:'error',message:'請選擇管理選項'});
	        return false;
	    };   
	    return true;
	}
</script>
		</th>
<!--
EOT;
$_tight = pwRights($isBM,'topped');
print <<<EOT
-->
		<th>
			<label class="mr10"><input type="radio" name="topped" value="0" $topped_0 onclick="changeForums(this.value,'$selforums','$_tight')"/> 取消置頂</label>
			<label class="mr10"><input type="radio" name="topped" value="1" $topped_1 onclick="changeForums(this.value,'$selforums','$_tight')"/> 版塊置頂</label>

<!--
EOT;
if(!$isGM && pwRights($isBM,'topped')==2){
print <<<EOT
-->
			<label class="mr10"><input type="radio" name="topped" value="2" $topped_2 onclick="changeForums(this.value,'$selforums','$_tight')"/> 分類置頂</label>
<!--
EOT;
} elseif($isGM || pwRights($isBM,'topped')==3 || pwRights($isBM,'topped')==4){
print <<<EOT
-->
			<label class="mr10"><input type="radio" name="topped" value="2" $topped_2 onclick="changeForums(this.value,'$selforums','$_tight')"/> 分類置頂</label>
			<label class="mr10"><input type="radio" name="topped" value="3" $topped_3 onclick="changeForums(this.value,'$selforums','$_tight')"/> 全局置頂</label>
<!--
EOT;
}if($isKmd){
print <<<EOT
--><br><span class="s1">孔明燈帖，置頂後孔明燈效果將消失</span>
<!--
EOT;
}print <<<EOT
-->
		</th>
	</tr>
	<tr class="tr3 vt" id="forumsDiv" style="display: none">
		<th width="80">選擇置頂版塊:</th>
		<th>
			<input type="hidden" value="" name="defaultSelForums" id="defaultSelForums"/>
			<select multiple="multiple" size='10' name="selForums[]" id="selForums" style="min-width: 300px; vertical-align:top;"></select>
			<span class="gray">按Ctrl可多選</span>
		</th>
	</tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('headtopic')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<label class="mr10"><input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳</label>
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<script type="text/javascript">
changeForums('$deftopped','$selforums','$_tight');
</script>
    <tr class="tr3">
    	<th width="80">到期時間:</th>
    	<th><input class="input" type="text" name="timelimit" size="16" id="timelimit" value="$timelimit" onclick="ShowCalendar(this.id,1);" /></th></tr>
<!--
EOT;
}elseif($action=='digest'){print <<<EOT
-->
	<tr class="tr3">
	<th width="80">管理選項:
<script type="text/javascript">
    checkform = function(obj){
        var el = obj.digest;
        var flag = false;
        for(var i=0; i<el.length; i++){
            if(el[i].checked){
                flag = true;break;
            }
        }
        if(flag == false){
            showDialog({type:'error',message:'請選擇管理選項'});
            return false;
        };   
        return true;
    }
</script>
	</th>
	<th>
		<label class="mr10"><input type="radio" name="digest" value="0" $digest_0 />取消精華</label>
		<label class="mr10"><input type="radio" name="digest" value="1" $digest_1 />精華I</label>
		<label class="mr10"><input type="radio" name="digest" value="2" $digest_2 />精華II</label>
	</th>
	</tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('digest')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<label><input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳</label>
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
}elseif($action=='lock'){print <<<EOT
-->
	<tr class="tr3">
	<th width="80">管理選項:
<script type="text/javascript">
	checkform = function(obj){
        var el = obj.locked;
        var flag = false;
        for(var i=0; i<el.length; i++){
        	if(el[i].checked){
        		flag = true;break;
        	}
        }
        if(flag == false){
            showDialog({type:'error',message:'請選擇管理選項'});
            return false;
        };   
        return true;
	}
</script>
	</th>
	<th>
	<label class="mr10"><input type="radio" name="locked" value="0" $lock_0 />解除鎖定</label>
	<label class="mr10"><input type="radio" name="locked" value="1" $lock_1 />鎖定</label>
	<label class="mr10"><input type="radio" name="locked" value="2" $lock_2 />關閉主題</label>
	</th>
	</tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('lock')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<label><input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳</label>
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
}elseif($action=='pushtopic'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">提前時間:</th>
		<th><input type="text" class="input" size="3" name="pushtime" value="0" /> 小時
<!--
EOT;
if($pushtime_top){print <<<EOT
-->
		{$pushtime_top}小時以內
<!--
EOT;
}print <<<EOT
-->
		 </th>
	</tr>
	<tr class="tr3">
		<th width="80">管理選項:</th>
		<th>提前帖子</th>
	</tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('pushtopic')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<label><input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳</label>
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
}elseif($action=='downtopic'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">壓後時間:</th>
		<th><input type="text" class="input" name="timelimit" value="24" /> (時)</th>
	</tr>
	<tr class="tr3">
		<th width="80">允許上浮:</th>
		<th>
			<label class="mr10"><input type="radio" name="ifpush" value="0" $lock_0 />開啟</label>
			<label class="mr10"><input type="radio" name="ifpush" value="1" $lock_1 />關閉</label></th>
	</tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('downtopic')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<label class="mr10"><input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳</label>
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
}elseif($action=='type'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">選擇主題分類:</th>
		<th>
<!--
EOT;
if ($t_sub_exits == 1) {print <<<EOT
-->
		<select name="type" onchange="getSubType(this.value)";><option value="">不分類</option>
<!--
EOT;
} else {print <<<EOT
-->
		<select name="type">
		<option value="">不分類</option>
<!--
EOT;
}
foreach($t_typedb as $key=>$value){
if($value){print <<<EOT
-->
			<option value="$key">$value[name]</option>
<!--
EOT;
}}print <<<EOT
-->
		</select>
<!--
EOT;
if ($t_sub_exits == 1) {print <<<EOT
-->
		<select name="subtype" id="subtype" style="width:75px"><option value="">不分類</option></select>
<!--
EOT;
}print <<<EOT
-->
<script type="text/javascript">
function getSubType(id){
	var options = '<option value=\"0\">不分類</option>';
	var t_subtypedb = JSONParse('$t_subtypedb');
	for (var temp in t_subtypedb) {
		if (temp == id) {
			for (var temp2 in t_subtypedb[temp]) {
				options += '<option value=\"'+temp2+'\">'+t_subtypedb[temp][temp2]+'</option>';
			}
		}
	}
	getObj('subtype').innerHTML = options;
}

function getSubType(id){
	selobj = getObj('subtype');
	var t_subtypedb = JSONParse('$t_subtypedb');
	for (var temp in t_subtypedb){
		if (temp == id) {
			for (var temp2 in t_subtypedb[temp]) {
				selobj.options.add(new Option(t_subtypedb[temp][temp2],temp2));
			}
		}
	}
}
</script>
		</th>
	</tr>
<!--
EOT;
}elseif($action=='move' || $action=='copy'){print <<<EOT
-->
	<tr class="tr3">
	<td>
<div id="move_isforce" style="display:none; margin:5px; padding:5px; padding-left:20px; width:90%; height:15px; background-color:#FFFFCC; border:#CCCCCC solid 1px; color:#FF0000;">
	<b>提示︰目的版塊限制必須選擇主題分類</b>
</div>
<script type="text/javascript">
checkform = function(){
    return true;
}
</script>
</td>
</tr>
	<tr class="tr3">
		<th width="80">選擇目的版塊:</th>
		<th><select name="to_id" id="to_id" onchange="getThreadCates(this.value)">$forumcache
<!--
EOT;
if($forumadd){print <<<EOT
-->
			<option value="">>> 隱藏版塊</option>$forumadd
<!--
EOT;
}if(trim($cmscache)){print <<<EOT
-->
			<option value=""></option>
			<option value="">文章分類</option>$cmscache
<!--
EOT;
}print <<<EOT
-->
		</select></th>
	</tr>
	<tr class="tr3">
		<th width="80">主題分類:</th>
		<th><div id="innerselect" class="fl"><select name="to_threadcate" id="to_threadcate" onchange="getSubType(this.value)">
		<option value="">無主題分類</option>
		</select></div><div id="subtypeselect" ></div>
<script type="text/javascript">
//檢測是否需要強制主題分類
function checkThreadCatesType() {
	var type = document.getElementById('to_id').value;
	var threadcate = document.getElementById('to_threadcate').value;
	var typedb = '$t_typedb';
	var forum_temp = JSONParse('$forum_temp');
	if(typedb == "") {
		if(type in forum_temp){
			if(forum_temp[type] == 0) {
				//ajax.showError("目的版塊不能是分類");
				showDialog('error', '請選擇目的版塊');
				return false;
			}	
		}
		return true;
	}else{
		var t_typedb = JSONParse(typedb);
		if(type in t_typedb){
			if(t_typedb[type][0] == 2) {
				if(threadcate == 0) {
					//ajax.showError("請選擇主題分類");
					showDialog('error', '請選擇主題分類');
					return false;
				}else{
					return true;
				}
			}else{
				return true;	
			}
		} else {
			if(forum_temp[type]==0){
				//ajax.showError("目的版塊不能是分類");
				showDialog('error', '請選擇目的版塊');
				return false;
			}else{
				return true;
			}
		}
	}
}
function getThreadCates(fid){
	var selobj = getObj('to_threadcate');
	selobj.options.length=0;
	selobj.options.add(new Option("不分類","0"));
	var typedb='$t_typedb';
	if(typedb&&typedb!=""){
		var t_typedb = JSONParse(typedb);
		for (var temp in t_typedb) {
			if (temp == fid) {
				for (var temp2 in t_typedb[temp]) {
					if(temp2 != 0) {
						selobj.options.add(new Option(t_typedb[temp][temp2],temp2));
					}
				}
			}
		}
	}
	//getObj('to_threadcate').appendChild(selobj);
	getObj('subtypeselect').innerHTML = '';
}

function getSubType(id){
	var ishave = 0;
	var fid = getObj('to_id').value;
	var selobj = elementBind('select');
	selobj.setAttribute('name','to_subtype');
	selobj.options.add(new Option("不分類","0"));
	var t_subtypedb = JSONParse('$t_subtypedb');
	for (var temp in t_subtypedb) {
		if (temp == fid) {
			for (var temp2 in t_subtypedb[temp]) {
				if (temp2 == id) {
					for (var temp3 in t_subtypedb[temp][temp2]) {
						ishave++;
						selobj.options.add(new Option(t_subtypedb[temp][temp2][temp3],temp3));
					}
				}
			}
		}
	}
	if (ishave > 0) {
		getObj('subtypeselect').innerHTML = '';
		getObj('subtypeselect').appendChild(selobj);
	} else {
		getObj('subtypeselect').innerHTML = '';
	}
}
</script>
		</th>
	</tr>
<!--
EOT;
}elseif($action=='edit'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">管理選項:
<script type="text/javascript" src="js/color_picker.js"></script>
		</th>
		<th>
			<div class="pwnew tac">
				<span title="粗體字"><a onclick="styleOnclick(this,'title2')" class="$stylename[1]">加粗</a></span>
				<span title="斜體字"><a onclick="styleOnclick(this,'title3')" class="$stylename[2]">斜體</a></span>
				<span title="下劃線"><a onclick="styleOnclick(this,'title4')" class="$stylename[3]">下劃線</a></span>
				<span id="color_show" title="點擊取消顏色" onclick="colorCancel()"></span>
				<span title="顏色選擇"><a class="two tal" onclick="showColorPicker(this,document.form1.title1,function(){pickReback('',color_picker)})"><img src="$imgpath/pickcolor.gif"  /></a></span>
				<input id="title1" name="title1" type="hidden" value="$titlecolor" />
				<input id="title2" name="title2" type="hidden" value="{$titledetail[1]}" />
				<input id="title3" name="title3" type="hidden" value="{$titledetail[2]}" />
				<input id="title4" name="title4" type="hidden" value="{$titledetail[3]}" />
			</div>
		</th>
	</tr>
	<tr class="tr3"><th width="80">有效時間:</th>
	<th><input class="input" type="text" name="timelimit" size="4" /> 天</th></tr>
<!--
EOT;
if($forumset['overprint'] && ($isGM || pwRights($isBM,'overprint')==1 ) && checkRelated('headlight')){
print <<<EOT
-->
<tr class="tr3">
<td width="80">印戳設置:</td>
	<td>
		<input type="checkbox" name="overprint" value="1"  /> 同時顯示印戳
	</td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
}elseif($action=='del'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">扣除積分:</th>
		<th>
			<input value="{$jumptype}" name="jumptype" type="hidden" />
			<label class="mr10"><input type="radio" name="ifdel" value="1" checked />開啟</label>
			<label class="mr10"><input type="radio" name="ifdel" value="0" />關閉</label>
		</th>
	</tr>
<!--
EOT;
}elseif($action=='unite'){print <<<EOT
-->
	<tr class="tr3">
		<th width="80">合並帖子:</th>
		<th>
<!--
EOT;
if($unitetype == 'from'){print <<<EOT
-->
		<input class="input input_wa mr5" type="text" name="unitetid" /> (輸入來源帖子的tid,多個用“,”分開)
<!--
EOT;
} else{print <<<EOT
-->
		<input class="input input_wa mr5" type="text" name="unitetid" /> (輸入來源帖子的tid,多個用“,”分開)
<!--
EOT;
}print <<<EOT
-->
		<input type="hidden" name="unitetype" value="$unitetype" />
		</th>
	</tr>
<!--
EOT;
}elseif($action == 'push'){print<<<EOT
-->
<tr class="tr3">
	<th width="80">推送位置:</th>
	<th><b>{$pushs[$pushto][name]}</b></th>
</tr>
<!--
EOT;
if($params[title]){print<<<EOT
-->
<tr class="tr3">
	<th width="80">標題:</th>
	<th><input type="text" class="input input_wb" name="subject" value="$subject" /></th>
</tr>
<!--
EOT;
}if($params[url]){print<<<EOT
-->
<tr class="tr3">
	<th width="80">鏈接:</th>
	<th><input type="text" class="input input_wb" name="url" value="$url"/></th>
</tr>
<!--
EOT;
}if($params[image]){print<<<EOT
-->
<!--
EOT;
if($imgdb){print<<<EOT
-->
<tr class="tr3">
	<th width="80">圖片選擇</th>
	<th>
<!--
EOT;
$i = 0;
foreach($imgdb as $key => $value){
$checked = $i == 0 ? 'checked' : '';$i++;
print<<<EOT
-->
	<input type="radio" name="attachurl" value="$key" $checked><img src="$value" style="width:80px;height:80px;">
<!--
EOT;
}print<<<EOT
-->
	</th>
</tr>
<!--
EOT;
}print<<<EOT
-->
<tr class="tr3">
	<th width="80">自定義圖片:</th>
	<th><input class="input" size="3" type="text" name="cimgurl" /> ((如果設置自定義圖片地址，以自定義圖片為準))</th>
</tr>
<!--
EOT;
}if($params[value]){print<<<EOT
-->
<tr class="tr3 vt">
	<th width="80">摘要:</th>
	<th><textarea name="content" value="$content" class="textareaA" />$content</textarea></th>
</tr>
<!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="oldsubject" value="$subject" />
<input type="hidden" name="postdate" value="$postdate" />
<input type="hidden" name="author" value="$author" />
<input type="hidden" name="pushto" value="$pushto" />
<!--
EOT;
} elseif ($action == 'banuser') {
$usernames = implode(',', $userInfo);
$relation = '';
foreach ($relations as $key => $value) {
	$relation .= $relation ? ",$key:$value" : "$key:$value";
}
print <<<EOT
-->
<tr class="tr3">
	<th width="80">禁言對象:</th>
	<th>{$usernames}</th>
</tr>
<tr class="tr3">
	<th width="80">禁言範圍︰</th>
	<th>
		<label class="mr20"><input type="radio" name="range" value="0" checked />{$forum[$fid][name]}</label>
<!--
EOT;
if($isGM || $SYSTEM['banuser']){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
-->
	</th>
</tr>
<tr class="tr3">
	<th width="80">禁言類型:</th>
	<th>
		<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
-->
	</th>
</tr>
<tr class="tr3">
	<th width="80">禁言時間:</th>
	<th><input class="input" type="text" name="limit" value="1" size="5" /> 天(最大天數<span class="s1">$pwBanMax</span>天)</th>
</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>
<input type="hidden" name="relation" value="$relation" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="step" value="3" />
	</td>
</tr>
<!--
EOT;
} elseif ($action == 'multioverprint') {
print <<<EOT
-->
$overPrintContent
<input type="hidden" name="oid" id="oid" />
<script type="text/javascript">
function setOid(obj,oid) {
	if (!oid) return false;
	var divObj = getObj('odiv');
	var aElements = divObj.getElementsByTagName('a');
	for (var i=0;i<aElements.length;i++) {
		aElements[i].className = '';
	}
	obj.className = 'current';
	getObj('oid').value = oid;
}
</script>
<!--
EOT;
}
if ($action != 'multioverprint') {
print <<<EOT
-->
	<tr class="tr3">
		<th width="80">消息通知:</th>
		<th>
			<label class="mr10"><input type="radio" name="ifmsg" value="1" checked />開啟</label>
			<label class="mr10"><input type="radio" name="ifmsg" value="0" />關閉</label>
		</th>
	</tr>
	<tr class="tr3 vt">
		<th width="80">操作原因:</th>
		<th><input type="text" class="input mb10" style="width:312px;" name="atc_content" />
<!--
EOT;
if($db_adminreason){print <<<EOT
-->
			<p><select size="6" style="width:320px;" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></p>
<!--
EOT;
}print <<<EOT
-->
		</th>
	</tr>
<!--
EOT;
}print <<<EOT
-->
	<tr><td>&nbsp;</td><td style="padding:.5em 7px;">
<!--
EOT;
if(($action=='edit' || $action=='digest' || $action=='headtopic' || $action=='pushtopic') && $seltid){
${$action.'_N'}="disabled";
print <<<EOT
-->
<input type="radio" name="nextto" value="digest" $digest_N />精華
<input type="radio" name="nextto" value="headtopic" $headtopic_N />置頂
<input type="radio" name="nextto" value="edit" $edit_N />加亮
<input type="radio" name="nextto" value="pushtopic" $pushtopic_N />提前
<input type="radio" name="nextto" value="" checked />無
<!--
EOT;
} print <<<EOT
-->
<span class="btn2"><span><button type="submit">提 交</button></span></span><span class="bt2"><span><button type="button" onclick="javascript:history.go(-1)">返 回</button></span></span>
	</td></tr>
</table></div>
</form>
</div>
<script type="text/javascript" src="js/pw_post.js"></script>
<script type="text/javascript">
var action = '$action';
function ajax_mawhole(obj){
	if(typeof checkform == 'function'){
		return checkform(obj);
	}
	var dbreason = '$SYSTEM[enterreason]';
	var cbox = obj['tidarray[]'];
	var flag = false;
	if(cbox.length == undefined){
		if(cbox.checked){
			flag = true;
		}
	};
	if(cbox.length > 1){
		for(var i=0; i<cbox.length; i++){
			if(cbox[i].checked){
				flag = true;
				break;
			}
			
		}
	}	
	if(flag == false){
		showDialog({message:'請選擇要操作的帖子！',autoHide:3});
		return false;
	}
	if (dbreason == 1 && action != 'multioverprint' && obj.atc_content.value == ''){
		showDialog({message:'請輸入操作原因！',autoHide:3});
		return false;
	}
	return true;
}
</script>
<!--
EOT;
?>-->
