<!-- <?php
print <<<EOT
-->
<div class="bdbA">
	<div id="breadcrumbs">
		<a class="crumbs-item gray3" href="$db_bfn" title="$db_bbsname">$db_bbsname</a><a class="crumbs-item gray3" href="$basename"><i> </i>{$cy_name}</a>
<!--
EOT;
if($job=='read'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><a href="$basename&cyid=$cyid&job=board">討論區</a></span>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>

<table cellspacing="1" cellpadding="0" width="$tablewidth" align="center" border="0">
<tr>
<td valign="top" width="22%">
<!--
EOT;
if(!$job){ print <<<EOT
-->
<form action="$basename" method="post">
<table cellspacing="1" cellpadding="5" width="100%" align="center" border="0" $i_table>
<tr class="head"><td>朋友圈搜索</td></tr>
<tr class="f_one"><td>分類︰<select name="classid">
<option value=""></option>
$cnclass</select>&nbsp;&nbsp;<input type="submit" value="搜索" /></td></tr>
</table></form><br />
<!--
EOT;
} print <<<EOT
-->
<table cellspacing="1" cellpadding="5" width="100%" align="center" border="0" $i_table>
<tr class="head"><td>我加入的{$cn_name}</td></tr>
<!--
EOT;
if($mycydb){print <<<EOT
-->
<tr class="f_one"><td>
<select name="cyid" onchange="redirect('$basename&cyid='+this.options[this.selectedIndex].value+'&job=view&id='+this.options[this.selectedIndex].value)">
<option></option>
<!--
EOT;
foreach($mycydb as $key => $value){
$selected = $value[id] == $cyid ? 'selected' : '';
print <<<EOT
-->
<option value="$value[id]" $selected>$value[cname]</option>
<!--
EOT;
}print <<<EOT
-->
</select></td></tr>
<!--
EOT;
}if($cn_newcolony){print <<<EOT
-->
<tr><td class="f_one"><a href="$basename&job=creat">注冊新的{$cn_name}</a></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br />
<!--
EOT;
if($cydb){print <<<EOT
-->
<table cellspacing="1" cellpadding="5" width="100%" align="center" border="0" $i_table>
<tr class="head"><td>{$cn_name}基本功能</td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=view&id=$cyid">{$cn_name}首頁</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=card">{$cn_name}名片夾</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=editcard">編輯我的名片</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=board">討論區</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=donate">我要捐獻</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=donatelog"></a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=quit" onclick="return checkset('您確認要退出該{$cn_name}。')">我要退出該{$cn_name}</a></td></tr>
</table>
<br />
<table cellspacing="1" cellpadding="5" width="100%" align="center" border="0" $i_table>
<!--
EOT;
if($cydb[ifadmin]=='1'){print <<<EOT
-->
<tr class="head"><td>{$cn_name}管理功能</td></tr>
<tr><td class="f_one"><a href="$basename&cyid=$cyid&job=set">{$cn_name}基本設置</a></td></tr>
<tr><td class="f_one"><a href="$basename&cyid=$cyid&job=member">{$cn_name}成員</a></td></tr>
<tr class="f_one"><td><a href="$basename&cyid=$cyid&job=joinlog"></a></td></tr>
<!--
EOT;
if($windid==$cydb[admin]){print <<<EOT
-->
<tr><td class="f_one"><a href="$basename&cyid=$cyid&job=currency"></a></td></tr>
<tr><td class="f_one"><a href="$basename&cyid=$cyid&job=currencylog"></a></td></tr>
<tr><td class="f_one"><a href="$basename&cyid=$cyid&job=cancel" onclick="return checkset('您確認要解散該{$cn_name}。')">解散該{$cn_name}</a></td></tr>
<!--
EOT;
}}print <<<EOT
-->
</table><br />
<!--
EOT;
}print <<<EOT
-->
</td>

<td valign="top">
<!--
EOT;
if (!$job){
print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr class="head"><td colspan="8">{$cn_name}首頁</td></tr>
<tr class="cbg" align="center">
<td width="10%">標志</td>
<td>名稱</td>
<td>分類</td>
<td>創建者</td>
<td width="10%">成員數</td>
<td width="10%">{$db_currencyname}</td>
<td width="20%">創建時間</td>
<td width="10%">加入</td>
</tr>
<!--
EOT;
foreach ($colonydb as $value){print <<<EOT
-->
<tr class="f_one" align="center">
<td>
<!--
EOT;
if($value[cnimg]){print <<<EOT
-->
<a href="$basename&cyid=$value[id]&job=view&id=$value[id]"><img src="$imgpath/cn_img/$value[cnimg]" width="50" height="30" /></a>
<!--
EOT;
}print <<<EOT
-->
</td>
<td><a href="$basename&cyid=$value[id]&job=view&id=$value[id]">$value[cname]</a></td>
<td>$value[classname]</td>
<td>$value[admin]</td>
<td>$value[members]</td>
<td>$value[cmoney]</td>
<td>$value[createtime]</td>
<td><a href="$basename&job=join&id=$value[id]">加入</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
&nbsp; $pages
<!--
EOT;
}elseif($job=='creat'){print <<<EOT
-->
<form method="post" action="$basename&job=creat&step=2&" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr><td class="head" colspan="2">注冊新的{$cn_name}</td></tr>
<tr><td class="f_one" colspan="2">說明︰<br>創建一個{$cn_name}需要支付 {$cn_createmoney} 個{$db_currencyname}，如果您沒有足夠的{$db_currencyname}，請到 <a href=userpay.php><font color=blue>{$db_currencyname}充值</font></a> 中心進行充值</td></tr>
<tr><td class="f_one" width="50%">名稱</td>
<td class="f_one" width="50%"><input type="text" name="cnname" size="50" /></td></tr>
<tr><td class="f_one" width="50%">分類</td>
<td class="f_one" width="50%">
<select name="cn_class">
<!--
EOT;
foreach ($classdb as $class){print <<<EOT
-->
<option value="$class[cid]">$class[cname]
<!--
EOT;
}print <<<EOT
-->
</select></td></tr></table>
<br /><center><input type="submit" value="提 交" /></center></form>
<!--
EOT;
}elseif ($job=='view'){
print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word">
<tr class="head"><td colspan="2">{$cn_name}首頁</td></tr>
<tr class="f_one" align="center"><td colspan="2">
<!--
EOT;
if($cndb[cnimg]){print <<<EOT
-->
<img src="$imgpath/cn_img/$cndb[cnimg]" />
<!--
EOT;
}print <<<EOT
-->
<br /><br />
[<a href="$basename&job=join&id=$id">加入該{$cn_name}</a>]
[<a href="$basename&job=board&cyid=$id">進入討論區</a>]
[<a href="$basename&cyid=$id&job=card">{$cn_name}名片夾</a>]
</td></tr>
<tr class="f_one"><td >名稱</td><td>$cndb[cname]</td></tr>
<tr class="f_one"><td>創建者</td>
<td><a href="u.php?action=show&username=$cndb[admin]">$cndb[admin]</a></td></tr>
<tr class="f_one"><td>成員數</td><td>$cndb[members]</td></tr>
<tr class="f_one"><td>{$db_currencyname}</td><td>$cndb[cmoney]</td></tr>
<!-- <tr class="f_one"><td>等級</td><td>$cndb[levels]</td></tr> -->
<tr class="f_one"><td>會員加入需要{$db_currencyname}</td><td>$cndb[intomoney] ($db_currencyname)</td></tr>
<tr class="f_one"><td>創建時間</td><td>$cndb[createtime]</td></tr>
<tr class="f_one"><td>{$cn_name}簡介</td><td>$cndb[descrip]</td></tr>
<!--
EOT;
if ($cydb[ifadmin]!='-1' || $cndb[annoucesee]){
print <<<EOT
-->
<tr class="f_one"><td>{$cn_name}公告</td><td>$cndb[annouce]</td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br />
<!--
EOT;
}elseif ($job=='join'){
print <<<EOT
-->
<form method="post" action="$basename&job=join&id=$id&">
<input type="hidden" name="step" value="2" />
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr><td class="head" colspan="2">{$cn_name}名片設置</td></tr>
<tr><td class="f_one" colspan="2">說明︰<br>加入{$cn_name}需要支付 {$cydb[intomoney]} 個{$db_currencyname}，如果您沒有足夠的{$db_currencyname}，請到 <a href=userpay.php><font color=blue>{$db_currencyname}充值</font></a> 中心進行充值</td></tr>
<tr><td class="f_one" width="50%">真實姓名</td>
<td class="f_one" width="50%"><input type="text" name="realname" /></td></tr>
<tr><td class="f_one" width="50%">性別</td>
<td class="f_one" width="50%">
<select name="gender">
<option value="0">保密</option>
<option value="1">男</option>
<option value="2">女</option>
</select></td></tr>
<tr><td class="f_one" width="50%">電話</td>
<td class="f_one" width="50%"><input type="text" name="tel" size="50" /></td></tr>
<tr><td class="f_one" width="50%">郵箱︰</td>
<td class="f_one" width="50%"><input type="text" name="email" size="50" /></td></tr>
<tr><td class="f_one" width="50%">介紹說明︰</td>
<td class="f_one" width="50%"><textarea name="introduce" rows="5" cols="50"></textarea></td></tr>
</table>
<br /><center><input type="reset" value="重 置" /><input type="submit" value="提 交" /></center></form>
<!--
EOT;
}elseif($job=='card'){
print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr class="head"><td colspan="6"><b>{$cn_name}名片夾</b></td></tr>
<tr class="cbg" align="center">
<td>真實姓名</td>
<td>論壇用戶名</td>
<td>是否為管理員</td>
<td>性別</td>
<td>狀態</td>
<td width="15%"></td>
</tr>
<!--
EOT;
foreach($memberdb as $key => $value){
$ifadmin = $value[ifadmin]==1 ? '是' : '否';
$gender  = $value[gender]==1  ? '男' : ($value[gender]==2 ? '女' : '保密');
print <<<EOT
-->
<tr class="f_one" align="center">
<td><a href="$basename&job=seecard&cyid=$cyid&uid=$value[uid]" title="{$cn_name}名片">$value[realname]</a></td>
<td><a href="u.php?action=show&uid=$value[uid]">$value[username]</a></td>
<td>$ifadmin</td>
<td>$gender</td>
<!--
EOT;
if($value['thisvisit']+$db_onlinetime*1.5>$timestamp){print <<<EOT
-->
			<td><b>在線</b></td>
<!--
EOT;
} else{print <<<EOT
-->
			<td><b>離線</b></td>
<!--
EOT;
}print <<<EOT
-->
<td><a href="message.php?action=write&touid=$value[uid]">短消息</a>&nbsp;<a href="u.php?action=show&uid=$value[uid]">加為好友</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
 &nbsp; $pages
<!--
EOT;
}elseif ($job=='editcard'){print <<<EOT
-->
<form method="post" action="$basename&job=editcard&cyid=$cyid">
<input type="hidden" name="step" value="2" />
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr><td class="head" colspan="2">我的{$cn_name}名片</td></tr>
<tr><td class="f_one" width="50%">真實姓名</td>
<td class="f_one" width="50%"><input type="text" name="realname" value="$rt[realname]" /></td></tr>
<tr><td class="f_one" width="50%">性別</td>
<td class="f_one" width="50%">
<select name="gender">
<option value="0" $gender_0>保密</option>
<option value="1" $gender_1>男</option>
<option value="2" $gender_2>女</option>
</select></td></tr>
<tr><td class="f_one" width="50%">電話</td>
<td class="f_one" width="50%"><input type="text" name="tel" value="$rt[tel]" size="50" /></td></tr>
<tr><td class="f_one" width="50%">郵箱︰</td>
<td class="f_one" width="50%"><input type="text" name="email" value="$rt[email]" size="50" /></td></tr>
<tr><td class="f_one" width="50%">介紹說明︰</td>
<td class="f_one" width="50%"><textarea name="introduce" rows="5" cols="50">$rt[introduce]</textarea></td></tr>
</table>
<br /><center><input type="reset" value="重 置" /><input type="submit" value="提 交" /></center></form>
<!--
EOT;
}elseif ($job=='seecard'){
$gender  = $rt[gender]==1  ? '男' : ($value[gender]==2 ? '女' : '保密');
print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr><td class="head" colspan="2">{$cn_name}名片</td></tr>
<tr class="f_one"><td width="20%">真實姓名</td><td>$rt[realname]</td></tr>
<tr class="f_one"><td>性別</td><td>$gender</td></tr>
<tr class="f_one"><td>電話</td><td>$rt[tel]</td></tr>
<tr class="f_one"><td>郵箱︰</td><td>$rt[email]</td></tr>
<tr class="f_one"><td>介紹說明︰</td><td><pre>$rt[introduce]</pre></td></tr>
<!--
EOT;
}elseif($job=='board'){
print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
	<tr><td class="head" colspan="4">討論區</td></tr>
	<tr align="center">
		<td class="cbg" width="40%">標題</td>
		<td class="cbg" width="20%">作者</td>
		<td class="cbg" width="20%">最後發表</td>
		<td class="cbg" width="10%">操 作</td>
	</tr>
<!--
EOT;
foreach($argudb as $key=>$val){
if(!$val['author']){
$val['author'] = $val['realname'] ? $val['realname'] : $val['username'];
}print <<<EOT
-->
	<tr>
		<td class="f_one">
<!--
EOT;
if($rpdb[$val[tid]]){print <<<EOT
-->
			<img src="$imgpath/cn_img/open.gif" onclick="javascript:showrp(rp_$val[tid])" />
<!--
EOT;
}else{print <<<EOT
-->
			<img src="$imgpath/cn_img/close.gif" />
<!--
EOT;
}print <<<EOT
-->
			<a href="$basename&cyid=$cyid&job=read&tid=$val[tid]">$val[subject]</a>
		</td>
		<td class="f_one" align="center">$val[author]</td>
		<td class="f_one" align="center">$val[lastpost]</td>
		<td class="f_one" align="center">
<!--
EOT;
if ($cydb['uid']==$val['authorid'] || $cydb['ifadmin']=='1'){
print <<<EOT
-->
			[<a href="$basename&cyid=$cyid&job=editpost&tid=$val[tid]">編輯</a>]
			[<a href="$basename&cyid=$cyid&job=delpost&tid=$val[tid]">刪除</a>]
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
<!--
EOT;
if($rpdb[$val[tid]]){print <<<EOT
-->
	<tr id="rp_$val[tid]" name="rp_$val[tid]" style="DISPLAY: none">
		<td colspan="4"  class="f_one">
			<table cellspacing="0" cellpadding="4" width="100%" align="center" border="0" $i_table>
<!--
EOT;
foreach($rpdb[$val[tid]] as $key=>$val){print <<<EOT
-->
				<tr>
					<td class="f_one">&nbsp; &nbsp; -
						<a href="$basename&cyid=$cyid&job=read&tid=$val[tpcid]">$val[subject]</a>
						&nbsp; $val[author] ($val[postdate])
<!--
EOT;
if ($cydb['uid']==$val['authorid'] || $cydb['ifadmin']=='1'){
print <<<EOT
-->
						 &nbsp; &nbsp;
						[<a href="$basename&cyid=$cyid&job=editpost&tid=$val[tid]">編輯</a>]
						[<a href="$basename&cyid=$cyid&job=delpost&tid=$val[tid]">刪除</a>]
<!--
EOT;
}print <<<EOT
-->
					</td>
				</tr>
<!--
EOT;
}print <<<EOT
-->			</table>
		</td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
 &nbsp; $pages
<br /><br />
<form method="post" action="$basename&job=post&cyid=$cyid&">
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr><td class="head" colspan="2"><b>發表言論</b></td></tr>
<tr class="f_one"><td width="15%">標題</td><td><input type="text" name="subject" size="90" /></td></tr>
<tr class="f_one"><td valign="top">內容</td><td><textarea name="content" rows="10" cols="100%"></textarea></td></tr>
</table>
<br /><center><input type="submit" value="提 交" /></center>
</form>
<script language="JavaScript">
function showrp(rp){
	if(rp.style.display != ''){
		rp.style.display = '';
	}else{
		rp.style.display = 'none';
	}
}
</script>
<!--
EOT;
}elseif ($job=='read'){print <<<EOT
-->
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
	<tr><td class="head">討論區</td></tr>
</table>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($agdb as $key=>$val){
$num++;
if(!$val['author']){
$val['author'] = $val['realname'] ? $val['realname'] : $val['username'];
}print <<<EOT
-->

			<table cellspacing="1" cellpadding="3" width="$tablewidth" align="center" border="0" $i_table>
				<tr>
					<td class="f_one">
						<div>
							<div style="float:left">$val[subject]</div>
							<div style="float:right"><i>$val[author] &nbsp;$val[postdate] #$num</i></div>
						</div>
						<br /><br />
						$val[content]
<!--
EOT;
if ($cydb['uid']==$val['authorid'] || $cydb['ifadmin']=='1'){
print <<<EOT
-->
						<br /><br />
						[<a href="$basename&cyid=$cyid&job=editpost&tid=$val[tid]">編輯</a>]
						[<a href="$basename&cyid=$cyid&job=delpost&tid=$val[tid]">刪除</a>]
<!--
EOT;
}print <<<EOT
-->
					</td>
				</tr>
			</table>
			<table><tr><td height="1"></td></tr></table>
<!--
EOT;
}print <<<EOT
-->
 &nbsp; $pages
<br /><br />
<form method="post" action="$basename&job=post&cyid=$cyid&tid=$tid&">
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr><td class="head" colspan="2"><b>發表言論</b></td></tr>
<tr class="f_one"><td width="15%">標題</td><td><input type="text" name="subject" value="Re:$subject" size="90" /></td></tr>
<tr class="f_one"><td valign="top">內容</td><td><textarea name="content" rows="10" cols="100%"></textarea></td></tr>
</table>
<br /><center><input type="submit" value="提 交" /></center>
</form>
<!--
EOT;
}elseif ($job=='editpost'){print <<<EOT
-->
<form method="post" action="$basename&cyid=$cyid&job=editpost&tid=$tid&">
<input type="hidden" name="step" value="2" />
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr><td class="head" colspan="2"><b>發表言論</b></td></tr>
<tr class="f_one"><td width="15%"></td><td><input type="text" size="90" name="subject" value="$argu[subject]" /></td></tr>
<tr class="f_one"><td valign="top">內容</td><td><textarea name="content" rows="10" cols="100%">$argu[content]</textarea></td></tr>
</table>
<br /><center><input type="submit" value="提 交" /></center>
</form>
<!--
EOT;
}elseif ($job=='donate'){print <<<EOT
-->
<form method="post" action="$basename&cyid=$cyid&job=donate&">
<input type="hidden" name="step" value="2" />
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr><td class="head" colspan="2">我要捐獻</td></tr>
<tr><td class="f_one" colspan="2">你最多只能捐獻{$db_currencyname}數︰<font color=blue>$winddb[currency]</font></td></tr>
<tr><td class="f_one" width="20%">捐獻的{$db_currencyname}數</td>
<td class="f_one"><input type="text" name="sendmoney" size="30" /></td></tr></table>
<br /><center><input type="submit" value="提 交" /></center></form>
<!--
EOT;
}elseif ($job=='donatelog'){print <<<EOT
-->
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr class="head"><td colspan="5"><b></b></div></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td width="15%">用戶名</td>
<td width="*">描述</td>
<td width="15%">日期</td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$num++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$num</td>
<td>$value[username1]</td>
<td><div style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word" align="left">$value[descrip]</div></td>
<td>$value[date]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
 &nbsp; $pages
<!--
EOT;
}elseif ($job=='set'){
print <<<EOT
-->
<form method="post" action="$basename&job=set&" enctype="multipart/form-data">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="cyid" value="$cyid" />
<table cellspacing="1" cellpadding="5" width="$tablewidth" align="center" border="0" $i_table>
<tr class="head"><td colspan="2">{$cn_name}基本設置</td></tr>
<tr><td class="f_one" width="40%">更改{$cn_name}名稱</td>
<td class="f_one"><input type="text" name="cname" value="$cydb[cname]" size="30" /></td></tr>
<tr><td class="f_one">{$cn_name}分類設置</td>
<td class="f_one"><select name="classid" value="$cntype">
<option value=""></option>
<!--
EOT;
foreach ($classdb as $class){
$thisselect=$class[cid]==$cydb[classid] ? 'selected' : '';
print <<<EOT
-->
<option value="$class[cid]" $thisselect>$class[cname]</option>
<!--
EOT;
}print <<<EOT
-->
</select></td></tr>
<tr><td class="f_one">是否允許新成員加入</td>
<td class="f_one"><input type="radio" name="ifcheck" value="1" $ifcheck_1 />是<input type="radio" name="ifcheck" value="0" $ifcheck_0 />否</td>
</tr>
<tr><td class="f_one">是否公開公告內容</td>
<td class="f_one"><input type="radio" name="annoucesee" value="1" $annoucesee_1 />是<input type="radio" name="annoucesee" value="0" $annoucesee_0 />否</td>
</tr>
<tr><td class="f_one">會員加入需要{$db_currencyname}</td>
<td class="f_one"><input type="text" name="intomoney" value="$cydb[intomoney]" /></td></tr>
<tr><td class="f_one">更改{$cn_name}標志</td>
<td class="f_one"><input type="file" name="attachment" /></td></tr>
<tr><td class="f_one">{$cn_name}公告</td>
<td class="f_one"><textarea name="annouce" rows="5" cols="40">$cydb[annouce]</textarea></td></tr>
<tr><td class="f_one">{$cn_name}簡介</td>
<td class="f_one"><textarea name="descrip" rows="5" cols="40">$cydb[descrip]</textarea></td></tr>
</table>
<br /><center><input type="submit" value="提 交" /><input type="reset" value="重 置" /></center></form>
<!--
EOT;
}elseif($job=='member'){print <<<EOT
-->
<form method="post" action="$basename&">
<input type="hidden" name="job" value="member" />
<input type="hidden" name="cyid" value="$cyid" />
<table cellspacing="1" cellpadding="4" width="$tablewidth" align="center" border="0" $i_table>
<tr class="head"><td colspan="8"><b>會員列表</b></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td>真實姓名</td>
<td>論壇用戶名</td>
<td>性別</td>
<td>電話</td>
<td>Email</td>
<td>狀態</td>
<td width="5%"></td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($memberdb as $key => $value){
$gender = $value[gender]==1  ? '男' : ($value[gender]==2 ? '女' : '保密');
$sate = $value[ifadmin]==1 ? '管理員' : ($value[ifadmin]=='-1' ? '未審' : '已審');
$num++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$num</td>
<td><a href="$basename&job=card&cyid=$cyid&uid=$value[uid]">$value[realname]</a></td>
<td>$value[username]</td>
<td>$gender</td>
<td>$value[tel]</td>
<td>$value[email]</td>
<td>$sate</td>
<td><input type="checkbox" name="selid[]" value="$value[uid]" /></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
 &nbsp; $pages
<br /><br />
<center>
<!--
EOT;
$len=4;
if($windid == $cydb['admin']){
$len=6;
print <<<EOT
-->
<input type="radio" name="action" value="addadmin" />設為管理員
<input type="radio" name="action" value="deladmin" />取消管理員
<!--
EOT;
}print <<<EOT
-->
<input type="radio" name="action" value="pass" checked />審核會員
<input type="radio" name="action" value="del" />刪除會員
<br /><br />
<input type="button" name="chkall" value="全 選" onclick="CheckAll(this.form,'$len')" />
<input type="submit" value="提 交" />
</center></form>
<!--
EOT;
}elseif($job=='currency'){print <<<EOT
-->
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
	<tr><td class="head"><b></b></td></tr>
	<tr><td class="f_one"></td></tr>
</table>
<br />
<form method="post" action="$basename&job=currency&">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="cyid" value="$cyid" />
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
	<tr><td class="head" colspan="2"><b> (手續費:$cn_rate%)</b></td></tr>
	<tr class="f_one">
		<td width="20%">轉入用戶名</td>
		<td><input type="text" name="pwuser" size="20" /></td>
	</tr>
	<tr class="f_one">
		<td>轉帳{$db_currencyname}數</td>
		<td><input type="text" name="currency" size="20" /></td>
	</tr>
	<tr class="f_one">
		<td>請輸入密碼</td>
		<td><input type="password" name="pwpwd" size="20" /></td>
	</tr>
</table>
<br /><center><input type="submit" value="提 交" /></center></form>
<!--
EOT;
}elseif ($job=='currencylog'){print <<<EOT
-->
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr class="head"><td colspan="5"><b></b></div></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td width="15%">用戶名</td>
<td width="15%">管理員</td>
<td width="*">描述</td>
<td width="20%">日期</td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$num++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$num</td>
<td>$value[username1]</td>
<td>$value[username2]</td>
<td><div style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word" align="left">$value[descrip]</div></td>
<td>$value[date]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
 &nbsp; $pages
<!--
EOT;
}elseif ($job=='joinlog'){print <<<EOT
-->
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" $i_table>
<tr class="head"><td colspan="5"><b></b></div></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td width="20%">用戶名</td>
<td width="20%">管理員</td>
<td width="*">描述</td>
<td width="20%">日期</td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$num++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$num</td>
<td>$value[username1]</td>
<td>$value[username2]</td>
<td><div style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word" align="left">$value[descrip]</div></td>
<td>$value[date]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
 &nbsp; $pages
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
<script language="JavaScript">
function redirect(value){
	if(value!= '') {
		window.location=value;
	}
}
function checkset(chars){
	if(!confirm(chars)){
		return false;
	}
}
function CheckAll(form,len){
	for (var i=0;i<form.elements.length-len;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
</script>
<!--
EOT;
?>-->