<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<ul class="nav3">
<li><a href="#" class="two">標簽管理</a></li>
<li><a href="$basename&action=addtag">添加標簽</a></li>
</ul>
<div class="c"></div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="set" />
<h2>標簽設置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr3">
		<td width="30%">是否開啟標簽功能</td>
		<td>
			<input type="radio" value="1" name="config[iftag]" $iftag_Y>開啟
			<input type="radio" value="0" name="config[iftag]" $iftag_N>關閉
		</td>
	</tr>
	<tr class="tr3">
		<td>首頁顯示熱門標簽個數 (0為不顯示)</td>
		<td><input size="35" class="input" name="config[tagindex]" value="$db_tagindex"></td>
	</tr>
</table><center style="margin-top:10px">
<input type="submit" value="提 交" class="btn"></center></form><br/>

<form action="$basename" method="post">
<input type="hidden" name="type" value="$type" />
<h2>搜索</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac">
	<td>標簽名︰<input type="text" class="input" name="keyword" size="15" /></td><td>熱門標簽︰<select name="ifhot" onchange="location.href='$basename&ifhot='+this.value"><option value="0" $sel_0>是</option><option value="1" $sel_1>否</option></select></td><td>標簽長度︰<input type="text" class="input" name="ls" size="7" /> - <input type="text" class="input" name="le" size="7" /></td><td>使用數︰<input type="text" class="input" name="ns" size="5" /> - <input type="text" class="input" name="ne" size="5" /></td><td><input type="submit" value="提 交" class="btn" /></td>
</tr>
</table></form><br/>

<form action="$basename&" method="post">
<input type="hidden" name="ifhot" value="$ifhot" />
<h2>標簽管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>
<!--
EOT;
$num=0;
foreach($tagdb as $key=>$value){
$num++; print <<<EOT
-->
<div style="width:32%;float:left;height:22px;line-height:22px;"><input type="checkbox" name="selid[]" value="{$value[tagid]}"  onclick="pwJsCheck(this,'div')" /> <a href="$basename&action=tag&tagid={$value[tagid]}">{$value[tagname]}</a> ( {$value[num]} )</div>
<!--
EOT;
if($num%3==0){print <<<EOT
-->
<div class="c"></div>
<!--
EOT;
}}print <<<EOT
-->
</td></tr>
</table>$pages<center style="margin-top:10px">
<input type="radio" name="action" value="deltag" checked />刪除標簽
<input type="radio" name="action" value="sethot" />
<!--
EOT;
if($ifhot){print <<<EOT
-->
允許為熱門標簽
<!--
EOT;
}else{print <<<EOT
-->
不允許為熱門標簽
<!--
EOT;
}print <<<EOT
--></center>
<br />
<center>
<input type="button" name="chkall" value="全 選" onclick="CheckAll(this.form)" class="btn" />
<input type="submit" value="提 交" class="btn" /></center></form><br/>
<!--
EOT;
}elseif($action=='addtag'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">標簽管理</a></li>
<li><a href="#" class="two">添加標簽</a></li>
</ul>
<div class="c"></div>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="addtag" />
<input type="hidden" name="step" value="2" />
<h2>批量添加</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">添加 TAG ,多個用“,”分開</td><td><textarea name="tags" style="width:300px;height:100px; margin:.2em"></textarea></td></tr>
</table><center style="margin-top:10px">
<input type="submit" value="提 交" class="btn"></center></form><br/>
<!--
EOT;
}elseif($action=='tag'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename" class="two">標簽列表</a></li>
<li><a href="$basename&action=addtag">添加標簽</a></li>
</ul>
<div class="c"></div>
<h2>標簽列表 &raquo; $rs[tagname]</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 s3 tac"><td width="8%">ID</td><td>標題</td><td>使用的標簽</td><td>關聯的標簽</td></tr>
<!--
EOT;
$i=($page-1)*$db_perpage;
foreach($readb as $key=>$value){
$i++;
print <<<EOT
-->
<tr class="tr3">
<td class="tac">$i</td>
<td><a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a></td>
<td>$value[tags]</td>
<td>$value[relatetag]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>$pages<br/>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->