<!--<?php
include_once PrintEot('left');
if (empty($action)){print <<<EOT
-->
<br>
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head>
{#setforum_add}</td></tr>
<tr><td class=b><br>
{#setforum_add_info}
<form action="$basename&" method=POST>
<input type=hidden name="action" value="addforum">
<input type=hidden name="forumtype" value="category">
<input type=hidden name="type" value='$type'>
{#setforum_addcate}
<input type=text name="name" size=10>
&nbsp;&nbsp;
<input type=submit value="{#submit}"><br></form>

<form action="$basename&" method="POST">
<input type=hidden name="action" value="addforum">
<input type=hidden name="forumtype" value="forum">
<input type=hidden name="type" value='$type'>
{#setforum_addforum}
<input type=text name="name" size=10> {#setforum_cate}
<select name="fup">$forumcache</select>
<input type=submit value="{#submit}"></form>
</td></tr></table><br>
<form action="$basename&" method=POST><input type=hidden name="action" value="editforum">
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head>{#setforum_title}</td></tr>
<tr><td class=b><br>
{#setforum_info}
<!-- 
EOT;
foreach($threaddb as $thread){
if($thread){
print <<<EOT
-->
$thread[space]
$thread[name]&nbsp;&nbsp;&nbsp; FID£º[$thread[fid]] - {#setforum_order}<input type="text" name="order[$thread[fid]]" value="$thread[vieworder]" size="1">&nbsp;
{#setforum_admin}<input type="text" name="forumadmin[$thread[fid]]" value="$thread[forumadmin]" size="15"> - <a href="$basename&action=edit&fid=$thread[fid]"><b>{#setforum_edit}</b></a>
<a href="$basename&action=delete&fid=$thread[fid]"><b>{#setforum_del}</b></a>
<br><br>
<!-- 
EOT;
}}if($forum_L){print <<<EOT
-->
$space {#setforum_error}<br><br>
<!-- 
EOT;
foreach($forum_L as $key=> $thread){
if($thread){print <<<EOT
-->
$thread[space]
$thread[name] 
&nbsp;&nbsp;&nbsp; FID£º[$thread[fid]]
- {#setforum_order}<input type="text" name="order[$thread[fid]]" value="$thread[vieworder]" size="1">&nbsp;
{#setforum_admin}<input type="text" name="forumadmin[$thread[fid]]" value="$thread[forumadmin]" size="15"> - <a href="$basename&action=edit&fid=$thread[fid]" target='_balnk'>[{#setforum_edit}]</a> 
<a href="$basename&action=delete&fid=$thread[fid]" target='_balnk'>[{#setforum_del}]</a>
<br><br>
<!-- 
EOT;
}}}print <<<EOT
-->
<center><input type=submit value="{#submit}"></center><br>
</td></tr></table>
<br><br></form>
<!-- 
EOT;
}elseif($action=='delete'){
print <<<EOT
-->
<form action="$basename&action=delete&fid=$fid" method="post">
<input type=hidden name="step" value="2">
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head colspan=2>{#guide}</td></tr>
<tr><td class=b><br>
{#setforum_confirm} 
<br><br></td><td class=b align=center><br><input type=submit value="{#del_submit}"><br><br></td></tr></table><br>
<br><br>
<center> <input type='button' value='{#msg_back}' onclick='javascript:history.go(-1);'></center><br>
</form>
<!-- 
EOT;
}elseif($action=='credit'){
print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=b>
[<a href="$admin_file?adminjob=setforum">{#setforum_admincp}</a>]
[<a href="$admin_file?adminjob=setforum&action=edit&fid=$fid">{#setforum_forumset}</a>]
[<b>{#setforum_creditset}</b>]
</td></tr></table><br>
<form action="$basename&" method="post">
<input type=hidden name="action" value="credit">
<input type=hidden name="step" value="2">
<input type=hidden name="fid" value="$fid">

<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=3><a class=bold>{#setforum_creditset}</a></td></tr>
<tr><td class=b colspan=3>{#setforum_rvrc}{#setforum_empty}</td></tr>
<tr class=b>
<td width="3%"><input type="checkbox" name="otherforum[rvrc][Digest]" value="1"></td>
<td width="30%">{#setforum_Dgrvrc}</td>
<td><input type=text name="creditdb[rvrc][Digest]" size=10  value="{$credit[rvrc][Digest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[rvrc][Post]" value="1"></td>
<td>{#setforum_Prvrc}</td>
<td><input type=text name="creditdb[rvrc][Post]" size=10  value="{$credit[rvrc][Post]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[rvrc][Reply]" value="1"></td>
<td>{#setforum_Rrvrc}</td>
<td><input type=text name="creditdb[rvrc][Reply]" size=10  value="{$credit[rvrc][Reply]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[rvrc][Undigest]" value="1"></td>
<td>{#setforum_Undgrvrc}</td>
<td><input type=text name="creditdb[rvrc][Undigest]" size=10  value="{$credit[rvrc][Undigest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[rvrc][Delete]" value="1"></td>
<td>{#setforum_Drvrc}</td>
<td><input type=text name="creditdb[rvrc][Delete]" size=10  value="{$credit[rvrc][Delete]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[rvrc][Deleterp]" value="1"></td>
<td>{#setforum_DRrvrc}</td>
<td><input type=text name="creditdb[rvrc][Deleterp]" size=10  value="{$credit[rvrc][Deleterp]}"></td></tr>
<tr><td class=b colspan=3>{#setforum_money}{#setforum_empty}</td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Digest]" value="1"></td>
<td>{#setforum_Dgmoney}</td>
<td><input type=text name="creditdb[money][Digest]" size=10  value="{$credit[money][Digest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Post]" value="1"></td>
<td>{#setforum_Pmoney}</td>
<td><input type=text name="creditdb[money][Post]" size=10  value="{$credit[money][Post]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Reply]" value="1"></td>
<td>{#setforum_Rmoney}</td>
<td><input type=text name="creditdb[money][Reply]" size=10  value="{$credit[money][Reply]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Undigest]" value="1"></td>
<td>{#setforum_Undgmoney}</td>
<td><input type=text name="creditdb[money][Undigest]" size=10  value="{$credit[money][Undigest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Delete]" value="1"></td>
<td>{#setforum_Dmoney}</td>
<td><input type=text name="creditdb[money][Delete]" size=10  value="{$credit[money][Delete]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[money][Deleterp]" value="1"></td>
<td>{#setforum_DRmoney}</td>
<td><input type=text name="creditdb[money][Deleterp]" size=10  value="{$credit[money][Deleterp]}"></td></tr>
<!--
EOT;
foreach($_CREDITDB as $key => $value){
print <<<EOT
-->
<tr><td class=b colspan=3><font color="red">{$value[0]}</font>{#setforum_empty}</td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Digest]" value="1"></td>
<td>{#setforum_Digest}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Digest]"   size=10  value="{$credit[$key][Digest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Post]" value="1"></td>
<td>{#setforum_Post}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Post]"     size=10  value="{$credit[$key][Post]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Reply]" value="1"></td>
<td>{#setforum_Reply}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Reply]"    size=10  value="{$credit[$key][Reply]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Undigest]" value="1"></td>
<td>{#setforum_Undigest}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Undigest]" size=10  value="{$credit[$key][Undigest]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Delete]" value="1"></td>
<td>{#setforum_Delete}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Delete]"   size=10  value="{$credit[$key][Delete]}"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[$key][Deleterp]" value="1"></td>
<td>{#setforum_Deleterp}{$value[0]}</td>
<td><input type=text name="creditdb[$key][Deleterp]" size=10  value="{$credit[$key][Deleterp]}"></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr class=head align=center><td colspan=2>{#setforum_advanceset}</td></tr>
<tr class=b><td width="63%" valign="top">{#setforum_otherforums}</td>
<td><select name='otherfid[]' size='22' multiple>$forumcache</select></td></tr>
</td></tr></table><br>
<center><input type=submit value="{#submit}"> <input type=reset value="{#reset}"></center>
</form>
<!-- 
EOT;
}elseif($action=='edit'){
print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=b>
[<a href="$admin_file?adminjob=setforum">{#setforum_admincp}</a>]
[<b>{#setforum_forumset}</b>]
<!-- 
EOT;
if($type!='category'){
print <<<EOT
-->
[<a href="$admin_file?adminjob=setforum&action=credit&fid=$fid">{#setforum_creditset}</a>]
<!-- 
EOT;
}print <<<EOT
-->
</td></tr></table>
<br>
<form action="$basename&" method="post">
<input type=hidden name="action" value="edit">
<input type=hidden name="step" value="2">
<input type=hidden name="fid" value="$fid">
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr><td class=head align=center colspan=3>{#setforum_right}</td></tr>
	<tr class=b>
		<td width="63%" colspan=2>{#setforum_name}</td>
		<td><input type="text" size="30" value="$name" name="name"></td>
	</tr>
	<tr class=b>
		<td width="3%"><input type="checkbox" name="otherforum[vieworder]" value="1"></td>
		<td width="60%">{#setforum_order}</td>
		<td><input type="text" size="5" name="vieworder" value="$vieworder"></td>
	</tr>
	<tr class=b>
		<td><input type="checkbox" name="otherforum[forumadmin]" value="1"></td>
		<td>{#setforum_admin}</td>
		<td><input type="text" size="30" name="forumadmin" value="$forumadmin"></td>
	</tr>
	<tr class=b>
		<td><input type="checkbox" name="otherforum[style]" value="1"></td>
		<td>{#setforum_style}</td>
		<td>
			<select name="style">
				<option value="0">{#setforum_default}</option>
				$setfid_style
			</select>
		</td>
	</tr>
	<tr class=b>
		<td><input type="checkbox" name="otherforum[across]" value="1"></td>
		<td>{#setforum_across}</td>
		<td><input type="text" size="30" name="across" value="$across"></td>
	</tr>
<!-- 
EOT;
if($type=='category'){
print <<<EOT
-->
	<tr class=b>
		<td><input type="checkbox" name="otherforum[dirname]" value="1"></td>
		<td>{#setforum_dirname}</td>
		<td><input type="text" size="30" name="dirname" value="$dirname"></td>
	</tr>
<!--
EOT;
if(trim($cmscache)){print <<<EOT
-->
	<tr class=b>
		<td><input type="checkbox" name="otherforum[cms]" value="1"></td>
		<td>{#a_forum_cat}</td>
		<td>
			<input type=radio name=cms value=1 $check_c>{#c_bbs_cms}
			<input type=radio name=cms value=0 $check_f>{#c_bbs_bbs}
		</td>
	</tr>
<!--
EOT;
}else{print <<<EOT
-->
		<input type="hidden" name="cms" value="0">
<!--
EOT;
}print <<<EOT
-->
</table>
<!-- 
EOT;
}else{
if(trim($cmscache)){print <<<EOT
-->
	<tr class=b>
		<td><input type="checkbox" name="otherforum[cms]" value="1"></td>
		<td>{#c_forum_type}</td>
		<td>
			<input type=radio name=cms value=1 $check_c>{#c_bbs_cms}
			<input type=radio name=cms value=0 $check_f>{#c_bbs_bbs}
		</td>
	</tr>
<!--
EOT;
}else{print <<<EOT
-->
		<input type="hidden" name="cms" value="0">
<!--
EOT;
}print <<<EOT
-->
	<tr class=b>
		<td><input type="checkbox" name="otherforum[fup]" value="1"></td>
		<td>{#c_forum_fup}</td>
		<td>
<!-- 
EOT;
if(trim($cmscache)){print <<<EOT
-->
			{#c_bbs_cms} : <select name="cfup"><option></option>$cmscache</select><br>
<!--
EOT;
}print <<<EOT
-->
			{#c_bbs_bbs} : <select name="ffup"><option></option>$forumcache</select>
		</td>
	</tr>
	<tr class=b>
		<td><input type="checkbox" name="otherforum[descrip]" value="1"></td>
		<td>{#setforum_descrip}</td>
		<td><textarea rows="5" name="descrip" cols="45">$descrip</textarea></td>
	</tr>
	<tr class=b>
		<td><input type="checkbox" name="otherforum[logo]" value="1"></td>
		<td>{#setforum_logo}</td>
		<td><input type="text" size="30" name="logo" value="$logo"></td>
	</tr>
</table>
<br>
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=3><a class=bold>{#setforum_right}</a></td></tr>
<tr class=b>
<td width="3%"><input type="checkbox" name="otherforum[f_type]" value="1"></td>
<td width="60%">{#setforum_f_type}</td>
<td><select name="f_type">
<option value="forum"	 $ftype[forum] checked>	{#setforum_forum}</option>
<option value="former"	 $ftype[former]>{#setforum_former}</option>
<option value="hidden"	 $ftype[hidden]>{#setforum_hidden}</option>
<option value="vote"	 $ftype[vote]>	{#setforum_vote}</option></select></td></tr>
<!-- 
EOT;
if($type=='forum' && trim($cmscache)){
print <<<EOT
-->
<tr class=b>
<td><input type="checkbox" name="otherforum[ifhide]" value="1"></td>
<td>{#setforum_ifhide2}</td><td>
<input type='radio' name='ifhide' value='0' $ifhide_open>{#_yes}  
<input type='radio' name='ifhide' value='1' $ifhide_close>{#_no}  </td></tr>
<!--
EOT;
}else{print <<<EOT
-->
		<input type="hidden" name="ifhide" value="1">
<!-- 
EOT;
}print <<<EOT
-->
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][link]" value="1"></td>
<td>{#setforum_link}</td>
<td><input type="text" size="30" name="forumsetdb[link]" value="$forumset[link]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][lock]" value="1"></td>
<td>{#setforum_lock}</td>
<td><input type="text" size="30" name="forumsetdb[lock]" value="$forumset[lock]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][cutnums]" value="1"></td>
<td>{#setforum_cutnums}</td>
<td><input type="text" size="30" name="forumsetdb[cutnums]" value="$forumset[cutnums]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][threadnum]" value="1"></td>
<td>{#setforum_threadnum}</td>
<td><input type="text" size="30" name="forumsetdb[threadnum]" value="$forumset[threadnum]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][readnum]" value="1"></td>
<td>{#setforum_readnum}</td>
<td><input type="text" size="30" name="forumsetdb[readnum]" value="$forumset[readnum]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][newtime]" value="1"></td>
<td>{#setforum_newtime}</td>
<td><input type="text" size="30" name="forumsetdb[newtime]" value="$forumset[newtime]"></td></tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[forumsetdb][allowsale]" value="1"></td>
	<td>{#setforum_allowsale}</td>
	<td>
		<input type=radio value=1 name="forumsetdb[allowsale]" $allowsale_Y>{#_yes}
		<input type=radio value=2 name="forumsetdb[allowsale]" $allowsale_N>{#_no}
	</td>
</tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[viewsub]" value="1"></td>
<td>{#setforum_viewsub}</td>
<td><input type=radio value=1 $sub_open name=viewsub>{#_yes} 
<input type=radio value=0 $sub_close name=viewsub>{#_no}  </td></tr>

<tr class=b>
	<td><input type="checkbox" name="otherforum[allowhide]" value="1"></td>
	<td>{#setforum_hide}</td>
	<td>
		<input type=radio value=1 $hide_open name=allowhide>{#_yes}  
		<input type=radio value=0 $hide_close name=allowhide>{#_no}  
	</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowencode]" value="1"></td>
	<td>{#setforum_encode}</td>
	<td>
		<input type=radio value=1 $encode_open name=allowencode>{#_yes}  
		<input type=radio value=0 $encode_close name=allowencode>{#_no}
	</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowsell]" value="1"></td>
	<td>{#setforum_sell}</td>
	<td>
		<input type=radio value=1 $sell_open name=allowsell>{#_yes}  
		<input type=radio value=0 $sell_close name=allowsell>{#_no}
	</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[copyctrl]" value="1"></td>
	<td>{#setforum_copy}</td>
	<td>
		<input type=radio value=1 $copyctrl_open name=copyctrl>{#_yes}  
		<input type=radio value=0 $copyctrl_close name=copyctrl>{#_no}
	</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[f_check]" value="1"></td>
	<td>{#setforum_check}</td>
	<td>
		<input type=radio value=0 $check_0 name=f_check>{#check_0}<br>
		<input type=radio value=1 $check_1 name=f_check>{#check_1}<br>
		<input type=radio value=2 $check_2 name=f_check>{#check_2}<br>
		<input type=radio value=3 $check_3 name=f_check>{#check_3}
	</td>
</tr>
</table>
<br>
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=3><b>{#setforum_tpc_type}</b></td></tr>
<tr class=b>
	<td width="3%"><input type="checkbox" name="otherforum[forumsetdb][addtpctype]" value="1"></td>
	<td width="60%">{#setforum_addtype}</td>
	<td>
		<input type=radio value=1 $addtpctype_Y name='forumsetdb[addtpctype]'>{#_yes}  
		<input type=radio value=0 $addtpctype_N name='forumsetdb[addtpctype]'>{#_no}
	</td>
</tr>
<tr class=b>
	<td rowspan=13><input type="checkbox" name="otherforum[t_type]" value="1"></td>
	<td>{#setforum_allow_sel}</td>
	<td>
		<input type=radio value=1 $t_type_open name='t_db[0]'>{#_yes}  
		<input type=radio value=0 $t_type_close name='t_db[0]'>{#_no}
	</td>
</tr>
<!--
EOT;
for($m=1;$m<13;$m++){
print <<<EOT
-->
<tr class=b>
	<td>{#setforum_number}</td>
	<td><input type="text" size="30" maxLength=25 value="$t_typedb[$m]" name="t_db[$m]"></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br>
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=3><a class=bold>{#setforum_creditlimit}</a></td></tr>
<tr class=b>
<td width="3%"><input type="checkbox" name="otherforum[forumsetdb][rvrcneed]" value="1"></td>
<td width="60%">{#setforum_rvrcneed}</td>
<td><input type=text name="forumsetdb[rvrcneed]" size=10  value="$forumset[rvrcneed]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][moneyneed]" value="1"></td>
<td>{#setforum_moneyneed}</td>
<td><input type=text name="forumsetdb[moneyneed]" size=10  value="$forumset[moneyneed]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][creditneed]" value="1"></td>
<td>{#setforum_creditneed}</td>
<td><input type=text name="forumsetdb[creditneed]" size=10  value="$forumset[creditneed]"></td></tr>
<tr class=b>
<td><input type="checkbox" name="otherforum[forumsetdb][postnumneed]" value="1"></td>
<td>{#setforum_postnumneed}</td>
<td><input type=text name="forumsetdb[postnumneed]" size=10  value="$forumset[postnumneed]"></td></tr>
</table>
<br>
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=3><a class=bold>{#setforum_forumright}</a></td></tr>
<tr class=b>
	<td width=3%><input type="checkbox" name="otherforum[password]" value="1"></td>
	<td width=15%>{#setforum_forumpwd}</td>
	<td><input type="text" size="30" value="$password" name="password">{#setforum_intro}</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowvisit]" value="1"></td>
	<td>{#setforum_visit}</td>
	<td>$viewvisit</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowpost]" value="1"></td>
	<td>{#setforum_post}</td>
	<td>$viewpost </td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowrp]" value="1"></td>
	<td>{#setforum_reply}</td>
	<td>$viewrp </td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowupload]" value="1"></td>
	<td>{#setforum_upload}</td>
	<td>$viewupload</td>
</tr>
<tr class=b>
	<td><input type="checkbox" name="otherforum[allowdownload]" value="1"></td>
	<td>{#setforum_down}</td>
	<td>$viewdownload</td>
</tr>
</table>
<br>
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr class=head align=center><td colspan=2>{#setforum_advanceset}</td></tr>
<tr class=b><td width="63%" valign="top">{#setforum_otherforumset}</td>
<td><select name='otherfid[]' size='22' multiple>$forumcache</select></td></tr>
</table>
<!--
EOT;
}print <<<EOT
-->
<br>
<center><input type=submit value="{#submit}"> <input type=reset value="{#reset}"></center>
</form>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->