<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/transport.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/listtable.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<body>
<h1>
<span class="action-span"><a href="?ctl=system&act=system_article_add"><tpl>$system_admin_article_add</tpl></a></span>
<span class="action-span1"><a href="?ctl=index&act=admin_main"><tpl>$common_admin_index</tpl><!--管理首页--></a> >> <tpl>$system_admin_article_list</tpl></span>
<div style="clear:both"></div>
</h1>
<div class="form-div">
  <form action="index.php" name="searchForm" method="get">
  <input type="hidden" name="ctl" value="system" />
  <input type="hidden" name="act" value="system_article" />
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    &nbsp;&nbsp;
    <select name="system_article_type" id="system_article_type">
	<option value="0"><tpl>$system_admin_article_all</tpl></option>
	<option value="1"><tpl>$system_admin_article_note</tpl></option>
	<option value="2"><tpl>$system_admin_article_foot</tpl></option>
	</select>
	&nbsp;&nbsp;
	<tpl>$system_admin_article_keywords</tpl>
    <input type="text" name="keyword" size="15" />
    <input type="submit" value="<tpl>$system_admin_article_search</tpl>" class="button" />
  </form>
</div>
<form method="post" action="index.php?ctl=system&act=change_action" name="listForm" onSubmit="return validate();">
<div class="list-div" id="listDiv">

<table width="100%" cellspacing="1" cellpadding="2" id="list-table">
  <tr>
    <th><input type="checkbox" onClick='listTable.selectAll(this, "art_id")' /></th>
    <th><tpl>$system_admin_article_title</tpl><!--文章标题--></th>
    <th><tpl>$system_admin_article_class</tpl><!--所在频道--></th>
	<th><tpl>$system_admin_article_state</tpl><!--状态--></th>
	<th><tpl>$system_admin_article_jump</tpl><!--是否跳转--></th>
    <th><tpl>$system_admin_article_author</tpl><!--文章作者--></th>
	<th><tpl>$system_admin_article_time</tpl><!--添加时间--></th>
	<th><tpl>$system_admin_article_oper</tpl><!--相关操作--></th>
  </tr>
  <tpl>if !empty($article_array)</tpl>
  <tpl>foreach $article_array as $val</tpl>
  <tr align="center">
    <td align="left" width="1%">
	<input type="checkbox" name="art_id[]" value="<tpl>$val['sys_article_id']</tpl>" />    </td>
    <td width="20%" align="left"><a href="index.php?ctl=system&act=system_article_add&article_id=<tpl>$val['sys_article_id']</tpl>"><tpl>$val['sys_article_title']</tpl></a></td>
	<td width="10%"><tpl>if $val['sys_article_class'] == 1</tpl><tpl>$system_admin_article_note</tpl><tpl>else</tpl><tpl>$system_admin_article_foot</tpl><tpl>/if</tpl></td>
	<td width="8%"><img src="images/<tpl>if $val['sys_article_state'] == 1</tpl>yes<tpl>else</tpl>no<tpl>/if</tpl>.gif" /></td>
	<td width="8%"><tpl>if $val['sys_url_jump']!=''</tpl><tpl>$system_admin_article_jump_yes</tpl><tpl>else</tpl><tpl>$system_admin_article_jump_no</tpl><tpl>/if</tpl></td>
    <td width="10%"><tpl>$val['sys_article_author']</tpl></td>
	<td width="8%"><tpl>date("Y-m-d",$val['sys_article_time'])</tpl></td>
	<td width="15%" align="center">
		<a href="index.php?ctl=system&act=system_article_add&article_id=<tpl>$val['sys_article_id']</tpl>" title="<tpl>$article_list_edit</tpl>"><img src="images/icon_edit.gif" width="16" height="16" border="0" /><tpl>$system_admin_article_edit</tpl><!--编辑--></a>
		<a href="index.php?ctl=system&act=system_article_del&article_id=<tpl>$val['sys_article_id']</tpl>" title="<tpl>$system_admin_article_del</tpl>" onClick="return confirm('<tpl>$system_admin_article_del_conf</tpl>');"><img src="images/icon_trash.gif" width="16" height="16" border="0" /><tpl>$system_admin_article_del</tpl><!--删除--></a>    </td>
  </tr>
  <tpl>/foreach</tpl>
  <tpl>/if</tpl>
</table>
<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
  <td height="30">
  &nbsp;
  <select name="type" id="selAction">
    <option value=""><tpl>$system_admin_article_select</tpl><!--==选择==--></option>
    <option value="delete"><tpl>$system_admin_article_del</tpl><!--==删除==--></option>
  </select>
  <tpl>$class_move_select</tpl>
  <input type="submit" value="<tpl>$system_admin_article_ok</tpl>" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />
  </td>
    <td align="right" nowrap="true">
      <div id="turn-page">
		<tpl>$show_page</tpl>
      </div>
    </td>
  </tr>
</table>
</div>
</form>
<div id="footer">
<tpl>$common_copyright</tpl>
</div>
<script type="text/javascript">
  /**
   * 检查输入的内容
   */
  function validate()
  {
    var validator = new Validator('listForm');
    validator.required('type','<tpl>$article_list_select_error</tpl>');
    return validator.passed();
  }
</body>