<!--<?php
include_once PrintEot('left');
if (empty($action)) {print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li class="current"><a href="$admin_file?adminjob=setforum&adminitem=setforum">版塊管理</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=uniteforum">版塊合並</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=forumsell">版塊出售記錄</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=creathtm">生成靜態文件</a></li>
	</ul>
</div>
<h2 class="h1">快捷操作</h2>
<div class="admin_table mb10">
    <table cellspacing="0" cellpadding="0" width="100%">
        <tr class="tr1 vt">
            <td class="td2"><ul><li>說明:可以添加新分類，新版塊</li></ul></td>
        </tr>
        <tr class="tr1 vt">
            <td class="td2">
                <form action="$basename&" method="post">
                <input class="" type="hidden" name="action" value="addforum" />
                <input type="hidden" name="forumtype" value="category" />
                <b>添加新分類</b>&nbsp;新分類名稱
                <input type="text" class="input_wa input mr10" name="name" />
                <span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span>
                </form>
            </td>
        </tr>
        <tr class="tr1 vt">
            <td class="td2">
                <form action="$basename&" method="post" id="forum_form">
                <input type="hidden" name="action" value="addforum" />
                <input type="hidden" name="step" value="2" />
                <input type="hidden" name="addtype" value="1" />
                <b>添加新版塊</b>&nbsp;新版塊名稱&nbsp;<input type="text" class="input input_wa mr10" name="name[]">
                選擇父版塊&nbsp;
                <select name="fup" class="select_wa">$fup_forumcache</select> <input type="checkbox" name="ifsave" value="1" />
                繼承父版塊設置
                <span class="bt2"><span><button type="submit" value="提 交">提交</button></span></span>
                </form>
            </td>
        </tr>
    </table>
</div>
<div class="search tar mb10">
    <span class="linka">版塊搜索&nbsp;<input class="input input_wa" name="forumname" id="forumname">
    	<span class="bt2">
        	<span><button type="button" value="搜索" onclick="searchForum();">搜索</button></span>
        </span>
    </span>
</div>
<div id="searchForumSelection" class="searchDown" style="display:none;">
</div>
<h2 class="h1"><span  class="mr10">編輯版塊</span> <span class="linka"><a onclick="setall('open');" href="javascript:;">全部展開</a> | <a onclick="setall('close');" href="javascript:;">全部關閉</a></span></h2>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="editforum" />
<div class="admin_table mb10">
<table id="ftable" cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr2">
        <td>[順序]版塊名稱</td>
        <td width="160">版主</td>
        <td>操作</td>
    </tr>
<!--
EOT;
foreach ($catedb as $cate) {
$tmpStyle = $threaddb[$cate['fid']] ? 'expand expand_b' : 'expand expand_d';
print <<<EOT
-->
	<tr class="vt tr1" onmouseover="showAdd('$cate[fid]')" onmouseout="hiddenAdd('$cate[fid]')">
		<td class="td3 tdcur">
			<i id="bt_$cate[fid]" class="$tmpStyle" onclick="cateopen('$cate[fid]')"></i>
			<input class="input input_wd mr5" name="order[$cate[fid]]" value="$cate[vieworder]" type="text">
			<span class="fourm_name" title="雙擊修改名稱" id="fourm_$cate[fid]">$cate[name]</span>
			<span class="fourm_name" id="fourm_edit_box_$cate[fid]"></span>
			<font class="gray mr20">FID:$cate[fid]</font>&nbsp;&nbsp;
            <a href="$basename&action=addforum&fup=$cate[fid]" id="addbt_$cate[fid]" title="添加新版塊" style="display:none;">添加新版塊</a>
		</td>
		<td class="td2"><input  class="input input_wa" name="forumadmin[$cate[fid]]" value="$cate[forumadmin]" type="text"></td>
        <td class="td2">
            <a href="$basename&action=edit&fid=$cate[fid]" class="mr10">[編輯]</a>
            <a href="$basename&action=delete&fid=$cate[fid]">[刪除]</a>
        </td>
	</tr>
<!--
EOT;
if ($threaddb[$cate['fid']]) {print <<<EOT
-->
	<tbody id="cate_$cate[fid]">
<!--
EOT;
foreach ($threaddb[$cate['fid']] as $thread) {
$isspace = str_repeat($space,$thread['type'] == 'forum' ? 0 : ($thread['type'] == 'sub' ? 1 : 2));
print <<<EOT
-->
	<tr class="vt tr1" onmouseover="showAdd('$thread[fid]')" onmouseout="hiddenAdd('$thread[fid]')">
		<td class="td3">
			{$isspace}
                <i class="lower"></i>
                <input class="input input_wd mr5" name="order[$thread[fid]]" value="$thread[vieworder]" type="text">
                <span title="雙擊修改名稱" id="fourm_$thread[fid]" class="fourm_name">$thread[name]</span>
                <span id="fourm_edit_box_$thread[fid]" class="fourm_name"></span>
                <font class="gray">FID:$thread[fid]</font>
<!--
EOT;
if($thread['type'] != 'sub2'){print<<<EOT
-->
<a href="$basename&action=addforum&fup=$thread[fid]" id="addbt_$thread[fid]" title="添加子版塊" style="display:none;">添加子版塊</a>
<!--
EOT;
}print<<<EOT
-->
		</td>
		<td class="td2"><input class="input_wa input" name="forumadmin[$thread[fid]]" value="$thread[forumadmin]" type="text"></td>
		<td class="td2">
            <a href="$basename&action=edit&fid=$thread[fid]" class="mr10">[編輯]</a>
            <a href="$basename&action=delete&fid=$thread[fid]">[刪除]</a>
        </td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
	</tbody>
<!--
EOT;
}}if ($forum_L) {print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2" colspan="6">
        	<i id="bt_error" class="expand expand_a" onclick="cateopen('error')" ></i><span class="s1 mr10">異常版塊</span>(重新設置上級版塊可以恢復正常)
        </td>
	</tr>
	<tbody id="cate_error">
<!--
EOT;
foreach ($forum_L as $key => $thread) {
$isspace = str_repeat($space,$thread['type'] == 'forum' ? 0 : ($thread['type'] == 'sub' ? 1 : 2));
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td3">
			<div class="fourm"><i class="lower"></i>
				<input class="input input_wd" name="order[$thread[fid]]" value="$thread[vieworder]" type="text">
				$thread[name]
				<font class="gray">FID:$thread[fid]</font>
			</div>
		</td>
		<td class="td2"><input class="input input_wa" name="forumadmin[$thread[fid]]" value="$thread[forumadmin]" type="text"></td>
		<td class="td2">
            <a href="$basename&action=edit&fid=$thread[fid]" class="mr10">[編輯]</a>
            <a href="$basename&action=delete&fid=$thread[fid]">[刪除]</a>
        </td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
	</tbody>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 tac"><span class="btn"><span><button type="submit">提 交</button></span></span></div>
</form>
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript">
function cateopen(id) {
	var o = getObj('cate_' + id);
	if (o == null) return;
	if (o.style.display == 'none') {
		o.style.display = '';
		getObj('bt_' + id).className = 'expand expand_b';
	} else {
		o.style.display = 'none';
		getObj('bt_' + id).className = 'expand expand_a';
	}
}
function setall(t) {
	var tbs = getObj('ftable').getElementsByTagName('tbody');
	for (var i = 0; i < tbs.length; i++) {
		if (!tbs[i].id.match(/^cate/)) {
			continue;
		}
		var id = tbs[i].id.substr(5);
		if (t == 'open') {
			tbs[i].style.display = '';
			getObj('bt_' + id).className = 'expand expand_a';
		} else {
			tbs[i].style.display = 'none';
			getObj('bt_' + id).className = 'expand expand_b';
		}
	}
}
function IsElement(id){
	return document.getElementById(id)!=null ? true : false;
}
function showAdd(id){
	if (IsElement('addbt_' + id)) {
		getObj('addbt_' + id).style.display = '';
	}
}
function hiddenAdd(id){
	if (IsElement('addbt_' + id)) {
		getObj('addbt_' + id).style.display = 'none';
	}
}
function adminCFname(){

}
adminCFname.prototype = {
	init : function(){
		var cfname = this;
		cfname.spans = {};
		var span = document.getElementsByTagName('span');
		for (var i=0;i<span.length;i++) {
			if (span[i].className=='fourm_name'){
				cfname.spans[span[i].id] = span[i].innerHTML.replace(/[\"\']/g,'');
				span[i].ondblclick = function(){
					cfname.spans[this.id] = this.innerHTML.replace(/[\"\']/g,'');
					cfname.doubleclick(this.id);
				};
			}
		}
	},
	doubleclick : function(o){
		if (typeof o =='string') {
			o = getObj(o);
		}
		var cfname = this;
		var temp = o.id.split('_');
		var fid = temp[1];
		var fourm_edit_box = getObj('fourm_edit_box_'+fid);
		if (fid) {
			var edit_box = document.createElement('span');
			edit_box.className = 'fourm_name';
			edit_box.id = 'fourm_edit_'+fid;
			var input = document.createElement('input');
			input.type = 'text';
			input.value = this.spans[o.id];
			input.className = 'input';
			edit_box.appendChild(input);
			input.focus();
			var b_save = document.createElement('input');
			b_save.type = 'button';
			b_save.value = '保存';
			b_save.className = 'btn2';
			b_save.onclick = function(){cfname.save(o);};
			edit_box.appendChild(b_save);
			var b_cancel = document.createElement('input');
			b_cancel.type = 'button';
			b_cancel.value = '取消';
			b_cancel.className = 'btn2';
			b_cancel.onclick = function(){cfname.cancel(o);};
			edit_box.appendChild(b_cancel);
			fourm_edit_box.appendChild(edit_box);
			o.style.display = 'none';
		}
	},
	save : function(o){
		if (typeof o =='string') {
			o = getObj(o);
		}
		var cfname = this;
		var temp = o.id.split('_');
		var fid = temp[1];
		var edit_box = getObj('fourm_edit_'+fid);
		var input = edit_box.getElementsByTagName('input');
		var text = input[0];
		var url = '$ajaxurl';
		var data = 'action=changename&fid='+fid+'&fname='+text.value;
		ajax.send(url,data,function(){
			cfname.spans[o.id] = text.value.replace(/[\"\']/g,'');;
			cfname.cancel(o);
		});

	},
	cancel : function(o){
		if (typeof o =='string') {
			o = getObj(o);
		}
		var temp = o.id.split('_');
		var fid = temp[1];
		var edit_box = getObj('fourm_edit_'+fid);
		delElement(edit_box);
		o.innerHTML = this.spans[o.id];
		o.style.display = '';
	}
};
var fourmname = new adminCFname();
fourmname.init();

function searchForum(){
	var is_ie = ((agt.indexOf('msie')!=-1) && (agt.indexOf('opera')==-1));
	var is_ns = (document.layers);
	var is_w3 = (document.getElementById && !is_ie);
	var searchname = getObj('forumname').value;
	var forumtable = getObj('ftable');
	var span = forumtable.getElementsByTagName('span');
	for (var i=0;i<span.length;i++) {
		var ocateid = span[i].parentNode.parentNode.parentNode;
		var cateid = ocateid.id;
		if (span[i].innerHTML != '' && span[i].innerHTML.indexOf(searchname) != -1 && cateid != 'ftable') {
			var cid = cateid.substr(5);
			if (ocateid.style.display == 'none') {
				ocateid.style.display = '';
				getObj('bt_' + cid).className = 'close fl';
			}
			if (is_w3 || is_ns) {
				var m = 0;
				while(m<2){
					m++;
					parent.find(searchname);
				}
			} else if (is_ie) {
				var txt = parent.document.body.createTextRange();
				if (txt.findText(searchname)){
					txt.select();
				}
			}
			span[i].scrollIntoView();
			return true;
		}
	}
	alert('找不到到您搜索的版塊！');
}

var searchSelector = {
	oldKeyword : '',
	keyword : '',
	elementId : '',
	selectionElementId : '',
	requestUrl : '',
	listData : false,

	init : function(elementId, selectionElementId, requestUrl) {
		this.elementId = elementId;
		this.selectionElementId = selectionElementId;
		this.requestUrl = requestUrl;

		var _searchSelector = this;
		getObj(this.elementId).onkeyup = function() {
			_searchSelector.generateSelections.call(_searchSelector);
		}
	},

	generateSelections : function() {
		if (this._isNeedSearch()) {
			this._initSelection();
			this._drawSelectionList();
		}
	},

	_isNeedSearch : function() {
		this.keyword = getObj(this.elementId).value;
		this.keyword = this.keyword.replace(/(^\s*)|(\s*$)/g, "");
		var needSearch = (this.oldKeyword != this.keyword) && ('' != this.keyword);
		if ('' == this.keyword) {
			this._hideSelection();
		}
		this.oldKeyword = this.keyword;
		return needSearch;
	},

	_drawSelectionList : function() {
		var _searchSelector = this;
		ajax.send(this.requestUrl, 'action=searchforum&keyword=' + this.keyword, function () {
			var gotText = ajax.request.responseText.split('\t');
			if ('success' == gotText[0]) {
				var gotData = JSONParse(gotText[1]);
				var generateHtml = '<ul>';
				for(i=0; i<gotData.length; i++) {
					generateHtml += '<li><a href="'+gotData[i].url+'">'+gotData[i].forumName+'</a></li>';
				}
				getObj(_searchSelector.selectionElementId).innerHTML = generateHtml + '</ul>';
				_searchSelector._showSelection();
			}
			if (0 == gotData.length || 'success' != gotText[0]) {
				_searchSelector._hideSelection();
			}
		});
	},

	_initSelection : function() {
		var rect = getObj(this.elementId).getBoundingClientRect();
		getObj(this.selectionElementId).style.left = rect.left + (is_ie ? 1 : 3) +'px';
		getObj(this.selectionElementId).style.top = rect.top + (is_ie ? 21 : 23) + 'px';
	},

	_hideSelection : function() {
		getObj(this.selectionElementId).style.display = 'none';
	},

	_showSelection : function() {
		getObj(this.selectionElementId).style.display = '';
	}
};

searchSelector.init('forumname', 'searchForumSelection', '$ajaxurl');

</script>
<!--
EOT;
}elseif($action == 'addforum') {print<<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li class="current"><a href="$admin_file?adminjob=setforum&adminitem=setforum&c_type=$c_type">版塊管理</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=uniteforum&type=$type">版塊合並</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=forumsell">版塊出售記錄</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=creathtm&type=$type">生成靜態文件</a></li>
	</ul>
</div>
<div class="admin_info mb10">
    <h3 class="h1"><b>提示信息</b></h3>
    <div class="legend"><ol><li>版塊關鍵字:有利于搜索引擎(50字節以內)
</li><li>版塊簡介，[支持 html 代碼](250字節以內) 同時也有利于搜索引擎</li></ol></div>
</div>
<form action="$basename&action=addforum" method="post">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="fup" value="$fup" />
<h2 class="h1 cc"><span class="fl mr10">添加版塊(上級分類或版塊:{$forum[$fup][name]})</span><i onclick="addforum();" class="expand expand_c" title="添加更多">添加</i><span onclick="addforum();" class="cp fn f12">添加更多</span></h2>
<div class="admin_table mb10">
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr class="tr2">
            <td>順序</td>
            <td>版塊名稱</td>
            <td>版主</td>
            <td>默認同全局設置</td>
            <td>關鍵字</td>
            <td>簡介</td>
            <td>圖標</td>
<!--
EOT;
if($forum[$fup]['type'] != 'category') {print<<<EOT
-->
            <td>繼承</td>
<!--
EOT;
}print<<<EOT
-->
        </tr>
<!--
EOT;
for ($i=0;$i<$forumnum;$i++) {print<<<EOT
-->
        <tr class="vt tr1">
            <td class="td2"><input type="text" class="input input_wd" name="vieworder[]" value=""></td>
            <td class="td2"><input type="text" class="input input_wa" name="name[]" value=""></td>
            <td class="td2"><input type="text" class="input input_wc" name="forumadmin[]" value=""></td>
            <td class="td2"><select name="style[]"><option value="0">--使用默認--</option> $setfid_style</select></td>
            <td class="td2"><input type="text" class="input input_wc" name="keywords[]" value=""></td>
            <td class="td2"><input type="text" class="input input_wc" name="descrip[]" value=""></td>
            <td class="td2"><input type="text" class="input input_wc" name="logo[]" value=""></td>
<!--
EOT;
if($forum[$fup]['type'] != 'category') {print<<<EOT
-->
            <td class="td2"><input type="checkbox" name="ifsave[]" value="1" $checked/></td>
<!--
EOT;
}print<<<EOT
-->
        </tr>
<!--
EOT;
}print<<<EOT
-->
        <tbody id="fbody"></tbody>
        <tbody id="fmode" style="display:none;"><tr class="vt tr1"><td class="td2"><input type="text" class="input input_wd" name="vieworder[]" value=""></td><td class="td2"><input type="text" class="input input_wa" name="name[]" value=""></td><td class="td2"><input type="text" class="input input_wc" name="forumadmin[]" value=""></td><td class="td2"><select name="style[]"><option value="0">--使用默認--</option>$setfid_style</select></td><td class="td2"><input class="input input_wc" type="text" name="keywords[]" value=""></td><td class="td2"><input class="input input_wc" type="text" name="descrip[]" value=""></td><td class="td2"><input class="input input_wc" type="text" name="logo[]" value=""></td><!--
EOT;
if($forum[$fup]['type'] != 'category') {print<<<EOT
--><td class="td2"><input type="checkbox" name="ifsave[]" value="1"/></td>
<!--
EOT;
}print<<<EOT
--></tr></tbody>
    </table>
</div>
<div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
    <span class="bt"><span><button type="reset">重 置</button></span></span>
</div>
<script type="text/javascript">
function addforum(){
	var s = getObj('fmode').firstChild.cloneNode(true);
	getObj('fbody').appendChild(s);
}
</script>
<!--
EOT;
}elseif($action=='delete'){print <<<EOT
-->
<form action="$basename&action=delete&fid=$fid" method="post">
<input type="hidden" name="step" value="2" />
<div class="admin_info mb10">
    <h3 class="h1"><b>提示信息</b></h3>
    <div class="legend">將刪除該版塊的所有文章, 與該版塊相關的所有信息, 該版塊的版主職務也將免除, 請確認!</div>
</div>
<div class="tac">
	<span class="btn"><span><button type="submit">確認刪除</button></span></span>
	<span class="bt"><span><button type="button" onclick="javascript:history.go(-1);">點擊這里返回上一頁</button></span></span>
</div>
</form>
<!--
EOT;
}elseif($action=='edit'){print <<<EOT
-->
<!--
EOT;
if(!$fid){print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li class="current"><a href="$admin_file?adminjob=setforum&adminitem=setforum&c_type=$c_type">版塊管理</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=uniteforum&type=$type">版塊合並</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=forumsell">版塊出售記錄</a></li>
		<li><a href="$admin_file?adminjob=setforum&adminitem=creathtm&type=$type">生成靜態文件</a></li>
	</ul>
</div>
<h2 class="h1"><span class="mr10">請選擇需要設置的版塊</span><a href="$basename" class="linka">返回上一級<span class="f9">▲</span></a></h2>
<div class="admin_table mb10">
    <table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr1 vt">
        <td class="td2"><select id="fid">$forumcache</select>
            <span class="bt2">
            <span><button type="submit" value="提 交" onclick="self.location='$basename&fid='+document.getElementById('fid').value">提 交</button></span>
            </span>
        </td>
    </tr>
    </table>
</div>
<!--
EOT;
}else{
if($type!='category'){print <<<EOT
-->
<div class="nav3 mb10 cc">
    <ul class="fl mr10" id="tab3_eidt">
		<li id="basic" onclick="showtab('tab3_eidt','basic')" class="current"><a href="javascript:;">版塊屬性</a></li>
		<li id="property" onclick="showtab('tab3_eidt','property')"><a href="javascript:;">基本設置</a></li>
		<li id="recommended" onclick="showtab('tab3_eidt','recommended')"><a href="javascript:;">版主推薦</a></li>
		<li id="threadtype" onclick="showtab('tab3_eidt','threadtype')"><a href="javascript:;">主題分類</a></li>
		<li id="usergroup" onclick="showtab('tab3_eidt','usergroup')"><a href="javascript:;">用戶組權限</a></li>
        <li id="usercredit" onclick="showtab('tab3_eidt','usercredit')"><a href="javascript:;">積分相關</a></li>
    </ul>
    <a href="$basename" class="fl mt5 ">返回上一級<span class="f9">▲</span></a>
</div>
<div class="c"></div>
<!--
EOT;
}print <<<EOT
-->
<form action="$basename&" method="post" enctype="multipart/form-data">
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="forumsetdb[auth_cellphone_credit]" value="$forumset[auth_cellphone_credit]" />
<input type="hidden" name="forumsetdb[auth_cellphone]" value="$forumset[auth_cellphone]" />
<input type="hidden" name="forumsetdb[auth_alipay_credit]" value="$forumset[auth_alipay_credit]" />
<input type="hidden" name="forumsetdb[auth_alipay]" value="$forumset[auth_alipay]" />
<input type="hidden" id="c_type" name="c_type" value="c_base" />
<div class="admin_table mb10">
	<h2 class="h1">
<!--
EOT;
if($type!='category'){print <<<EOT
-->
	版塊設置
<!--
EOT;
}else{print <<<EOT
-->
<span class="mr10">分類版塊設置</span><a href="$basename" class="linka">返回上一級<span class="f9">▲</span></a>
<!--
EOT;
}print <<<EOT
-->
	</h2>
    <table cellspacing="0" cellpadding="0" width="100%" class="mb10">
        <tr class="tr1 vt">
            <td class="td1">版塊名稱</td>
            <td class="td2" width="160"><input type="text" class="input input_wa" value="$name" name="name" /></td>
    		<td class="td2"><div class="help_a">支持html代碼</div></td>
    		<td class="td2 tar">
<!--
EOT;
if($type!='category'){
print <<<EOT
-->
    			<a id="linkCtrlCrossConfig" href="javascript:;">橫向擴展</a>
<!--
EOT;
}
print <<<EOT
-->
    		</td>
        </tr>
	</table>
</div>

<div id="addform">

<div id="c_basic" style="display:none" class="admin_table mb10">
	<h2 class="h1">基本屬性</h2>
    <table cellspacing="0" cellpadding="0" width="100%" class="mb10">
        <tr class="tr1 vt">
            <td class="td1">順序</td>
            <td class="td2"><input type="text" class="input input_wa" name="vieworder" value="$vieworder" /></td>
            <td class="td2"><div class="help_a">順序</div></td>
            <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[vieworder]" value="1" /></div></td>
        </tr>
        <tr class="tr1 vt">
            <td class="td1">版塊風格</td>
            <td class="td2">
                <select name="style" class="select_wa">
                    <option value="0">--使用默認--</option>
                    $setfid_style
                </select>
            </td>
            <td class="td2"><div class="help_a">默認同全局設置</div></td>
            <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[style]" value="1" /></div></td>
        </tr>
        <tr class="tr1 vt">
            <td class="td1">版塊橫排</td>
            <td class="td2"><input type="text" class="input input_wa" name="across" value="$across" /></td>
            <td class="td2"><div class="help_a">版塊橫排(填寫每排顯示版塊個數，0或留空表示不限制)</div></td>
            <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[across]" value="1" /></div></td>
        </tr>
<!--
EOT;
if($type=='category'){print <<<EOT
-->
        <tr class="tr1 vt">
            <td class="td1">二級目錄/域名設置</td>
            <td class="td2"><input type="text" class="input input_wa" name="dirname" value="$dirname" /></td>
            <td class="td2"><div class="help_a">版塊二級域名/二級目錄設置<br />(啟用二級目錄功能需要到<a href="?adminjob=settings&admintype=basic&action=global&admin_keyword=二級目錄/域名訪問" onClick="parent.PW.Dialog({id:'basic',url:'?adminjob=settings&admintype=basic&action=global&admin_keyword=二級目錄/域名訪問',name:'站點設置'});return false;">站點設置</a>處開啟)</div></td>
            <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[dirname]" value="1" /></div></td>
        </tr>
</table>
</div>
<!--
EOT;
}else{print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td1">選擇上級版塊</td>
		<td class="td2"><select name="ffup" class="select_wa"><option value="">選擇上級版塊</option>$fup_forumcache</select><!--站點版塊--></td>
        <td class="td2"><!--選擇上級版塊--></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[ffup]" value="1" /></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">版塊關鍵字</td>
		<td class="td2"><textarea name="keywords" class="textarea">{$keywords}</textarea></td>
        <td class="td2"><div class="help_a">設置版塊關鍵字，有利于搜索引擎(250字節以內)<br />也可在 <a href="?adminjob=settings&admintype=basic"  onClick="parent.PW.Dialog({id:'seoset',url:'?adminjob=seoset',name:'SEO設置'});return false;">全局->SEO優化</a> 中進行設置</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[keywords]" value="1" /></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">版塊Meta描述</td>
		<td class="td2"><textarea class="textarea" name="metadescrip">{$metadescrip}</textarea></td>
        <td class="td2"><div class="help_a">有利于搜索引擎(250字節以內)<br />也可在 <a href="?adminjob=settings&admintype=basic"  onClick="parent.PW.Dialog({id:'seoset',url:'?adminjob=seoset',name:'SEO設置'});return false;">全局->SEO優化</a> 中進行設置</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[metadescrip]" value="1" /></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">版塊簡介</td>
		<td class="td2"><textarea class="textarea" name="descrip">{$descrip}</textarea></td>
        <td class="td2"><div class="help_a">支持html代碼，html樣式受論壇頁面樣式影響<br/>如需要特殊樣式，請在html標簽中添加樣式</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[descrip]" value="1" /></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">版塊圖標</td>
		<td class="td2">
			<dl>
				<dt class="fl">
<!--
EOT;
	if ($logoimg) {print <<<EOT
-->
		<p class="mr20"><img src="$logoimg" width="32" /></p>
<!--
EOT;
	}
	if ($logotype == 'upload') {print <<<EOT
-->
        <input type="checkbox" name="ifdellogo" value="1" style="margin-top:-5px;">&nbsp;刪除
<!--
EOT;
	}print<<<EOT
-->
				</dt>
				<dd class="fl" style="width:340px;">
            <ul class="cc list_80 mb5 cc list_A">
                <li><input type="radio" name="logotype" value="url" onclick="changeLogoType('url');" $logotype_url>外鏈</li>
                <li><input type="radio" name="logotype" value="upload" onclick="changeLogoType('upload');" $logotype_upload>上傳</li>
            </ul>
		<p class="mb5">
		<span id="logo_upload"><input type="file" name="logo_upload" value="" /></span>
		<span id="logo_url"><input type="text" class="input input_wb" name="logo_url" value="$logo" /></span>
		</p>
				</dd>
			</dl>
		</td>
        <td class="td2"><div class="help_a">此處設置只有在 <a href="?adminjob=interfacesettings&adminitem=index&admin_keyword=logo"  onClick="parent.PW.Dialog({id:'interfacesettings',url:'?adminjob=interfacesettings&adminitem=index&admin_keyword=logo',name:'界面設置'});return false;">論壇模式->界面設置</a> 處選擇為自定義才有效</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[logo]" value="1" /></div></td>
	</tr>
<!--
EOT;
	if($type=='forum' && $cms=='0'){ print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td1">顯示子版塊</td>
		<td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" name="showsub" value="1" $showsub_Y />開啟</li>
                <li><input type="radio" name="showsub" value="0" $showsub_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，在論壇首頁顯示子版塊信息。（僅當父版塊不使用版塊橫排時有效）</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[showsub]" value="1" /></div></td>
	</tr>
<!--
EOT;
	}
	$ifcms_selected = $ifcms ? "selected" : "";
	$ifcms_display = $ifcms ? "" : "none";
	$ifcmshideinbbs_checked = $ifcms == 2 ? "checked" : "";
print<<<EOT
-->
<!-- 8.7 注釋社區門戶模式
	<tr class="tr1 vt">
		<td class="td1">版塊內容展示方式</td>
		<td class="td2">
			<select id="ifcms" class="select_wa" name="ifcms" onchange="if(getObj('ifcms').value == '1'){getObj('ifcms_show').style.display='';}else{getObj('ifcms_show').style.display='none';getObj('ifcms_hide').checked=false;}">
				<option value="0">傳統論壇模式</option>
				<option value="1" $ifcms_selected>社區門戶模式</option>
			</select>&nbsp;
			<span id="ifcms_show" style="display:$ifcms_display;"><input id="ifcms_hide" type="checkbox" name="ifcms" style="margin-top:-5px"  value="2" $ifcmshideinbbs_checked>&nbsp;在論壇模式中隱藏</span>
		</td>
        <td class="td2"><div class="help_a">當選擇社區門戶模式時，建議開啟主題審核功能</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[ifcms]" value="1" /></div></td>
	</tr>
	 -->
	<tr class="tr1 vt">
		<td class="td1">版塊類別</td>
		<td class="td2">
            <ul class="list_A">
                <li><input type="radio" onclick="changeDescript('forum')" name="f_type" value="forum" $ftype_forum />開放版塊</li>
                <li><input type="radio" onclick="changeDescript('former')" name="f_type" value="former" $ftype_former />正規版塊</li>
                <li><input type="radio" onclick="changeDescript('hidden')" name="f_type" value="hidden" $ftype_hidden />隱藏版塊</li>
            </ul>
		</td>
		<td class="td2"><div class="help_a" id="typedescript"></div></td>
		<td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[f_type]" value="1" /></div></td>

	</tr>
  </table>
  <h2 class="h1">版塊訪問權限出售設置</h2>
  <table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr1 vt">
        <td class="td1">版塊密碼</td>
        <td class="td2"><input type="text" class="input input_wa mb5" value="$password" name="password"></td>
        <td class="td2"><div class="help_a">不加密請留空!如果版塊已加密,顯示的密碼為32位MD5密碼,不必再修改!</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[password]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">版塊訪問權限出售積分</td>
        <td class="td2"><select name="forumsell"class="select_wa"><option value="">不設置</option>
<!--
EOT;
	foreach($credit->cType as $key => $value){
		$selected = $key == $forumsell ? 'selected' : '';
print <<<EOT
-->
        <option value="$key" $selected>$value</option>
<!--
EOT;
	}print <<<EOT
-->
        </select>
        </td>
        <td class="td2"><!--版塊訪問權限出售積分--></td>
       <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsell]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    <td class="td1">版塊訪問權限出售價格</td>
        <td class="td2">
          <div class="admin_table_b">
                <table cellpadding="0" cellspacing="0">
					<tbody id="smode" style="display:none"><tr><td><input name="sdate[]" type="text" class="input input_wc" /></td><td><input name="cprice[]" type="text" class="input input_wc" /></td><td><input name="rprice[]" type="text" class="input input_wc" /></td><td><a class="cp" onclick="dels(this);">[刪除]</a></td></tr></tbody>
                	<tr>
                    	<td>期限[天]</td>
                        <td>積分價格</td>
                        <td>RMB價格</td>
                        <td><a class="cp s3" onclick="adds();">[添加]</a></td>
                    </tr>
<!--
EOT;
	foreach ($forumset['sellprice'] as $key => $value) {print <<<EOT
-->
					<tr>
						<td><input class="input input_wc" name="sdate[]" value="$key" /></td>
						<td><input class="input input_wc" name="cprice[]" value="$value[cprice]" /></td>
						<td><input class="input input_wc" name="rprice[]" value="$value[rprice]" /></td>
						<td><a class="cp" onclick="dels(this);">[刪除]</a></td>
					</tr>
<!--
EOT;
	}print <<<EOT
-->
					<tbody id="sbody"></tbody>
                </table>
           </div>
       </td>
       <td class="td2">&nbsp;</td>
       <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][sellprice]" value="1" /></div></td>
    </tr>
</table>
<script type="text/javascript">
function adds() {
	var s = getObj('smode').firstChild.cloneNode(true);
	getObj('sbody').appendChild(s);
}
function dels(obj) {
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}
function changeLogoType(type) {
	if (type == 'upload') {
		getObj('logo_upload').style.display = '';
		getObj('logo_url').style.display = 'none';
	} else {
		getObj('logo_url').style.display = '';
		getObj('logo_upload').style.display = 'none';
	}
}
function changeDescript(type) {
	descObj = getObj('typedescript');
	if (type == 'forum') {
		descObj.innerHTML = "對所有用戶開放，也可以在版塊的<a href=\"{$admin_file}?adminjob=setforum&action=edit&fid={$fid}&c_type=usergroup\">【用戶組權限】</a>中設置權限";
	} else if (type == 'former') {
		descObj.innerHTML = '限制游客訪問，也可以在版塊的<a href=\"{$admin_file}?adminjob=setforum&action=edit&fid={$fid}&c_type=usergroup\">【用戶組權限】</a>中設置權限';
	} else {
		descObj.innerHTML = '沒有權限的用戶將不可見，還需要在版塊的<a href=\"{$admin_file}?adminjob=setforum&action=edit&fid={$fid}&c_type=usergroup\">【用戶組權限】</a>中設置權限';
	}
}
changeDescript('$f_type');
adds();
changeLogoType('$logotype');
</script>
</div>

<div id="c_property" style="display:none" class="admin_table mb10">
<h2 class="h1">版塊基本權限設置</h2>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
<tr class="tr1 vt">
	<td class="td1">版塊鏈接</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[link]" value="$forumset[link]" /></td>
	<td class="td2"><div class="help_a">版塊鏈接 (填寫此項，當進入版塊時將轉向您填寫的鏈接地址)</div></td>
	<td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][link]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">鎖定主題不允許回復</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[lock]" value="$forumset[lock]" /></td>
	<td class="td2"><div class="help_a">鎖定多少天以前發表的主題不允許回復 (0或留空表示不限制)</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][lock]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">主題列表標題顯示字節數</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[cutnums]" value="$forumset[cutnums]" /></td>
	<td class="td2"><div class="help_a">一個漢字佔兩個字節，0或留空表示不限制)</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][cutnums]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">主題列表顯示主題個數</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[threadnum]" value="$forumset[threadnum]" /></td>
	<td class="td2"><div class="help_a">留空使用  <a href="?adminjob=interfacesettings&adminitem=thread&admin_keyword=主題數目"  onClick="parent.PW.Dialog({id:'interfacesettings',url:'?adminjob=interfacesettings&adminitem=thread&admin_keyword=主題數目',name:'界面設置'});return false;">論壇模式->界面設置</a> 中設定的值</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][threadnum]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">瀏覽帖子顯示文章個數</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[readnum]" value="$forumset[readnum]" /></td>
	<td class="td2"><div class="help_a">留空使用  <a href="?adminjob=interfacesettings&adminitem=read&admin_keyword=每頁帖子樓層數"  onClick="parent.PW.Dialog({id:'interfacesettings',url:'?adminjob=interfacesettings&adminitem=read&admin_keyword=每頁帖子樓層數',name:'界面設置'});return false;">論壇模式->界面設置</a> 中設定的值</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][readnum]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">新帖標識時間[分鐘]</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[newtime]" value="$forumset[newtime]" /></td>
	<td class="td2"><div class="help_a">留空使用  <a href="?adminjob=interfacesettings&adminitem=thread&admin_keyword=新帖控制"  onClick="parent.PW.Dialog({id:'interfacesettings',url:'?adminjob=interfacesettings&adminitem=thread&admin_keyword=新帖控制',name:'界面設置'});return false;">論壇模式->界面設置</a> 中設定的值</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][newtime]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">內容最小長度[字節]</td>
	<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[contentminlen]" value="$forumset[contentminlen]" /></td>
	<td class="td2"><div class="help_a">帖子內容最小長度控制，0或留空使用 <a href="?adminjob=member" onclick="parent.PW.Dialog({id:'member',url:'?adminjob=member',name:'會員相關'});return false;">全局->會員相關->內容發布設置</a> 中設定的值</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][contentminlen]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">默認主題排序關鍵字</td>
	<td class="td2"><select name="forumsetdb[orderway]" class="select_wa">
		<option value="lastpost" $sel_lastpost>最後發表</option>
		<option value="postdate" $sel_postdate>發表時間</option>
		<option value="hits" $sel_hits>人氣</option>
		<option value="replies" $sel_replies>回復</option>
		</select>
	</td>
	<td class="td2"><div class="help_a">影響效率，建議使用‘最後發表’排序</div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][orderway]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">版塊默認主題排序方式</td>
	<td class="td2"><select name="forumsetdb[asc]" class="select_wa">
		<option value="DESC" $sel_DESC>倒序</option>
		<option value="ASC" $sel_ASC>正序</option>
		</select>
	</td>
	 <td class="td2"><div class="help_a"></div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][asc]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
	<td class="td1">默認回復排序方式</td>
	<td class="td2">
		<select name="forumsetdb[replayorder]" class="select_wa">
		<option value="1" $replayorder_asc>正序</option>
		<option value="2" $replayorder_desc>倒序</option>
		</select>
	</td>
	<td class="td2"><div class="help_a"></div></td>
	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][replayorder]" value="1" /></div></td>
</tr>
<tr class="tr1 vt">
    <td class="td1">允許版主回收站管理</td>
    <td class="td2">
    	<ul class="cc list_80 list_A">
            <li><input type="checkbox" name="forumsetdb[recycle][]" value="2" $recycle_2 />&nbsp;刪除</li>
            <li><input type="checkbox" name="forumsetdb[recycle][]" value="4" $recycle_4 />&nbsp;還原</li>
            <li><input type="checkbox" name="forumsetdb[recycle][]" value="8" $recycle_8 />&nbsp;清空</li>
        </ul>
    </td>
    <td class="td2"><div class="help_a"></div></td>
    <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][recycle]" value="1"></div></td>
</tr>
<tr class="tr1 vt">
     <td class="td1">允許版主發布公告</td>
     <td class="td2">
         <ul class="cc list_80 fl list_A">
             <li><input type="radio" value="1" name="forumsetdb[addnotice]" $addnotice_Y />開啟</li>
             <li><input type="radio" value="0" name="forumsetdb[addnotice]" $addnotice_N />關閉</li>
         </ul>
     </td>
     <td class="td2"><div class="help_a">開啟後，允許版主發布版塊公告</div></td>
     <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][addnotice]" value="1" /></div></td>
 </tr>
<!--
EOT;
	if($type=='forum' && trim($cmscache)){print <<<EOT
-->
<tr class="tr1 vt">
    <td class="td1">在文章系統中顯示</td>
    <td class="td2">
        <input type="radio" name="ifhide" value="0" $ifhide_N />開啟
        <input type="radio" name="ifhide" value="1" $ifhide_Y />關閉
    </td>
    <td class="td2"><div class="help_a"><!--<font color="#0000FF">在文章系統中顯示</font><br />將出現在文章系統首頁左下方，主題列表和文章頁面右下方的"<font color="#0000FF">社區推薦</font>"中--></div></td>
    <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[ifhide]" value="1"></div></td>
</tr>
<!--
EOT;
	}else{print <<<EOT
-->
<!--
EOT;
	}print <<<EOT
-->
<tr class="tr1 vt">
	<td class="td1">允許發帖類型[多選]</td>
	<td class="td2" colspan="2">
    	<div class="admin_table_c">
    	<table cellpadding="0" cellspacing="0" width="100%">
        	<tr>
            	<td width="70" class="s4">發帖類別</td>
				<td>
                    <ul class="list_A list_120 cc">
                        <li><input type="checkbox" name="allowtype[]" value="1" $allowtype_1 />普通</li>
                        <li><input type="checkbox" name="allowtype[]" value="2" $allowtype_2 />投票</li>
                        <!--<li><input type="checkbox" name="allowtype[]" value="4" $allowtype_4 />活動</li>-->
                        <li><input type="checkbox" name="allowtype[]" value="8" $allowtype_8 />懸賞</li>
                        <li><input type="checkbox" name="allowtype[]" value="16" $allowtype_16 />商品</li>
                        <li><input type="checkbox" name="allowtype[]" value="32" $allowtype_32 />辯論</li>
                    </ul>
                </td>
             </tr>
             <tr>
             	<td class="s4">團購</td>
                <td>
					<ul class="list_A list_120 cc">
<!--
EOT;
	foreach($postcatedb as $val){
		if($val[ifable]){
		$checked = '';
		if (strpos(",$pcid,",",$val[pcid],") !== false) {
			$checked = 'checked';
		}
print <<<EOT
-->
						<li><input type="checkbox" name="pcid[]" value="$val[pcid]" $checked />$val[name]</li>
<!--
EOT;
	}}
print<<<EOT
-->
					</ul>
                </td>
             </tr>
<!--
EOT;
	foreach($topicdb as $value){
print <<<EOT
-->
             <tr>
				<td class="s4">$value[name]</td>
                <td>
						<ul class="list_A list_120 cc">
<!--
EOT;
		foreach($modeldb[$value[cateid]] as $val){
			$check = '';
			if (strpos(",$modelid,",",$val[modelid],") !== false) {
				$check = 'checked';
			}
print <<<EOT
-->
							<li><input type="checkbox" name="modelid[]" value="$val[modelid]" $check />$val[name]</li>
<!--
EOT;
		}print<<<EOT
-->
						</ul>
                  </td>
             </tr>
<!--
EOT;
	}foreach($activitycatedb as $value){
print <<<EOT
-->
             <tr>
				<td class="s4">$value[name]</td>
                <td>
						<ul class="list_A list_120 cc">
<!--
EOT;
	foreach($activitymodeldb[$value[actid]] as $val){
	$check = '';
	if (strpos(",$actmids,",",$val[actmid],") !== false) {
		$check = 'checked';
	}
print <<<EOT
-->
							<li><input type="checkbox" name="actmid[]" value="$val[actmid]" $check />$val[name]</li>
<!--
EOT;
}print<<<EOT
-->
						</ul>
                  </td>
             </tr>
<!--
EOT;
	}print <<<EOT
-->
		</table>
        </div>
	</td>
    <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowtype]" value="1" /></div></td>
</tr>
<script type="text/javascript">
function selectcate(id) {
	if (getObj(id).style.display == 'none') {
		getObj(id).style.display = '';
	} else {
		getObj(id).style.display = 'none';
	}
}

function display(id){
	if(id == '0'){
		getObj('ifthumb_0').style.display = '';
		getObj('ifthumb_1').style.display = 'none';
		getObj('ifthumb_2').style.display = 'none';
		getObj('span_thumb').style.display = 'none';
	}else if(id == '1'){
		getObj('ifthumb_0').style.display = 'none';
		getObj('ifthumb_1').style.display = '';
		getObj('ifthumb_2').style.display = 'none';
		getObj('span_thumb').style.display = '';
	}else if(id == '2'){
		getObj('ifthumb_0').style.display = 'none';
		getObj('ifthumb_1').style.display = 'none';
		getObj('ifthumb_2').style.display = '';
		getObj('span_thumb').style.display = 'none';
	}
}
function check_viewsub(obj){
  		var viewsub,viewsub_1,viewsub_2;
  		if(!obj && !(getObj('viewsub').checked)){
  			return false;
  		}
  		if(!obj)obj = getObj('viewsub');
  		viewsub_1 = getObj('viewsub_1').checked?getObj('viewsub_1').value : 0;
  		viewsub_2 = getObj('viewsub_2').checked?getObj('viewsub_2').value : 0;
		if (viewsub_1 && viewsub_2) {
			viewsub = 0;
		} else if (viewsub_1) {
			viewsub = viewsub_1;
		} else if (viewsub_2) {
			viewsub = viewsub_2;
		} else {
			viewsub = 3;
		}
		obj.value = viewsub;
		pwJsCheck(obj);
  	}
</script>
	<tr class="tr1 vt">
   		<td class="td1">版塊頁面顯示設置</td>
        <td class="td2">
			 <ul class="list_A list_120 cc">
				<li><input type="checkbox" name="viewsub_1" id="viewsub_1" value="1" $viewsub_1 onclick="check_viewsub();" />顯示子版塊</li>
				<li><input type="checkbox" name="viewsub_2" id="viewsub_2" value="2" $viewsub_2 onclick="check_viewsub();" />帖子列表</li>
			</ul>
        </td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2">
        <div class="none_pw"><input type="checkbox" id="viewsub" onclick="check_viewsub(this);" name="otherforum[viewsub]" value="1"></div></td>
    </tr>
	<tr class="tr1 vt">
    	<td class="td1">顯示關聯群組</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[viewcolony]" $viewcolony_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[viewcolony]" $viewcolony_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][viewcolony]" value="1" /></div></td>
    </tr>
	<tr class="tr1 vt">
    	<td class="td1">關聯群組分類顯示</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[ifcolonycate]" $ifcolonycate_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[ifcolonycate]" $ifcolonycate_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][ifcolonycate]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">搶樓帖功能</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="allowrob" $allowrob_Y />開啟</li>
                <li><input type="radio" value="0" name="allowrob" $allowrob_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此設置同時受用戶組權限限制，開啟用戶組權限中的發表搶樓帖功能方有效</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowhide]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">隱藏帖功能</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="allowhide" $allowhide_Y />開啟</li>
                <li><input type="radio" value="0" name="allowhide" $allowhide_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此設置同時受用戶組權限限制，開啟用戶組權限中的發表隱藏帖功能方有效</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowhide]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">出售帖功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
               	<li><input type="radio" value="1" name="allowsell" $allowsell_Y />開啟</li>
                <li><input type="radio" value="0" name="allowsell" $allowsell_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此設置同時受用戶組權限限制，開啟用戶組權限中的發表出售帖功能方有效</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowsell]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">加密帖功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[allowencode]" $allowencode_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[allowencode]" $allowencode_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此設置同時受用戶組權限限制，開啟用戶組權限中的發表加密帖功能方有效</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][allowencode]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">匿名帖功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[anonymous]" $anonymous_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[anonymous]" $anonymous_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此設置同時受用戶組權限限制，開啟用戶組權限中的發表匿名帖功能方有效</div></td>
      	<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][anonymous]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">帖子評價</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="0" name="forumsetdb[rate]" $rate_N />開啟</li>
                <li><input type="radio" value="1" name="forumsetdb[rate]" $rate_Y />關閉</li>
        	</ul>
        </td>
        <td class="td2">
            <!--div class="help_a">是否開啟帖子評價功能  <font color="blue"> 注:使用時，請確認[<a href="$admin_file?adminjob=hack&hackset=rate&typeid=100">評價控件</a>]已開啟控件功能。</font></div-->
        </td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][rate]" value="1"></div></td>
    </tr>
    <tr class="tr1 vt">
   	 	<td class="td1">帖子推薦</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[dig]" $dig_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[dig]" $dig_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">帖子推薦功能</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][dig]" value="1"></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">版主標記已閱</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[inspect]" $inspect_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[inspect]" $inspect_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，版主可對樓層標注已閱，並顯示于主題列表頁</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][inspect]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">使用水印功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[watermark]" $watermark_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[watermark]" $watermark_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，版塊內圖片將使用全局->附件設置->水印設置的配置</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][watermark]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">內容防復制</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="copyctrl" $copyctrl_Y />開啟</li>
                <li><input type="radio" value="0" name="copyctrl" $copyctrl_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">在帖子的段落末尾加上隨機字符串，防止帖子內容被復制</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[copyctrl]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">發帖審核設置</td>
        <td class="td2">
            <ul class="list_A">
                <li><input type="radio" value="0" name="f_check" $check_0 />無</li>
                <li><input type="radio" value="1" name="f_check" $check_1 />審核主題</li>
                <li><input type="radio" value="2" name="f_check" $check_2 />審核回復</li>
                <li><input type="radio" value="3" name="f_check" $check_3 />審核主題和回復</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後,用戶發表的主題或回復需要通過審核後才能在前台顯示<br />管理員不受此限制</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[f_check]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">主題印戳功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[overprint]" $overprint_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[overprint]" $overprint_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><!--是否開啟主題印戳功能--></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][overprint]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">游客瀏覽圖片/附件控制</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[viewpic]" $viewpic_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[viewpic]" $viewpic_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，用戶只有登錄後，才能看帖子中的圖片和附件</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][viewpic]" value="1" /></div></td>
    </tr>
	<tr class="tr1 vt">
		<td class="td1">縮略圖控制</td>
		<td class="td2">
			<select name="forumsetdb[ifthumb]" class="select_wa" onchange="display(this.value);">
				<option value="0" $thumbSelect[0]>統一設置</option>
				<option value="1" $thumbSelect[1] >獨立設置 </option> 
				<option value="2" $thumbSelect[2]>不縮略</option>
			</select>
			<span style="$style" id="span_thumb">
				寬 <input type="text" class="input input_wc" name="forumsetdb[thumbwidth]" value="$forumset[width]" /> 
				高 <input type="text" class="input input_wc" name="forumsetdb[thumbheight]" value="$forumset[height]" />
			</span>
		</td>
		<td class="td2">
		<div class="help_a">
			<span id="ifthumb_0" $thumbstyle[0]>選擇統一設置，則使用附件設置-圖片縮略中的統一設置</span>
			<span id="ifthumb_1" $thumbstyle[1]>選擇獨立設置，則獨立設置本版塊圖片縮略大小</span>
			<span id="ifthumb_2" $thumbstyle[2]>選擇不縮略，則本版塊圖片不縮略。</span>
		</div>
		</td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][ifthumb]" value="1" /></div></td>
    </tr>
	<tr class="tr1 vt">
		<td class="td1">編輯時間約束[分鐘]</td>
		<td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[postedittime]" value="$forumset[postedittime]" /></td>
		<td class="td2"><div class="help_a">超過設定時間後拒絕用戶編輯該版塊帖子。0或留空表示不限制。管理人員不受限制</div></td>
		<td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][postedittime]" value="1" /></div></td>
	</tr>
   </table>
<h2 class="h1">圖酷設置</h2>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
	<tr class="tr1 vt">
    	  <td class="td1">開啟圖酷</td>
          <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[iftucool]" $iftucool_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[iftucool]" $iftucool_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">此處可單獨設置圖酷功能是否開啟</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][iftucool]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	  <td class="td1">默認列表</td>
          <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="0" name="forumsetdb[iftucooldefault]" $iftucooldefault_N />全部</li>
                <li><input type="radio" value="img" name="forumsetdb[iftucooldefault]" $iftucooldefault_Y />圖酷</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">帖子列表默認顯示全部帖子或者圖酷列表</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][iftucooldefault]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	  <td class="td1">帖子形式</td>
          <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[iftucoolbrowse]" $iftucoolbrowse_Y />幻燈</li>
                <li><input type="radio" value="0" name="forumsetdb[iftucoolbrowse]" $iftucoolbrowse_N />帖子</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">設置默認打開圖酷帖的帖子表現形式</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][iftucoolbrowse]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	  <td class="td1">主樓圖片</td>
          <td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[tucoolpic]" value="$forumset[tucoolpic]" /></td>
        <td class="td2"><div class="help_a">圖酷帖生成的標準，需要在主樓上傳的圖片底限</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][tucoolpic]" value="1" /></div></td>
    </tr>
</table>
<h2 class="h1">孔明燈設置</h2>
<!--
EOT;
if($forumset['ifkmd']){
	$ifkmd_N .= " onclick=\"showtips('closetips');\"";
}print <<<EOT
-->
<script>
function hidetips(obj) {
	getObj(obj).style.display = 'none';
}
function showtips(obj) {
	getObj(obj).style.display = '';
}
</script>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
	<tr class="tr1 vt">
    	  <td class="td1">開啟孔明燈</td>
          <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input autocomplete="off" type="radio" value="1" name="forumsetdb[ifkmd]" $ifkmd_Y />開啟</li>
                <li><input autocomplete="off" type="radio" value="0" name="forumsetdb[ifkmd]" $ifkmd_N />關閉</li>
				<div class="fl" id="closetips" style="display:none">
   					<div style="position:absolute;margin-top:22px;">
						<div class="popout">
							<table border="0" cellspacing="0" cellpadding="0">
								<tbody>
									<tr><td class="bgcorner1"></td>
										<td class="pobg1"></td>
										<td class="bgcorner2"></td>
									</tr>
									<tr><td class="pobg4"></td>
									<td>
									<div class="popoutContent">
									<div style="width:370px;">
									<div class="popTop cc"><a href="javascript:;" class="del_img fr" onclick="hidetips('closetips')">關閉</a>友情提示
									</div>
									<p class="s4 cc p10">關閉後版塊內顯示的孔明燈將失效!</p>
									</div></div></td>
									<td class="pobg2"></td></tr>
									<tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>
            </ul>
        </td>
		<td class="td2"><div class="help_a">此處可單獨設置孔明燈是否開啟</div></td>
		<td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][ifkmd]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	  <td class="td1">版塊最多顯示</td>
          <td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[kmdnumber]" value="$forumset[kmdnumber]" /></td>
        <td class="td2"><div class="help_a">默認帖子列表最多能顯示多少個孔明燈帖</div></td>
		 <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][kmdnumber]" value="1" /></div></td>
    </tr>
</table>
<h2 class="h1">主題相關</h2>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
    <tr class="tr1 vt">
        <td class="td1">閱讀頁主題相關功能</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[ifrelated]" $ifrelated_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[ifrelated]" $ifrelated_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">將在每個帖子主題內容下方出現相關信息</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][ifrelated]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">顯示條數</td>
        <td class="td2"><input type="text" class="input input_wa mr5" name="forumsetdb[relatednums]"  value="$forumset[relatednums]" /></td>
        <td class="td2"><div class="help_a">自定義匹配條件不受此限制</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][relatednums]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">相關匹配條件</td>
        <td class="td2">
            <select class="select_wa" name="forumsetdb[relatedcon]" onchange="relatedsel(this.value);">
<!--
EOT;
	if($db_modes['o']['ifopen']){print<<<EOT
-->
			<optgroup label="作者相關"><option value="ownpost" $r_ownpost>最新帖子</option><option value="owndigest" $r_owndigest>精華帖子</option><option value="ownhits" $r_ownhits>人氣帖子</option><option value="ownreply" $r_ownreply>熱門回復</option><option value="oinfo" $r_oinfo>個人中心動態</option></optgroup><optgroup label="Tags相關"><option value="pictags" $r_pictags>主題帖Tags</option><option value="hottags" $r_hottags>最熱tags</option><optgroup label="版塊相關"><option value="forumpost" $r_forumpost>最新帖子</option><option value="forumdigest" $r_forumdigest>精華帖子</option><option value="forumhits" $r_forumhits>人氣帖子</option><option value="forumreply" $r_forumreply>熱門回復</option></optgroup><optgroup label="整站相關"><option value="allpost" $r_allpost>最新帖子</option><option value="alldigest" $r_alldigest>精華帖子</option><option value="allhits" $r_allhits>人氣帖子</option><option value="allreply" $r_allreply>熱門回復</option></optgroup><optgroup label="其他相關"><option value="custom" $r_custom>自定義信息</option></optgroup>
<!--
EOT;
	}else{print<<<EOT
-->
			<optgroup label="作者相關"><option value="ownpost" $r_ownpost>最新帖子</option><option value="owndigest" $r_owndigest>精華帖子</option><option value="ownhits" $r_ownhits>人氣帖子</option><option value="ownreply" $r_ownreply>熱門回復</option></optgroup><optgroup label="Tags相關"><option value="pictags" $r_pictags>主題帖Tags</option><option value="hottags" $r_hottags>最熱tags</option><optgroup label="版塊相關"><option value="forumpost" $r_forumpost>最新帖子</option><option value="forumdigest" $r_forumdigest>精華帖子</option><option value="forumhits" $r_forumhits>人氣帖子</option><option value="forumreply" $r_forumreply>熱門回復</option></optgroup><optgroup label="整站相關"><option value="allpost" $r_allpost>最新帖子</option><option value="alldigest" $r_alldigest>精華帖子</option><option value="allhits" $r_allhits>人氣帖子</option><option value="allreply" $r_allreply>熱門回復</option></optgroup><optgroup label="其他相關"><option value="custom" $r_custom>自定義信息</option></optgroup>
<!--
EOT;
	}print<<<EOT
-->
			</select>
        </td>
        <td class="td2"><div class="help_a">選擇Tags相關必須開啟標簽功能才有效</div></td>
       <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][relatedcon]" value="1" /></div></td>
    </tr>
    <tbody id="related" style="display:none">
    <tr class="tr1 vt">
        <td class="td1">&nbsp;</td>
        <td class="td2">自定義標題</td>
        <td class="td2">自定義鏈接 <a style="cursor:pointer;color:blue" onclick="addrelated();">[添加]</a></td>
        <td class="td2">&nbsp;</td>
    </tr>
<!--
EOT;
	if($forumset[relatedcustom]){
		foreach ($forumset[relatedcustom] as $key => $value){
print <<<EOT
-->
    <tr class="tr1 vt">
        <td class="td1">&nbsp;</td>
        <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][title][]" value="{$value[title]}"></td>
        <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][url][]" value="{$value[url]}"></td>
        <td class="td2">&nbsp;</td>
    </tr>
<!--
EOT;
		}
	}else{
		$i=0;
		for($i;$i<8;$i++){print<<<EOT
-->
    <tr class="tr1 vt">
        <td class="td1">&nbsp;</td>
        <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][title][]"></td>
        <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][url][]"></td>
        <td class="td2">&nbsp;</td>
    </tr>
<!--
EOT;
		}
	}print<<<EOT
-->
    </tbody>
    <tbody id="relatedmode" style="display:none">
        <tr class="tr1 vt">
            <td class="td1">&nbsp;</td>
            <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][title][]"></td>
            <td class="td2"><input type="text" class="input input_wb" name="forumsetdb[relatedcustom][url][]">
                <a style="cursor:pointer;color:#FA891B" onclick="delrelated(this);">[刪除]</a>
            </td>
            <td class="td2">&nbsp;</td>
        </tr>
    </tbody>
   <tbody id="relatedbody"></tbody>
</table>
<script type="text/javascript">
function relatedsel(id){
	if (id == 'custom') {
		getObj('related').style.display = '';
		getObj('relatedbody').style.display = '';
	} else {
		getObj('related').style.display = 'none';
		getObj('relatedbody').style.display = 'none';
	}
}
var relatedcon = '$forumset[relatedcon]';
if (relatedcon == 'custom') {
	setTimeout('relatedsel("custom");',50);
}
function addrelated() {
	var s = getObj('relatedmode').rows[0].cloneNode(true);
	getObj('relatedbody').appendChild(s);
}
function delrelated(obj) {
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}

</script>
<h2 class="h1">版塊發帖時間域限制</h2>
<table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr1 vt">
        <td class="td1">允許發帖的時間域</td>
        <td class="td2" width="450">
        	<ul class="list_A list_80">
<!--
EOT;
	for($i=0;$i<24;$i++){
		$checked = strpos($forumset[allowtime],",$i,")!==false ? 'checked' : '';
print <<<EOT
-->
            <li><input type="checkbox" name="allowtime[]" value="$i" $checked />$i 點</li>
<!--
EOT;
	}print <<<EOT
 -->
 			</ul>
        </td>
        <td class="td2"><div class="help_a">允許發帖的時間域<br />(全不選則不限制)</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][allowtime]" value="1" /></div></td>
    </tr>
</table>
</div>
<div id="c_recommended" style="display:none" class="admin_table mb10">
<h2 class="h1">版主推薦</h2>
<table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr1 vt">
        <td class="td1">版主推薦功能</td>
        <td class="td2">
        	<ul class="cc list_80 fl list_A">
               <li><input type="radio" value="1" name="forumsetdb[commend]" $commend_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[commend]" $commend_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><!--版主推薦--></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][commend]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">推薦自動功能</td>
        <td class="td2">
        	<select name="forumsetdb[autocommend]" class="select_wa">
                <option value="0" $autocommend_0>不生成</option>
                <option value="1" $autocommend_1>按發帖時間</option>
                <option value="2" $autocommend_2>按最後回復時間</option>
                <option value="3" $autocommend_3>按點擊率</option>
                <option value="4" $autocommend_4>按回復數</option>
                <option value="5" $autocommend_5>按精華帖</option>
            </select>
        </td>
        <td class="td2"><div class="help_a">當推薦列表不足設置的最大顯示條數時，將按所選排序方式自動生成</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][autocommend]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">推薦列帖子列表</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[commendlist]" value="$forumset[commendlist]" /></td>
        <td class="td2"><div class="help_a">多個列表ID之間使用‘,’隔開，例如︰1234,45,暫時不支持其它版塊帖子調用</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][commendlist]" value="1" /> </div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">推薦列表最大顯示條數</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[commendnum]" value="$forumset[commendnum]" /></td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][commendnum]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">標題最大字節數</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[commendlength]" value="$forumset[commendlength]" /></td>
        <td class="td2"><div class="help_a">最大值為30，當設定值超過30時前台截取為30字節</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][commendlength]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">推薦列表緩存間隔[秒]</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[commendtime]" value="$forumset[commendtime]" /></td>
        <td class="td2"><div class="help_a">當開啟推薦列表自動生成功能時，定期更新推薦列表(建議值 3600，0為不更新)</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][commendtime]" value="1" /></div></td>
    </tr>
</table>
</div>
<div id="c_threadtype" style="display:none" class="admin_table mb10">
<h2 class="h1">版塊主題分類</h2>
<table cellspacing="0" cellpadding="0" width="100%">

    <tr class="tr1 vt">
        <td class="td1">主題分類控制</td>
        <td class="td2">
        	<ul class="cc list_80 list_A mb10">
                <li><input type="radio" value="2" name="t_type" $t_type_2 />強制分類</li>
                <li><input type="radio" value="1" name="t_type" $t_type_1 />允許分類</li>
                <li><input type="radio" value="0" name="t_type" $t_type_0 />關閉分類</li>
            </ul>
			<div class="c"></div>

        </td>
        <td class="td2"><div class="help_a">設置發帖時是否需要選擇主題分類。管理員、分欄版主、本版版主不受此限制。</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[t_type]" value="1" /></div></td>
    </tr>
	   

	   <tr class="tr1 vt">
        <td class="td1">主題分類管理</td>
        <td class="td2">
                        <div class="admin_table_c">
            	<table cellpadding="0" cellspacing="0" style="table-layout:auto;">
                	<tr>
                    	<td width="80">系統組</td>
                    	<td width="60">順序</td>
                    	<td width="95">名稱</td>
                      <td width="95">圖標URL</td>
                      <td><a class="cp s3" onclick="addtype();">[添加一級分類]</a></td>
                    </tr>
<!--
EOT;
	foreach ($typedb as $key => $value){
		$ifsystype = $value['ifsys'] ? 'checked' : '';
print <<<EOT
-->
                    <tr id="ttype_$value[id]">
                    		<td><input type="checkbox" value="1" name="t_sys_db[$key]" $ifsystype /></td>
                    		<td><input type="text" class="input input_wd" value="$value[vieworder]" name="t_view_db[$key]"></td>
                        <td><input type="text" class="input input_wc" value="$value[name]" name="t_db[$key]" /></td>
                        <td><input type="text" class="input input_wc" value="$value[logo]" name="t_logo_db[$key]" /></td>
                        <td><a href="javascript:;" onclick="addSubType($value[id]);" class="mr10">[添加二級分類]</a><a href="javascript:;" onclick="delTtype('$value[id]','top','$fid');">[刪除]</a></td>
                    </tr>
<!--
EOT;
		foreach ($subtypedb as $k => $v){
			if ($key == $v['upid']){
				$ifsubsystype = $v['ifsys'] ? 'checked' : '';
print <<<EOT
-->
                    <tr id="ttype_$v[id]">
                        <td><input type="checkbox" value="1" name="t_sys_db[{$v[id]}]" $ifsubsystype /></td>
                        <td>├&nbsp;<input type="text" class="input input_wd" name="t_view_db[{$v[id]}]" value="$v[vieworder]"></td>
                        <td><input type="text" class="input input_wc" value="$v[name]" name="t_db[{$v[id]}]" /></td>
                        <td><input type="text" class="input input_wc" value="$v[logo]" name="t_logo_db[{$v[id]}]" /></td>
                        <td><a href="javascript:;" onclick="delTtype('$v[id]','sub','$fid');">[刪除]</a></td>
                    </tr>
<!--
EOT;
			}
		}print <<<EOT
-->
					<tr><td colspan="6" style="padding:0;"><tbody id="t_sub_body_$value[id]"></tbody></td></tr>
<!--
EOT;
	}print <<<EOT
-->
					<tbody id="tbody"></tbody>
					<tbody id="tmode" style="display:none"><tr><td><input type="checkbox" value="1" name="new_t_sys_db[]" /></td><td><input type="text" class="input input_wd mr5" name="new_t_view_db[]"></td><td><input type="text" class="input input_wc" value="" name="new_t_db[]" /></td><td><input type="text" class="input input_wc" name="new_t_logo_db[]" /></td><td>&nbsp;</td></tr></tbody>
					<tbody id="t_sub_mode" style="display:none"><tr><td><input type="checkbox" value="1" name="new_t_sub_sys_db" /></td><td width="60">├&nbsp;<input type="text" class="input input_wd mr5" name="new_t_sub_view_db"></td><td width="95"><input type="text" class="input input_wc" value="" name="new_t_sub_db" /></td><td width="95"><input type="text" class="input input_wc" name="new_t_sub_logo_db" /></td><td>&nbsp;</td></tr></tbody>
            	</table>
            </div>
        </td>
        <td class="td2"><div class="help_a">圖標URL支持外鏈（http://開頭），非系統組成員無法使用系統組專用的主題分類<br />設為默認功能只對強制分類有效，設置默認分類後前台發帖時會顯示默認分類</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[t_typemain]" value="1" /></div></td>
    </tr>
        
        
    <tr class="tr1 vt">
        <td class="td1">帖子列表分類顯示</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[addtpctype]" $addtpctype_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[addtpctype]" $addtpctype_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，帖子列表頁將顯示主題分類名稱。如果分類設置了圖標URL，則顯示分類圖標</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][addtpctype]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">允許版主管理</td>
        <td class="td2">
            <ul class="cc list_80 fl list_A">
                <li><input type="radio" value="1" name="forumsetdb[allowtpctype]" $allowtpctype_Y />開啟</li>
                <li><input type="radio" value="0" name="forumsetdb[allowtpctype]" $allowtpctype_N />關閉</li>
            </ul>
        </td>
        <td class="td2"><div class="help_a">開啟後，允許版主管理該板塊的主題分類</div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][allowtpctype]" value="1" /></div></td>
    </tr>
</table>
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript">
function addtype(){
	var s = getObj('tmode').firstChild.cloneNode(true);
	getObj('tbody').appendChild(s);
}

function addSubType(id) {
	var inputs = getObj('t_sub_mode').getElementsByTagName('input');
	inputs[0].name = "new_t_sub_view_db\["+id+"\]\[\]";
	inputs[1].name = "new_t_sub_sys_db\["+id+"\]\[\]";
	inputs[2].name = "new_t_sub_db\["+id+"\]\[\]";
	inputs[3].name = "new_t_sub_logo_db\["+id+"\]\[\]";
	var s = getObj('t_sub_mode').firstChild.cloneNode(true);
	getObj('t_sub_body_'+id).appendChild(s);
}


function delTtype(id,type,fid) {
	var url = '$ajaxurl';
	if (type == 'top') {
		if (!confirm("確定要刪除此主題分類嗎？刪除此主題分類將同時刪除其二級分類")) return false;
	} else if (type == 'sub') {
		if (!confirm("確定要刪除此主題分類嗎？")) return false;
	}
	var data = 'action=delttype&type='+type+'&id='+id+'&fid='+fid;
	setTimeout("ajax.send('" + url + "','" + data + "',delTtypeR)",200);
}

function delTtypeR(){
	var ids = ajax.request.responseText.split("\t");
	if (ids[0] == 'success') {
		for (var i = 1;i<ids.length;i++) {
			delElement('ttype_'+ids[i]);
		}
	} else {
		alert("刪除錯誤！");
	}
}
addtype();
</script>
</div>

<div id="c_usercredit" style="display:none" class="admin_table mb10">
	<h2 class="h1"><span class="mr20">版塊積分設置</span><span class="linka">注:<font color="blue">威望積分</font>支持小數點後一位，其他積分只允許整數，留空則使用“全局-積分設置”處的默認值 ！</span></h2>
    <table cellspacing="0" cellpadding="0" width="100%" class="mb10">
        <tr class="tr2">
            <td width="60">積分名稱</td>
            <td>精華主題 ( + ) </td>
            <td>發表主題 ( + ) </td>
            <td >發表回復 ( + ) </td>
            <td>取消精華 ( - ) </td>
            <td>刪除主題 ( - ) </td>
            <td>刪除回復 ( - ) </td>
        </tr>
<!--
EOT;
	foreach($credit->cType as $key => $value){print <<<EOT
-->
        <tr class="vt tr1">
            <td class="td2">$value</td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Digest][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Digest][$key]" value="{$creditset[Digest][$key]}" />
            </td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Post][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Post][$key]" value="{$creditset[Post][$key]}" />
            </td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Reply][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Reply][$key]" value="{$creditset[Reply][$key]}" />
            </td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Undigest][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Undigest][$key]" value="{$creditset[Undigest][$key]}" />
            </td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Delete][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Delete][$key]" value="{$creditset[Delete][$key]}" />
            </td>
            <td class="td2"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[creditset][Deleterp][$key]" value="1" />
                <input type="text" class="input input_wc" name="creditdb[Deleterp][$key]" value="{$creditset[Deleterp][$key]}" />
            </td>
        </tr>
<!--
EOT;
	}print <<<EOT
-->
    </table>
<h2 class="h1">版塊訪問積分限制</h2>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
    <tr class="tr1 vt">
        <td class="td1">至少需要{$db_rvrcname}</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[rvrcneed]"  value="$forumset[rvrcneed]" /></td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][rvrcneed]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">至少需要{$db_moneyname}</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[moneyneed]"  value="$forumset[moneyneed]" /></td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][moneyneed]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">至少需要{$db_creditname}</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[creditneed]"  value="$forumset[creditneed]" /></td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][creditneed]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
    	<td class="td1">至少需要發帖數</td>
        <td class="td2"><input type="text" class="input input_wa" name="forumsetdb[postnumneed]"  value="$forumset[postnumneed]" /></td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][postnumneed]" value="1" /></div></td>
    </tr>
</table>
<h2 class="h1">其他積分相關</h2>
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
    <tr class="tr1 vt">
        <td class="td1">懸賞帖積分設置</td>
        <td class="td2">
            <div class="admin_table_c">
                <table cellpadding="0" cellspacing="0" width="100%">
                	<tr>
                        <td width="70">有效時間:</td>
                         <td width="260"><input type="text" class="input input_wa mr10" name="rewarddb[0]" value="$rw_time" />[天]<span></span></td>
                    </tr>
                    <tr>
                        <td>最佳答案:</td>
                        <td><input type="text" class="input input_wa mr10" name="rewarddb[1]" value="$rw_b_val" />[最小積分]</td>
                    </tr>
                    <tr>
                        <td>熱心助人:</td>
                        <td><input type="text" class="input input_wa mr10" name="rewarddb[2]" value="$rw_a_val" />[最小積分]</td>
                        <td><div class="help_a">積分只能是整數</div></td>
                    </tr>
                    
                    <tr class="vt">
                        <td>懸賞積分:</td>
                        <td>
                            <ul class="cc list_A list_80">
<!--
EOT;
	foreach ($credit->cType as $key => $val) {
		$checked = in_array($key,$rw_credit) ? 'checked' : '';
print <<<EOT
-->
		 						<li><input type="checkbox" name="rewarddb[3][]" value="$key" $checked />&nbsp;$val</li>
<!--
EOT;
	}print <<<EOT
-->
                            </ul>
                        </td>
                    </tr>
                </table>
              </div>
        </td>
        <td class="td2"><div class="help_a"><!-- 懸賞帖設置 --></div></td>
        <td class="td2" width="40"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][rewarddb]" value="1" /></div></td>
	</tr>
    <tr class="tr1 vt">
       <td class="td1">附件積分控制</td>
        <td class="td2">
            <div class="admin_table_c">
                <table cellpadding="0" cellspacing="0" width="100%">
                	<tr>
                        <td width="120">附件積分類型設置:</td>
                         <td><select name="uploadset[credit]" class="select_wa">
<!--
EOT;
	foreach ($credit->cType as $key => $val) {
		if ($key == $uploadcredit) {print <<<EOT
-->
                            <option value="$key" selected>{$val}</option>
<!--
EOT;
		}else{print <<<EOT
-->
                            <option value="$key">{$val}</option>
<!--
EOT;
		}
	}print <<<EOT
-->
                            </select>
                         </td>
                    </tr>
                    <tr>
                        <td>上傳附件獎勵積分:</td>
                        <td><input type="text" class="input input_wa" name="uploadset[upload]" value="$uplodmoney" />&nbsp;小于0表示扣除積分</td>
                    </tr>
                    <tr>
                        <td>下載附件扣除積分:</td>
                        <td><input type="text" class="input input_wa" name="uploadset[download]" value="$downloadmoney" />&nbsp;小于0表示獎勵積分</td>
                    </tr>
                    <tr>
                        <td>瀏覽圖片扣除積分:</td>
                        <td>
                            <ul class="cc list_80 list_A">
                                <li><input type="radio" name="uploadset[type]" value="1" $img_Y /> 開啟</li>
                                <li><input type="radio" name="uploadset[type]" value="0" $img_N /> 關閉</li>
                            </ul>
                        </td>
                    </tr>
                </table>
              </div>
        </td>
        <td class="td2"><div class="help_a">上傳附件與下載附件積分控制<br />瀏覽圖片扣除積分開啟後跟隨下載附件的積分設置，圖片附件只有下載後才能查看</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[forumsetdb][uploadset]" value="1" /></div></td>
    </tr>
	</table>
</div>
<div class="admin_table mb10" id="c_usergroup" style="display:none">
<h2 class="h1">版塊權限--全不選則默認為開放版塊</h2>
<table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr1 vt">
        <td class="td1">允許瀏覽版塊</td>
        <td class="td2">$viewvisit</td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowvisit]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">允許瀏覽帖子</td>
        <td class="td2">$viewread </td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowread]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">發表主題</td>
        <td class="td2">$viewpost </td>
        <td class="td2"><div class="help_a">關聯板塊的群組成員不受限制</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowpost]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">發表回復</td>
        <td class="td2">$viewrp </td>
        <td class="td2"><div class="help_a">關聯板塊的群組成員不受限制</div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowrp]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">允許上傳附件</td>
        <td class="td2">$viewupload</td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowupload]" value="1" /></div></td>
    </tr>
    <tr class="tr1 vt">
        <td class="td1">允許下載附件</td>
        <td class="td2">$viewdownload</td>
        <td class="td2"><div class="help_a"></div></td>
        <td class="td2"><div class="none_pw"><input type="checkbox" onclick="pwJsCheck(this)" name="otherforum[allowdownload]" value="1" /></div></td>
    </tr>
</table>
</div>


<div class="admin_table mb10">
<h2 id="headCtrlCrossConfig" class="h1 cp">高級設置</h2>
<div class="admin_table mb10 none_pw">
<table cellspacing="0" cellpadding="0" width="100%" class="mb10">
    <tr class="tr1 vt">
        <td class="td1" valign="top">版塊設置橫向操作<!--利用此功能可將一個或多個設置同時應用到其它版塊中，不再需要逐個版塊設置，使操作更加簡便<br />操作說明:<ol><li><font color=blue>選中</font>需要進行橫向操作的<font color=blue>權限設置後面的復選框</font></li><li>在左邊的復選框中<font color=blue>選擇</font>需要進行橫向操作的<font color=blue>版塊</font></li><li>然後提交即可完成版塊權限橫向操作</li></ol>注:<ol><li>選擇版塊時可使用 ‘Ctrl’ 鍵進行多選，也可使用 ‘Shift’ 鍵或拖動鼠標連續選擇多個版塊</li><li>不使用此功能，請不要選中<font color=blue>權限設置後面的復選框</font>和左邊的復選框中<font color=blue>版塊</font></li></ol>--></td>
        <td class="td2"><select  class="select_wa" name="otherfid[]" size="16" multiple>$forumcache</select></td>
        <td class="td2"><div class="help_a">利用此功能可將一個或多個設置同時應用到其它版塊中，不再需要逐個版塊設置，使操作更加簡便<br />操作說明:<ol><li><font color=blue>選中</font>需要進行橫向操作的<font color=blue>權限設置後面的復選框</font></li><li>在左邊的復選框中<font color=blue>選擇</font>需要進行橫向操作的<font color=blue>版塊</font></li><li>然後提交即可完成版塊權限橫向操作</li></ol>注:<ol><li>選擇版塊時可使用 ‘Ctrl’ 鍵進行多選，也可使用 ‘Shift’ 鍵或拖動鼠標連續選擇多個版塊</li><li>不使用此功能，請不要選中<font color=blue>權限設置後面的復選框</font>和左邊的復選框中<font color=blue>版塊</font></li></ol></div></td>
    </tr>
</table>
</div>
</div>

</div>
<!--
EOT;
}print <<<EOT
-->
<div class="mb10 tac">
    <span class="btn"><span><button type="submit" onfocus="blur();">提 交</button></span></span>
    <span class="bt"><span><button type="reset" onfocus="blur();">重 置</button></span></span>
</div>
</form>

<script type="text/javascript">
function showtab(t,a){
	if (getObj(t)) {
		var hasCurrent = false;
		var obj = getObj(t).getElementsByTagName('li');
		for (var i=0;i<obj.length;i++) {
			try{
			if (obj[i].id==a) {
				getObj(obj[i].id).className = 'current';
				getObj('c_'+a).style.display = '';
				getObj('c_type').value = a;
				setCookie('thisPWTabs',a);
				hasCurrent = true;
			} else {
				getObj(obj[i].id).className = '';
				getObj('c_'+obj[i].id).style.display = 'none';
			}
			}catch(e){}
		}
		if (!hasCurrent) {
			getObj('basic').className = 'current';
			getObj('c_basic').style.display = '';
			setCookie('thisPWTabs','basic');
		}
	}
}
function DelCookie(name) {
	expires = new Date();
	expires.setTime(expires.getTime()-(86400*365));
	document.cookie=name+"=; expires="+expires.toGMTString()+"; path=/";
}

function FetchCookie(name) {
	var start = document.cookie.indexOf(name);
	var end = document.cookie.indexOf(";",start);
	return start==-1 ? null : unescape(document.cookie.substring(start+name.length+1,(end>start ? end : document.cookie.length)));
}
~function() {
	
	//var c_type = FetchCookie('thisPWTabs');
	//DelCookie('thisPWTabs');
	//if (c_type)c_type = '$c_type';
	showtab('tab3_eidt','$c_type');
}();
<!--
EOT;
if($type!='category'){print <<<EOT
-->
//showtab('tab3_eidt','$thisPWTabs');
<!--
EOT;
} else {print <<<EOT
-->
	getObj('c_basic').style.display = '';
<!--
EOT;
}print <<<EOT
-->

function displayCrossConfigDiv() {
	var frm = document.getElementById('addform');
	frm.className = (frm.className=='addform') ? '' : 'addform';
}

<!--
EOT;
if($type!='category'){print <<<EOT
-->
getObj('linkCtrlCrossConfig').onclick = displayCrossConfigDiv;
getObj('headCtrlCrossConfig').onclick = displayCrossConfigDiv;
<!--
EOT;
}print <<<EOT
-->
</script>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->