<!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" />
<script src="<?php echo $this->basedir;?>js/jquery.js" type="text/javascript"></script>
<script src="<?php echo $this->basedir;?>js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#form").validate({
		rules:{
			content:{
				required:true
			}
		},
		content:{
			name:{
				required:'请输入标题名'
			}
		}
	})
     $("#ta tr").mouseover(function(){
      $(this).addClass("over");
     });
     $("#ta tr").mouseout(function(){
      $(this).removeClass("over");
     });
	 $("#ta tr:even").addClass("double");
});
</script>
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<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 cellpadding="4" cellspacing="1" class="tab">
        <form id="form" name="form1" method="post" action="<?php echo $this->installdir;?>affiche/add">
		  <tr class="row">
		    <td width="14%">公告标题：</td>
		    <td width="86%"><input name="title" type="text" id="title" size="50" maxlength="50" /></td>
		    </tr>
		  <tr class="row">
            <td>公告内容：</td>
            <td><textarea name="content" id="content" cols="60" rows="7" class="BlockContent"></textarea></td>
          </tr>
          <tr class="rows">
            <td class="rows"></td>
            <td class="rows"><label for="button"></label>
              <input name="" type="submit" class="btn" id="button" value="提交添加" /> <label for="button2"></label>
              <input name="button2" type="reset" class="btn" id="button2" value="重置" /> <label for="button3"></label>
              <input name="button3" type="button" class="btn" id="button3" value="返回上一页" onClick="javascript:history.back()" />
              <input name="Submit" type="button" class="btn" value="生成公告JS" onclick="location.href='<?php echo $this->installdir;?>make/note/'" /></td>
          </tr> </form> 
        </table>
		<br />
        <table border="0" cellpadding="4" cellspacing="1" class="tab" >
          <tr class="sub align-center">
            <td width="15%" >编号</td>
            <td width="44%">公告内容</td>
            <td width="25%">发布时间</td>
            <td width="16%">管理</td>
          </tr>
		  <tbody id="ta">
          {loop $this->affiche $row}
          <tr class="row">
            <td ><?php echo $row['id'];?></td>
            <td ><?php echo htmlspecialchars($row['title']);?></td>
            <td  class="align-center"><?php echo date('Y-m-d H:i:s', $row['addtime']);?></td>
            <td class="align-center"><a href="<?php echo $this->installdir;?>affiche/modify/do/update/id/<?php echo $row['id'];?>/">编辑</a> <a href="<?php echo $this->installdir;?>affiche/delete/id/<?php echo $row['id'];?>/">删除</a> <a href="<?php echo $this->installdir;?>affiche/modify/do/locked/id/<?php echo $row['id'];?>/"><?php if($row['locked']==1){echo '锁定中';}else{echo '锁定';};?></a></td>
          </tr>
          {/loop}
		  </tbody>
        </table>
      </div>
    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>
