<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>系统后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/public.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/style.css" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->basedir;?>js/jquery.js" language="javascript"></script>
<script language="javascript">
$(document).ready(function() {
     $("#ta tr").mouseover(function(){
      $(this).addClass("over");
     });
     $("#ta tr").mouseout(function(){
      $(this).removeClass("over");
     });
	 $("#ta tr:even").addClass("double");
	 $("#checkall").click(function() {
	 	$("input[@name='id[]']").each(function() {
			$(this).attr("checked", $('#checkall').attr('checked'));
		});
	});
	 $("#all").click(function() {
	 	$("input[@name='id[]']").each(function() {
			$(this).attr("checked", $('#all').attr('checked'));
		});
	});
});
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top"><!-- ######### begin ######### -->
      <div class="Block">
        <div class="BlockBar">添加新关键词</div>
        <table cellspacing="1" cellpadding="4" class="tab">
          <form id="form1" name="form1" method="post" action="<?php echo $this->installdir;?>keyword/add/">
            <tr class="row">
              <td width="14%" class="align-center">关键词：</td>
              <td><input name="keyword" type="text" id="keyword" value="<?php echo $_REQUEST['keyword'];?>" />
              </td>
            </tr>
            <tr class="row">
              <td class="align-center">点击数：</td>
              <td><input name="click" type="text" id="click" value="0" /></td>
            </tr>
            <tr class="row">
              <td class="align-center">&nbsp;</td>
              <td><input type="submit" class="btn" value="添加" /></td>
            </tr>
          </form>
        </table>
      </div>
      <br />
      <div class="BlockBar">关键词列表</div>
      <form action="<?php echo $this->installdir;?>keyword/delete/" method="post" onsubmit="return confirm('确认删除吗?');">
        <table cellspacing="1" cellpadding="4" class="tab" id="ta">
          <tr class="sub align-center">
            <td width="91" class="align-center">编号</td>
            <td width="181" class="align-center">关键词</td>
            <td width="130" class="align-center">搜索时间</td>
            <td width="87" class="align-center">点击数</td>
            <td width="85" class="align-left"><input name="checkall" type="checkbox" class="checkbox" id="checkall" value="checkbox" />
              全选</td>
          </tr>
          <?php
          if (count($this->keyword)>0){
          	foreach ($this->keyword as $rs){?>
          <tr class="row">
            <td class="align-center"><?php echo $rs['id'];?></td>
            <td><?php echo $rs['keyword'];?></td>
            <td class="align-center"><?php echo date('Y-m-d H:i:s', $rs['addtime']);?></td>
            <td class="align-center"><?php echo $rs['click'];?></td>
            <td class="align-left"><input name="id[]" type="checkbox" class="checkbox" id="id[]" value="<?php echo $rs['id'];?>" />
              <a href="<?php echo $this->installdir;?>keyword/delete/id/<?php echo $rs['id'];?>/">删除</a> <a href="<?php echo $this->installdir;?>keyword/modify/id/<?php echo $rs['id'];?>/">编辑</a>&nbsp; </td>
          </tr>
          <?php
          	}
          }else{
          	echo '<tr class="row align-center"><td colspan="5">没有找到任何记录!</td></tr>';
          }?>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><?php echo $this->printpage;?>
              <div class="form-handle"><input name="all" id="all" type="checkbox" value="1" class="checkbox" />全选
                <input type="submit" value="删除选中" />
              </div></td>
          </tr>
        </table>
      </form>
      </div>
      <div id="App-Version-Prompt" style="display:none;">
        <div class="space"></div>
        <div class="Block">
          <div class="BlockBar">版本更新信息</div>
          <div class="BlockContent" id="App-Version-Prompt-Body" style="padding:20px 5px 20px 5px; text-align:center; background:#FFFFCC;">loading...</div>
        </div>
      </div>
      <!-- ########## end ########## -->
    </td>
    <td width="5"></td>
    <td width="150" align="center" valign="top"><?php
	echo $this->render('menu');
	?>
    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>
