<!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>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>" />
<title>留言板_<?php echo $sys_title ?></title>
<meta name="keywords" content="<?php echo $sys_title ?>" />
<meta name="description" content="<?php echo $sys_title ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo SYS_FRONT_STYLE_PATH?>style/style.css" />
<script type="text/javascript" src="<?php echo SYS_FRONT_STYLE_PATH?>js/common.js"></script>
<script type="text/javascript" src="<?php echo SYS_FRONT_STYLE_PATH?>js/validate.js"></script>
<style>
@import "pagination.css";

.messages{float:left; }
.messages ul{float:left; margin:30px 0px 0px 50px; display:inline;}
.messages li{float:left; margin-bottom:15px;}
.messages li td{border:1px solid #fff; background:#ececec; padding-left:10px;}
.messages td{height:30px; line-height:30px;}
</style>
<base target="_self" />
</head>

<body>
<?php include("inc_topbar.tpl.html"); ?>
<div id="wrap">
<!--Content, Left, Right, Middle, Outer, Advertisement--> 
<!--Header-->
<div id="header">
<?php 
include("inc_pagetitle.tpl.html"); 
include("inc_mainmenu.tpl.html"); 
include("inc_submenu.tpl.html"); 
$navigation = '&gt;&gt; 留言板';
include("inc_navigation.tpl.html"); 
?>
</div>
<!--/Header-->

<!--Content-->
<h1>留言板</h1>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
 <tr> 
      <td>
      	<span class="edit_subtitle_txt">我要留言</span>
      	<input type="checkbox" id="chk_display_hidden" value="1" onclick="showDisplayHidden('chk_display_hidden','area_display_hidden')">
      </td>
    </tr>
  <tr>
    <td align="center">
  <form name="guestbookform" id="guestbookform" action="guestbook.php" method="post" onSubmit="return Validator.Validate(this,3)">
  <input type="hidden" id="act" name="act" value="save">
  <table id="area_display_hidden" border="0" cellspacing="3" cellpadding="5" style="float:left; margin:20px 0px 20px 200px; display:inline;">
  <tr>
    <td width="100" align="left">姓名：</td>
    <td width="600" align="left"><input name="nickname" type="text"  style="width:150px;" dataType="LimitB" min="1" max="30"  msg="[1,30]个字符之内">*</td>
  </tr>
  <tr>
    <td align="left">联系方式：</td>
    <td align="left"><input name="contact" type="text"  style="width:300px;" dataType="LimitB" min="7" max="50"  msg="[7,30]个字符之内">*</td>
  </tr>
  <tr>
    <td align="left">邮件地址：</td>
    <td align="left"><input name="email" type="text"  style="width:300px;"  require="false" dataType="Email" msg="信箱格式不正确"></td>
  </tr>
  <tr>
    <td align="left" valign="top">您的问题：</td>
    <td align="left"><label>
      <textarea name="content" id="content" style="width:450px; height:100px;" dataType="LimitB" min="2" max="1000"  msg="[2,1000]个字符之内"></textarea>
    </label>*</td>
  </tr>
  <tr> 
      <td align="left"></td>
      <td align="left">
      	<input type="text" size="4" name="vcode" id="vcode" value="验证码" onfocus="this.value=''" dataType="LimitB" min="1" max="10"  msg="请填写验证码"/>*&nbsp;<img src="api/imgvcode.php" align="absmiddle" />
      </td>  </tr> 
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center"><label>
      <input type="submit" name="submit" id="buttonsubmit" value="提 交"  class="commonbtn" />
      <input type="reset" name="reset" id="buttonreset" value="重 置" class="commonbtn"  />
    </label></td>
    </tr>
</table>
</form>
</td>
  </tr>
</table>
<div class="messages">
<ul>
<?php 
if($act =='saveok'): 
?>
<div style="height:50px;">谢谢您的给我们留言。 请等待管理员审批回复。<a href="guestbook.php" style="text-decoration:none;"> [查看更多]</a> </div>
<?php 
else:
$guestbooks = getGuestbookList(5);
foreach($guestbooks['list'] as $row): ?>
 <li><table width="900" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse;">
  <tr>
    <td width="100">提问者：</td>
    <td valign="top"><?php echo $row['nickname'] ?></td>
  </tr>
  <tr>
    <td valign="top">提问内容：</td>
    <td valign="top"><?php echo $row['content'] ?></td>
  </tr>
  <tr>
    <td valign="top">管理员回复：</td>
    <td valign="top"><?php echo $row['replycontent'] ?></td>
  </tr>
</table>
</li>
<?php 
endforeach; 
if(kGet('id')!=''):
?>
<div align="right"><img src="images/go-next.png" width="16" height="16" align="absmiddle"><a href="guestbook.php" style="text-decoration:none;"> 查看更多</a></div>
<?php endif; ?>
<table width="900" border="0" cellpadding="0" cellspacing="0" >
  <tr><td>
<?php echo $guestbooks['page'] ; ?>
</td></tr>
</table>
<?php endif; ?>
</ul>
</div>
<!--/Content-->

<?php include("inc_footer.tpl.html"); ?>
</div>
</body>
</html>