<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/utils.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<body>
<h1>
<span class="action-span"><a href="?ctl=content&act=content_comment"><tpl>$comment_list</tpl><!--评论列表--></a></span>
<span class="action-span1"><a href="?ctl=index&act=admin_main"><tpl>$common_admin_index</tpl><!--管理首页--></a> >> <tpl>$comment_reply</tpl><!--回复评论--></span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
  <table width="100%">
    <tr>
      <td>
      <tpl>$comment_reply_title</tpl><!--文章标题-->：<tpl>$comment_info['article_title']</tpl>
    </td>
    </tr>
    <tr>
      <td><hr color="#dadada" size="1"></td>
    </tr>
    <tr>
      <td>
        <div><tpl>nl2br($comment_info['comment_body'])</tpl></div>
        <div align="right"><b><tpl>$comment_reply_time</tpl><!--评论时间-->:</b> <tpl>date("Y-m-d H:i:s",$comment_info['comment_time'])</tpl>&nbsp;&nbsp;<b><tpl>$comment_reply_ip</tpl><!--ip地址-->:</b> <tpl>$comment_info['comment_ip']</tpl></div>
      </td>
    </tr>
  </table>
</div>

<tpl>if $comment_info['comment_repost'] != ''</tpl>
<!-- reply content list -->
<div class="main-div">
  <table width="100%">
    <tr>
      <td>
      <tpl>$comment_reply_user</tpl><!--回复人-->：<tpl>$comment_info['comment_repost_author']</tpl></td>
      <td align="right"><a href="index.php?ctl=content&act=content_comment_reply&comment_id=<tpl>$comment_info['comment_id']</tpl>&reply_action=comment_reply_edit"><tpl>$comment_reply_edit</tpl><!--编辑--></a></td>
    </tr>
    <tr>
      <td colspan="2"><hr color="#dadada" size="1"></td>
    </tr>
    <tr>
      <td colspan="2">
        <div><tpl>nl2br($comment_info['comment_repost'])</tpl></div>
        </td>
    </tr>
  </table>
</div>
<tpl>/if</tpl>
<tpl>if $comment_info['comment_repost'] == '' or $_GET['reply_action']=='comment_reply_edit'</tpl>
<div>
<form method="post" action="index.php?ctl=content&act=comment_reply_save" name="theForm" onSubmit="return validate();">
<table border="0" align="center">
  <tr><th colspan="2">
  <strong><tpl>$comment_reply1</tpl><!--回复评论--></strong>
  </th></tr>
  <tr>
    <td><tpl>$comment_reply_user</tpl><!--回复人-->:</td>
    <td><input type="text" name="comment_repost_author" disabled="disabled" value="<tpl>$_SESSION['admin_name']</tpl>" size="30" /></td>
  </tr>
  <tr>
    <td><tpl>$comment_reply_body</tpl><!--回复内容-->:</td>
    <td><textarea name="comment_repost" cols="50" rows="4" wrap="VIRTUAL"><tpl>$comment_info['comment_repost']</tpl></textarea></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
	<input type="hidden" name="comment_id" value="<tpl>$comment_info['comment_id']</tpl>" />
      <input name="submit" type="submit" value="<tpl>$comment_reply_submit</tpl>" class="button">
      <input type="reset" value="<tpl>$comment_reply_reset</tpl>" class="button">
    </td>
  </tr>
</table>
</form>
</div>
<tpl>/if</tpl>
<div id="footer">
<tpl>$common_copyright</tpl>
</div>
<script language="javascript">
  /**
   * 检查输入的内容
   */
  function validate()
  {
    var validator = new Validator('theForm');
    validator.required('comment_repost','<tpl>$comment_reply_body_error</tpl>');
    return validator.passed();
  }
</script>
</body>