<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li class="current"><a href="$basename">標簽管理</a></li>
      <li><a href="$basename&action=setting">標簽設置</a></li>
    </ul>
</div>

<form action="$basename&" method="post">
  <input type="hidden" name="action" value="addtag" />
  <input type="hidden" name="step" value="2" />
  <h2 class="h1">批量添加</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">添加 TAG ,多個用“,”分開</td>
      <td class="td2"><textarea name="tags" class="textarea"></textarea></td>
    </tr>
  </table>
  </div>
  <div class="tac mb10">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>

<form action="$basename" method="post">
  <input type="hidden" name="type" value="$type" />
  <h2 class="h1">搜索</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">標簽名</td>
      <td class="td2"><input type="text" class="input input_wc" name="keyword" value="$keyword" /></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">熱門標簽</td>
      <td class="td2">
        <select name="ifhot" onchange="location.href='$basename&ifhot='+this.value">
          <option value="0" $sel_0>開啟</option>
          <option value="1" $sel_1>關閉</option>
        </select>
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">標簽長度</td>
      <td class="td2">
        <input type="text" class="input input_wc" name="ls" value="$ls" />&nbsp;-&nbsp;<input type="text" class="input input_wc" name="le" value="$le" /></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">使用數</td>
      <td class="td2">
        <input type="text" class="input input_wc" name="ns" value="$ns" />&nbsp;-&nbsp;<input type="text" class="input input_wc" name="ne" value="$ne" /></td>
    </tr>
  </table>
  </div>
  <div class="tac mb10">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>

<form action="$basename&" method="post">
  <input type="hidden" name="ifhot" value="$ifhot" />
  <h2 class="h1">標簽管理</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
if (empty($tagdb)) {print <<<EOT
-->
<tr><td class="p10"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">
<!--
EOT;
foreach($tagdb as $key=>$value){print <<<EOT
-->
        <div style="width:24%;float:left;height:22px;line-height:22px;">
          <input type="checkbox" name="selid[]" value="{$value[tagid]}" />
          <a href="$basename&action=tag&tagid={$value[tagid]}">{$value[tagname]}</a>( {$value[num]} )</div>
<!--
EOT;
}print <<<EOT
-->
      </td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
    <input type="radio" name="action" value="deltag" checked />&nbsp;刪除標簽&nbsp;
    <input type="radio" name="action" value="sethot" />
<!--
EOT;
if($ifhot){print <<<EOT
-->
    允許為熱門標簽
<!--
EOT;
}else{print <<<EOT
-->
    不允許為熱門標簽
<!--
EOT;
}print <<<EOT
-->
  </div>
   <div class="tac mb10">
        <span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 選</button></span></span>
        <span class="btn"><span><button type="submit">提 交</button></span></span>
    </div>
</form>

<!--
EOT;
}elseif($action=='setting'){print <<<EOT
-->

<div class="nav3 mb10 ta">
    <ul class="cc">
      <li><a href="$basename">標簽管理</a></li>
      <li class="current"><a href="$basename&action=$action">標簽設置</a></li>
    </ul>
</div>

<form action="$basename" method="post">
  <input type="hidden" name="action" value="set" />
  <h2 class="h1">標簽設置</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">標簽功能</td>
      <td class="td2">
      	<ul class="cc list_80 list_A">
            <li><input type="radio" value="1" name="config[iftag]" $iftag_Y>開啟</li>
            <li><input type="radio" value="0" name="config[iftag]" $iftag_N>關閉</li>
         </ul></td>
		 <td class="td2"><div class="help_a"></div>
        </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">帖子內容標簽橫線顯示</td>
      <td class="td2">
     	 <ul class="cc list_80 list_A fl">
            <li><input type="radio" value="1" name="config[readtag]" $readtag_Y>開啟</li>
            <li><input type="radio" value="0" name="config[readtag]" $readtag_N>關閉</li>
         </ul>        
		</td><td class="td2"><div class="help_a">只有當開啟標簽功能時，設置才有效</div>
        </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">首頁顯示熱門標簽個數</td>
      <td class="td2"><input class="input input_wa" name="config[tagindex]" value="$db_tagindex"></td>
    <td class="td2"><div class="help_a">0為不顯示</div>
        </td></tr>
  </table>
  </div>
  <div class="tac mb10">
   <span class="btn"><span><button type="submit">提 交</button></span></span>
 </div>
</form>

<!--
EOT;
}elseif($action=='tag'){print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li class="current"><a href="$basename">標簽列表</a></li>
      <li><a href="$basename&action=setting">標簽設置</a></li>
    </ul>
</div>
<h2 class="h1">
<span class="mr10"><span class="linka">Tag : </span>$rs[tagname]</span><a href="$basename" class="linka">返回上一級<span class="f9">▲</span></a>
</h2>

<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
  <tr class="tr2">
    <td>ID</td>
    <td>標題</td>
    <td>使用的標簽</td>
    <td>關聯的標簽</td>
  </tr>
<!--
EOT;
if (empty($readb)) {print <<<EOT
-->
<tr><td class="p10" colspan="4"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
$i=($page-1)*$db_perpage;
foreach($readb as $key=>$value){
$i++;
print <<<EOT
-->
  <tr class="tr1 vt">
    <td class="td2">$i</td>
    <td class="td2"><a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a></td>
    <td class="td2">$value[tags]</td>
    <td class="td2">$value[relatetag]</td>
  </tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
</div>
<div class="cc mb10">$pages</div>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
