<!--<?php
include_once PrintEot('left');
if (!$action) {
if (!$job){print <<<EOT
-->
<script language="JavaScript" src="js/date.js"></script>
<form method="POST" action="$basename&job=list&">
  <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"><select name="type" class="select_wa">
          <option value="">全部</option><option value="write">记录</option><option value="diary">日志</option><option value="photo">相片</option><option value="share">分享</option><option value="board">留言</option>
        </select></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">评论内容</td>
      <td class="td2"><input type="text" name="title" value="" class="input input_wa mr20">可使用通配符“*”</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">作者名称</td>
      <td class="td2"><input type="text" name="username" value="" class="input input_wa mr20">可使用通配符“*”</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">发表日期</td>
      <td class="td2">
      <div class="input_img fl"><i class="input_time" title="选择时间">选择时间</i><input type="text" name="postdate_s" value="" 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" title="选择时间">选择时间</i><input type="text" name="postdate_e" id="postdate_e" value="" onclick="javascript:ShowCalendar(this.id)"></div>
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">排序</td>
      <td class="td2">
         	<ul class="list_80 list_A fl mr20">
               <li><input type="radio" name="ordertype" value="asc">正序</li>
               <li><input type="radio" name="ordertype" value="desc" checked="checked">倒序</li>
            </ul>按发表时间排序
        </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每页显示条数</td>
      <td class="td2"><input type="text" name="lines" value="30" class="input input_wa"></td>
    </tr>
  </table>
  </div>
  <div class="tac mb10">
    <span class="btn"><span><button type="submit" value="提 交">提 交</button></span></span>
    </div>
</form>
<!--
EOT;
} elseif ($job == 'list') {print<<<EOT
-->
<form method="POST" action="$basename&">
  <input type="hidden" name="job" value="delete">
  <input type="hidden" name="title" value="$title">
  <input type="hidden" name="type" value="$type">
  <input type="hidden" name="typeid" value="$typeid">
  <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">评论列表</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>
      <td>所属类型</td>
      <td>删除</td>
    </tr>
<!--
EOT;
foreach ($commentdb as $key => $comment) {
if(!$comment['title'])continue;
$key+=($page-1)*$lines+1;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$key</td>
      <td class="td2">$comment[s_title]</td>
      <td class="td2">$comment[username]</td>
      <td class="td2">$comment[postdate]</td>
      <td class="td2">$comment[ch_type]</td>
      <td class="td2"><input type="checkbox" name="selid[]" value="$comment[id]"></td>
    </tr>
<!--
EOT;
}print<<<EOT
-->
  </table>
  </div>
  <div class="cc">$pages</div>
  <div class="tac mb10">
      <span class="bt"><span><button type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit" value="提 交" onclick="return checkdel();">提 交</button></span></span>
    </div>
</form>
<script language="JavaScript">
function checkdel(){
	if(confirm("确定要删除所选评论吗？" )){
		return true;
	}else{
		return false;
	}
}
</script>
<!--
EOT;
}
}include_once PrintEot('adminbottom');
?>-->
