<!--<?php
include_once PrintEot('left');
print<<<EOT
-->
<!-- <h2 class="h1 mb10"><a href="$admin_file?adminjob=app&admintype=appslist">返回基礎應用列表</a></h2> -->
<div class="nav3 mb10">
	<ul class="cc">
<!--
EOT;
if (!$action) {print <<<EOT
-->
		<li class="current"><a href="$basename">新鮮事設置</a></li>
		<li><a href="$admin_file?adminjob=apps&admintype=weibo_manage" onclick="openNewUrl('weibo_manage','新鮮事管理',this.href);return false;">內容管理</a></li>
<!--
EOT;
} else {print <<<EOT
-->	
		<li $nav[weibo]><a href="$basename&action=weibo">新鮮事管理</a></li>
        <li $nav[topic]><a href="$basename&action=topic">話題管理</a></li>
		<li $nav[comment]><a href="$basename&action=comment">評論管理</a></li>	
<!--
EOT;
}print <<<EOT
-->
	</ul>
</div>
<!--
EOT;
if(!$action){
print <<<EOT
-->
<form action="$basename&" method="post">
  <input type="hidden" name="step" value="3">
  <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">
      	<div class="list_A list_80">
           <ul class="cc">
               <li><input type="radio" name="weibopost" value="1" $weibopost_Y />開啟</li>
              <li><input type="radio" name="weibopost" value="0" $weibopost_N />關閉</li>
          </ul>
        </div>
      </td>
      <td class="td2">開啟後，可發布、轉發新鮮事</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">添加圖片功能</td>
      <td class="td2">
      	<div class="list_A list_80">
           <ul class="cc">
               <li><input type="radio" name="weibophoto" value="1" $weibophoto_Y />開啟</li>
              <li><input type="radio" name="weibophoto" value="0" $weibophoto_N />關閉</li>
          </ul>
        </div>
      </td>
      <td class="td2"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">添加鏈接功能</td>
      <td class="td2">
      	<div class="list_A list_80">
           <ul class="cc">
              <li><input type="radio" name="weibourl" value="1" $weibourl_Y />開啟</li>
              <li><input type="radio" name="weibourl" value="0" $weibourl_N />關閉</li>
          </ul>
        </div>
      </td>
      <td class="td2"></td>
    </tr>
	<tr class="tr1 vt">
      <td class="td1">允許發表新鮮事的用戶組</td>
      <td class="td2">$creategroup</td>
      <td class="td2">全不選則允許所有用戶組發表</td>
	   <td class="td2"></td>
    </tr>
	<tr class="tr1 vt">
      <td class="td1">新鮮事輸入框提示語</td>
      <td class="td2"><input name="weibotip" value="{$o_weibotip}" class="input input_wb" /></td>
    </tr>
  </table>
  </div>
  
  <h3 class="h1"><span class="mr20">新鮮事調用基本設置</span></h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1">
    <td class="td1">熱門評論間隔時間[天]</td>
			<td class="td2">
				<input type="text" value="$o_weibo_hotcommentdays" name="weibo_hotcommentdays" class="input input_wa" >
			</td>
    </tr>
      <tr class="tr1">
    <td class="td1">熱門轉發間隔時間[天]</td>
			<td class="td2">
				<input type="text" value="$o_weibo_hottransmitdays" name="weibo_hottransmitdays" class="input input_wa" >
			</td>
    </tr>
      <tr class="tr1">
    <td class="td1">新增粉絲間隔時間[天]</td>
			<td class="td2">
				<input type="text" value="$o_weibo_hotfansdays" name="weibo_hotfansdays" class="input input_wa" >
			</td>
    </tr>
    </table>
  </div>

 <h3 class="h1"><span class="mr20">話題基本設置</span></h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1">
    <td class="td1">熱門話題榜緩存時間[天]</td>
			<td class="td2">
				<input type="text" value="$o_weibo_hottopicdays" name="weibo_hottopicdays" class="input input_wa" >
			</td>
    </tr>
    </table>
  </div>
   
  <h3 class="h1"><span class="mr20">新鮮事積分獎懲設置</span><span class="linka">注:<b>威望積分</b>支持小數點後一位，其他積分只允許整數！</span></h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td>積分名稱</td>
      <td>發表新鮮事(+)</td>
      <td>刪除新鮮事(-)</td>
    </tr>
<!--
EOT;
foreach($credit->cType as $key => $value){print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$value</td>
      <td class="td2"><input name="creditset[Post][$key]" value="{$creditset[Post][$key]}" class="input input_wc" /></td>
      <td class="td2"><input name="creditset[Delete][$key]" value="{$creditset[Delete][$key]}" class="input input_wc" /></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <h3 class="h1"><span class="mr20">新鮮事積分流通記錄</span><span class="linka">此功能可以詳細記錄某種積分的流通情況，幫助站長更加清晰地掌握論壇的積分狀況！</span></h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td>積分名稱</td>
      <td>發表新鮮事</td>
      <td>刪除新鮮事</td>
    </tr>
    <!--
EOT;
foreach($credit->cType as $key => $value){print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$value</td>
      <td class="td2"><input type="checkbox" name="creditlog[Post][$key]" value="1" {$creditlog[Post][$key]} /></td>
      <td class="td2"><input type="checkbox" name="creditlog[Delete][$key]" value="1" {$creditlog[Delete][$key]} /></td>
    </tr>
    <!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</form>
<!--
EOT;
}elseif($action == 'weibo'){
print <<<EOT
-->
<script type="text/javascript" src="js/date.js"></script>
<form method="POST" action="$basename&action=weibo">
  <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" name="content" value="$content" class="input input_wa"></td>
      <td class="td2" width="100"><!--記錄內容（可使用通配符“*”）--></td>
    </tr>
      <tr class="tr1 vt">
      <td class="td1">新鮮事類型</td>
      <td class="td2">
          <select name="weibotype" class="select_wa">
		    <option value="-1"  $weibotypeSelect[please]>新鮮事類型</option>
<!--
EOT;
foreach($weiboTypeDesc as $key => $value) {
print <<<EOT
-->
		    <option value="$key" $weibotypeSelect[$key]>$value</option>
<!--
EOT;
}print <<<EOT
-->	    
		   </select>
      </td>
      <td class="td2"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">作者名稱</td>
      <td class="td2"><input type="text" name="username" value="$username" class="input input_wa"></td>
      <td class="td2"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">發表日期</td>
      <td class="td2">
      	<div class="input_img fl"><i onclick="this.nextSibling.onclick()" class="input_time" title="選擇時間">選擇時間</i><input type="text" name="postdate_s" value="$postdateStartString" id="postdate_s" onclick="javascript:ShowCalendar(this.id)"></div><span class="p_lr_10 fl">至</span><div class="input_img fl"><i class="input_time" onclick="javascript:ShowCalendar('postdate_e')" title="選擇時間">選擇時間</i><input type="text" name="postdate_e" id="postdate_e" value="$postdateEndString" onclick="javascript:ShowCalendar(this.id)"></div>
        </td>
        <td class="td2">&nbsp;</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">順序</td>
      <td class="td2"><span class="cc  fl"></span>
     		 <ul class="cc list_80 list_A mr20 fl">
                	<li><input type="radio" name="ordertype" value="asc" $ascChecked>正序</li>
                    <li><input type="radio" name="ordertype" value="desc" $descChecked>倒序</li>
             </ul>
        </td>
        <td class="td2">&nbsp;</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每頁顯示條數</td>
      <td class="td2"><input type="text" name="lines" value="$lines" class="input input_wa"></td>
      <td class="td2">&nbsp;</td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</form>	
<form method="POST" action="$basename&action=weibo&" name="FORM">
  <input type="hidden" name="job" value="delete">
  <input type="hidden" name="content" value="$content">
  <input type="hidden" name="username" value="$username">
  <input type="hidden" name="weibotype" value="$weibotype">
  <input type="hidden" name="postdate_s" value="$postdate_s">
  <input type="hidden" name="postdate_e" value="$postdate_e">
  <input type="hidden" name="ordertype" value="$ordertype">
  <input type="hidden" name="page" value="$page">
  <input type="hidden" name="lines" value="$lines">

  <h2 class="h1"><span class="mr10">新鮮事列表</span></h2>

  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
	  <td width="30"><span onclick="CheckAll(document.FORM)" class="cp">全選</span></td>
      <td>新鮮事內容</td>
      <td>作者</td>
      <td>發表時間</td>
      <td>新鮮事類型</td>
      <td>評論數</td>
      <td>轉發數</td>
    </tr>
<!--
EOT;
if (empty($weibos)) {print <<<EOT
-->
<tr><td class="p10" colspan="6"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach ($weibos as $key => $weibo) {
$type = $weiboService->getTypeDescript($weibo['type']);
$content = S::stripTags($weibo[content]);
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input type="checkbox" name="mids[]" value="$weibo[mid]"></td>
      <td class="td2">$content</td>
      <td class="td2"><a href="{$db_userurl}$weibo[uid]" target="_blank">$weibo[username]</a></td>
      <td class="td2" title="$weibo[postdate_s]">{$weibo[lastdate]}</td>
      <td class="td2">$type</td>
      <td class="td2">$weibo[replies]</td>
      <td class="td2">$weibo[transmit]</td>
    </tr>
    <!--
EOT;
}}print<<<EOT
-->
  </table>
  </div>
  <div class="cc">$pages</div>
  <div class="mb10 tac">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORM)">全 選</button></span></span>
    <span class="btn"><span><button type="submit" onclick="return checkdel();">刪除</button></span></span>
   </div>
</form>
<script>
function checkdel(){
	if(confirm("確定要刪除所選記錄嗎？" )){
		return true;
	}else{
		return false;
	}
}
</script>
<!--
EOT;
}elseif($action == 'topic'){
print <<<EOT
-->
<form method="POST" action="$basename&action=topic">
  <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 name="topicname" class="input input_wa mr20" value="{$topicname}"></td>
      <td class="td2">&nbsp;</td>
    </tr>

    <tr class="tr1 vt">
      <td class="td1">熱門話題</td>
      <td class="td2">
		<select name="ifhot" class="select_wa">
         <option  value="0" $sel_0>所有</option>
         <option  value="1" $sel_1>允許</option>
          <option  value="2" $sel_2>不允許</option>
		</select>
    	</td>
      <td class="td2">&nbsp;</td>
    </tr>

    <tr class="tr1 vt">
      <td class="td1">使用次數</td>
      <td class="td2">
        <input type="text" name="startnum" class="input input_wc" value="{$startnum}">&nbsp;-&nbsp;<input type="text" name="endnum" class="input input_wc"  value="{$endnum}">
      </td>
      <td class="td2">&nbsp;</td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</form>
<script type="text/javascript">
    function hottopic(ifhot) {
        window.location.href = '$basename&action=topic&job=list&ifhot='+ifhot;
    }
    </script>
<form method="POST" action="$basename&action=topic&" name="FORM">
  <input type="hidden" name="job" value="sethot">
  <input type="hidden" name="topicname" value="$topicname">
  <input type="hidden" name="ifhot" value="$ifhot">
  <input type="hidden" name="startnum" value="$startnum">
  <input type="hidden" name="endnum" value="$endnum">
   <input type="hidden" name="page" value="$page">
  <input type="hidden" name="ordertype" value="$ordertype">
  <h2 class="h1"><span class="mr10">話題列表</span></h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td width="30"><span onclick="CheckAll(document.FORM)" class="cp">全選</span></td>
      <td>話題名稱</td>
      <td>使用次數</td>
      <td>熱門話題狀態</td>
    </tr>
<!--
EOT;
if (empty($topics)) {print <<<EOT
-->
<tr><td class="p10" colspan="9"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{print <<<EOT
-->
<!--
EOT;
foreach($topics as $key => $value){
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input type="checkbox" name="topicid[]" value="$value[topicid]"></td>
      <td class="td2">$value[topicname]</td>
      <td class="td2">$value[num]</td>
<!--
EOT;
if ($value[ifhot] == '1') {print <<<EOT
-->
      <td class="td2">允許</td>
<!--
EOT;
} else {print <<<EOT
-->
      <td class="td2">不允許</td>
<!--
EOT;
}print <<<EOT
-->
      <td class="td2">
<!--
EOT;
print <<<EOT
-->
      </td>
    </tr>
<!--
EOT;
}}print <<<EOT
-->
  </table>
  </div>
  <div class="mt10 cc">$pages</div>
  <div class="mb10 tac">
   	<input type="radio" name="ifhot" value="1" checked/>允許為熱門話題
    <input type="radio" name="ifhot" value="2" />不允許為熱門話題
  </div>
  <div class="mb10 tac">
  <span class="bt"><span><button type="button" onclick="CheckAll(document.FORM)">全 選</button></span></span>
   <span class="mr10"><span class="btn"><span><button type="submit">提 交</button></span></span></span>
   </div>
</form>
<!--
EOT;
}elseif($action == 'comment'){
print <<<EOT
-->
<script type="text/javascript" src="js/date.js"></script>
<form method="POST" action="$basename&action=comment">
  <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" name="content" value="$content" class="input input_wa"></td>
      <td class="td2" width="100"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">作者名稱</td>
      <td class="td2"><input type="text" name="username" value="$username" class="input input_wa"></td>
      <td class="td2"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">發表日期</td>
      <td class="td2">
      	<div class="input_img fl"><i onclick="this.nextSibling.onclick()" class="input_time" title="選擇時間">選擇時間</i><input type="text" name="postdate_s" value="$postdateStartString" id="postdate_s" onclick="javascript:ShowCalendar(this.id)"></div><span class="p_lr_10 fl">至</span><div class="input_img fl"><i class="input_time" onclick="this.nextSibling.onclick()"  title="選擇時間">選擇時間</i><input type="text" name="postdate_e" id="postdate_e" value="$postdateEndString" onclick="javascript:ShowCalendar(this.id)"></div>
        </td>
        <td class="td2">&nbsp;</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">順序</td>
      <td class="td2"><span class="cc  fl"></span>
     		 <ul class="cc list_80 list_A mr20 fl">
                	<li><input type="radio" name="ordertype" value="asc" $ascChecked>正序</li>
                    <li><input type="radio" name="ordertype" value="desc" $descChecked>倒序</li>
             </ul>
        </td>
        <td class="td2">&nbsp;</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每頁顯示條數</td>
      <td class="td2"><input type="text" name="lines" value="$lines" class="input input_wa"></td>
      <td class="td2">&nbsp;</td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</form>

<form method="POST" action="$basename&action=comment&" name="FORM">
  <input type="hidden" name="job" value="delete">
  <input type="hidden" name="content" value="$content">
  <input type="hidden" name="username" value="$username">
  <input type="hidden" name="postdate_s" value="$postdate_s">
  <input type="hidden" name="postdate_e" value="$postdate_e">
  <input type="hidden" name="ordertype" value="$ordertype">
  <input type="hidden" name="page" value="$page">
  <input type="hidden" name="lines" value="$lines">
  <h2 class="h1"><span class="mr10">評論列表</span></h2>

  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
	  <td width="30"><span onclick="CheckAll(document.FORM)" class="cp">全選</span></td>
      <td>評論內容</td>
      <td>評論者</td>
      <td>評論時間</td>
    </tr>
<!--
EOT;
if (empty($comments)) {print <<<EOT
-->
<tr><td class="p10" colspan="6"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach ($comments as $key => $comment) {
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input type="checkbox" name="cids[]" value="$comment[cid]"></td>
      <td class="td2">$comment[content]</td>
      <td class="td2"><a href="{$db_userurl}$comment[uid]" target="_blank">$comment[username]</a></td>
      <td class="td2" title="$comment[postdate_s]">{$comment[lastdate]}</td>
    </tr>
    <!--
EOT;
}}print<<<EOT
-->
  </table>
  </div>
  <div class="cc">$pages</div>
  <div class="mb10 tac">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORM)">全 選</button></span></span>
    <span class="btn"><span><button type="submit" onclick="return checkdel();">刪除</button></span></span>
   </div>
</form>
<script>
function checkdel(){
	if(confirm("確定要刪除所選記錄嗎？" )){
		return true;
	}else{
		return false;
	}
}
</script>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
