
<!--#include virtual="top.asp"-->
<% Response.Expires = -1   
Response.ExpiresAbsolute = Now() - 1   
Response.cachecontrol = "no-cache"   
 %>
<script src="js/float.js" language="javascript"></script>
<div id="div_content">
<div id="div_bigcon" class="clearfix">
  <div id="lxwm_div_left">
    <div id="div_menu">
      <dl>
        <dd><a href="contact.asp">联系我们</a></dd>
        <dd><a href="message.asp" class="div_menu_stay">在线留言</a></dd>
      </dl>
    </div>
    <!--#include virtual="left.asp"-->
 
  </div>
  <div id="div_right">
    <div id="top_info_div">
      <div id="div_top_info">
        <dl>
          <dt>在线留言</dt>
          <dd>轻松饮：健康饮食从我做起！</dd>
        </dl>
      </div>
      <div id="div_maps"> &nbsp;&nbsp;<a href="index.asp" id="sy" class="withelink">首页</a>&nbsp;&nbsp; &gt; <a href="contact.asp">联系我们</a> &gt; <span class="chen_f">在线留言</span></div>
    </div>
    <div id="div_right_info" class="clearfix">
      <div id="div_ly_bg">
        <div id="div_ly_topimg"> <img src="images/zxly_1.jpg" /> </div>
     
       <%if Request("action")="Save" then 
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from pinglun "
rs.open sql,conn,1,3
rs.AddNew
rs("rz_hfname")=Request.Form("mess_name")
rs("lyid")=1
rs("rz_tel")=Request.Form("mess_phone")
rs("email")=Request.Form("mess_email")
rs("adder")=Request.Form("mess_title")
rs("rz_hfcontent")=Request.Form("mess_content")
if rs("rz_hfcontent")="" then
        response.write "<SCRIPT language=JavaScript>alert('内容不能为空 或 输入字符非法！');"
        response.write "this.location.href='vbscript:history.back()';</SCRIPT>"
        response.end
end if
if rs("rz_hfname")="" then
        response.write "<SCRIPT language=JavaScript>alert('姓名不能为空 或 输入字符非法！');"
        response.write "this.location.href='vbscript:history.back()';</SCRIPT>"
        response.end
end if
rs.Update
rs.Close
response.write  " <script   Language=JavaScript> {window.history.go(-1);} </script> "
Set rs=nothing
end if%>
        <div class="div_ly_btop clearboth"></div>
        <div class="div_ly_bmiddle clearboth clearfix">
          <form id="form1" name="form1" method="post" action="?action=Save">
            <div>
              <dl>
                <dd class="lytxdd"> <span class="lytxddspan">姓名：</span>
                  <input id="mess_name" name="mess_name" type="text" class="lytxddtext" />
                  <span class="lytxddspanl">联系方式：</span>
                  <input id="mess_phone" name="mess_phone" type="text"  class="lytxddtext" />
                </dd>
                <dd class="lytxdd"> <span class="lytxddspan">邮箱：</span>
                  <input id="mess_email" name="mess_email" type="text"  class="lytxddtext" />
                  <span class="lytxddspanl">联系地址：</span>
                  <input id="mess_title" name="mess_title" type="text"  class="lytxddtext" />
                </dd>
                <dd class="lytxdd" style="height:105px;width:635px;clear:both;"> <span class="lytxddspan">内容：</span>
                  <input id="mess_content" name="mess_content" type="text" style="width:540px;height:105px" class="lytxddtext" />
                </dd>
                <dd id="lytj" class="clearboth">
                  <input name="" type="image" src="images/tj.jpg" />
                </dd>
              </dl>
            </div>
          </form>
        </div>
        <div class="div_ly_bbottom"></div>
		 <%
sql="select * from pinglun where lyid order by rz_hftime desc"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
rs.pagesize=3
if request("page")<>"" then
  epage=cint(request("page"))
   if epage<1 then epage=1
   if epage>rs.pagecount then epage=rs.pagecount
else
epage=1
end if
rs.absolutepage=epage
for i=0 to rs.pagesize-1
if rs.bof or rs.eof then exit for 
%> 
	    <div class="div_ly_btop"></div>
        <div class="div_ly_bmiddle clearfix clearboth">
          <div class="div_ly_photo"> <img src="images/zxly_photo.jpg" /> </div>
          <div class="float_left">
            <div class="div_ly_stop"></div>
            <div class="div_ly_smiddle">
              <dl>
                <dt class="div_ly_smiddledt">留言者：<font>	<% =RS("rz_hfname") %></font></dt>
                <dd class="div_ly_smiddledd"><%
if rs.EOF and rs.BOF then
    Response.Write("当前还没有留言")

end if
%>	<% =RS("rz_hfcontent") %>
</dd>
              </dl>
            </div>
            <div class="div_ly_sbottom"></div>
          </div>
          <div class="float_left">
            <div class="div_ly_mtop"></div>
			<%  if rs("adminmsg")<>"" then%>
            <div class="div_ly_mmiddle">
              <dl>
                <dt class="div_ly_mmiddledt">回复：<font>
				 <% =RS("adminmsg") %> 
                           </font></dt>
              </dl>
            </div>
			 <% else  %>
			  <div class="div_ly_mmiddle">
              <dl>
                <dt class="div_ly_mmiddledt">回复：<font>
			 <%Response.Write("当前还没有回复！")%> 
			 </font></dt>
              </dl>
            </div>
			<%end if%>
            <div class="div_ly_mbottom"></div>
          </div>
        </div>
        <div class="div_ly_bbottom"></div>
         <%
      rs.movenext 
next
rs.close 
%>

       
        <div id="page_show">
  <ul>
  	
   <% if epage=1 then %>
<li> <a name=a>&lt; Prev</a></li>
<% else %>
	<li><a href="?page=<%=epage-1%>" title="上一页">&lt; Prev</a></li>
 <% end if %>
    <li><a href="?page=1" title="第1页">1</a></li>
 <li><a href="?page=2" title="第2页">2</a></li>
  <li><a href="?page=3" title="第3页">3</a></li>
    <li><a href="?page=<%=epage+1%>" title="下一页">Next></a></li>
  </ul>
</div>
      </div>
    </div>
  </div>
</div>
<!--#include virtual="fooder.asp"-->

</body></html>