<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/Conn.asp" -->
<!--#Include File="Func.asp"-->
<%Response.Charset="gb2312"%>
<%
Call WebSiteLoad(1)
%>
<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=gb2312">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>留言反馈 - Angel工作室网站管理系统</title>
<link rel="stylesheet" type="text/css" href="css/icons.css" />
<link rel="stylesheet" type="text/css" href="css/af.ui.base.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--jqMobi主JS-->
<script type="text/javascript" charset="gb2312" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" charset="gb2312" src="js/jq.appframework.js"></script>
<script type="text/javascript" charset="gb2312" src="js/appframework.ui.js"></script>
<!--jqMobi插件-->
<script type="text/javascript" charset="gb2312" src="js/jq.slidemenu.js"></script>
<script type="text/javascript" charset="gb2312" src="js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" charset="gb2312" src="lhgdialog/lhgdialog.js?skin=idialog"></script>
<script type="text/javascript" charset="gb2312" src="js/base.js"></script>
<script type="text/javascript">
	$(document).ready(function(e) {
        $(".page-list a").attr("data-ignore",true);
		//初始化发表评论表单
		AjaxInitForm('#feedback_form', '#btnSubmit', 1, '#turl');
    });
</script>
</head>

<body>
<div id="afui">
  <div id="content">
  
    <!--留言反馈-->
	<div id="mainPanel" class="panel" data-footer="main_footer">
      <header>
        <a onclick="history.back(-1);" class="backButton">返回</a>
        <h1>在线留言</h1>
        <a onclick="$.ui.toggleSideMenu()" class="menuButton"></a>
      </header>
      
      <div>
        <ol class="comment-list">
          
<%
dim rs,sql,idCount,Listid
Listid=request("Listid")
if not IsNumeric(Listid) then 
response.Write("&#x8BF7;&#x4E0D;&#x8981;&#x8F93;&#x5165;&#x975E;&#x6CD5;&#x5B57;&#x7B26;")
response.end
end If
dim pages,sqlid
      pages=3
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by id desc "
  dim i
  if Listid="" then
  sql="select count(ID) as idCount from Angel_Message"
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
	sql="select id from Angel_Message where Hidden"&" order by ID"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if




set rs = server.createobject("adodb.recordset")
sql="select * from Angel_Message where id in("& sqlid &") order by ID"
rs.open sql,conn,1,3
dim nn
nn=1
do while not rs.eof

response.Write("<li>"&vbcrlf)
response.Write("<div class=""inner"">"&vbcrlf)
response.Write("<p>"&nn&" "&rs("Title")&"</p>"&vbcrlf)
response.Write("<div class=""meta"">"&vbcrlf)
response.Write("<span class=""blue"">"&rs("Message")&"</span>"&vbcrlf)
response.Write("<span class=""time"">"&rs("AddDate")&"</span>"&vbcrlf)
response.Write("</div>"&vbcrlf)
response.Write("</div>"&vbcrlf)
 If rs("Re_Mess")<>"" Then        
response.Write("<div class=""answer"">"&vbcrlf)
response.Write("<div class=""meta"">"&vbcrlf)
response.Write("<span class=""time"">"&rs("Re_Date")&"</span>"&vbcrlf)
response.Write(" <span class=""blue"">管理员回复：</span>"&vbcrlf)
response.Write("</div>"&vbcrlf)
response.Write("<p>"&rs("Re_Mess")&"</p>"&vbcrlf)
response.Write("</div>"&vbcrlf)  
End If 
response.Write("</li>"&vbcrlf)

nn=nn+1
rs.movenext 
loop
rs.close


Response.Write(" </ol>"&vbcrlf)
Response.Write("</div>"&vbcrlf)
Response.Write("<!--/留言列表-->"&vbcrlf)


'Response.Write("<h2>&#x65B0;&#x95FB;&#x54A8;&#x8BAF;</h2><ul><li>&#x603B;&#x6570;:"&idcount&";"&page&"/"&pagec&" ")

Response.Write("<!--分页页码-->"&vbcrlf)
Response.Write(" <div class=""page-lists""><span>共"&idcount&"记录</span><span>"&page&"/"&pagec&"</span>")


pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""&#x56DE;&#x5230;&#x7B2C;&#x4E00;&#x9875;""  data-ignore=""true""><font face=""webdings"" color=""#000000"">9</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &"""  data-ignore=""true"" title=""&#x7B2C;"& pageprevious &"&#x9875;""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red""  data-ignore=""true"">"& i &"</strong>&nbsp;")
	Else
		response.write ("[<a href="""& myself &"Page="&i&"""  data-ignore=""true"">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If

  response.Write("</div><!--放置页码列表-->"&vbcrlf)

else

 sql="select count(ID) as idCount from Angel_Message where Hidden"&" and id="&Listid&""
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
	sql="select id from Angel_Message where Hidden"&" and id="&Listid&" order by ID"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end If


set rs = server.createobject("adodb.recordset")
sql="select * from Angel_Message where Hidden and id="&Listid&" and id order by ID"
rs.open sql,conn,1,3
dim nna
nna=1
do while not rs.eof

response.Write("<li>"&vbcrlf)
response.Write("<div class=""inner"">"&vbcrlf)
response.Write("<p>"&nna&" "&rs("Title")&"</p>"&vbcrlf)
response.Write("<div class=""meta"">"&vbcrlf)
response.Write("<span class=""blue"">"&rs("Message")&"</span>"&vbcrlf)
response.Write("<span class=""time"">"&rs("AddDate")&"</span>"&vbcrlf)
response.Write("</div>"&vbcrlf)
response.Write("</div>"&vbcrlf)
 If rs("Re_Mess")<>"" Then        
response.Write("<div class=""answer"">"&vbcrlf)
response.Write("<div class=""meta"">"&vbcrlf)
response.Write("<span class=""time"">"&rs("Re_Date")&"</span>"&vbcrlf)
response.Write(" <span class=""blue"">管理员回复：</span>"&vbcrlf)
response.Write("</div>"&vbcrlf)
response.Write("<p>"&rs("Re_Mess")&"</p>"&vbcrlf)
response.Write("</div>"&vbcrlf)  
End If 
response.Write("</li>"&vbcrlf)


nna=nna+1
rs.movenext 
loop
rs.close

Response.Write(" </ol>"&vbcrlf)
Response.Write("</div>"&vbcrlf)
Response.Write("<!--/留言列表-->"&vbcrlf)
Response.Write("<!--分页页码-->"&vbcrlf)
Response.Write("<div class=""page-lists""><span>共"&idcount&"记录</span><span>"&page&"/"&pagec&"</span>")
pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""&#x56DE;&#x5230;&#x7B2C;&#x4E00;&#x9875;""><font face=""webdings"" color=""#000000"">首页</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title=""&#x7B2C;"& pageprevious &"&#x9875;""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  response.Write("</div><!--放置页码列表-->"&vbcrlf)



end if
%>
      
               <!--版权信息-->
                <div class="copyright">
                    <p><a href="http://<%=SiteUrl%>/m/" data-ignore="true">触屏版</a> | <a href="http://<%=SiteUrl%>/" data-ignore="true">电脑版</a> | <a href="javascript:;" onclick="$.ui.scrollToTop('mainPanel')">返回顶部</a></p>
                    <address>版权所有 <%=SiteTitle2%> 版本号 V1.3</address>
                    </p>
                </div>
                <!--/版权信息-->
	</div>
    <!--留言反馈-->
    
    <!--发表留言-->
    <div id="addPanel" class="panel" data-footer="main_footer">
      <header>
        <a onclick="history.back(-1);" class="backButton">返回</a>
        <h1>发表留言</h1>
        <a onclick="$.ui.toggleSideMenu()" class="menuButton"></a>
      </header>
      
      <form id="feedback_form" name="feedback_form" url="ifeedback.asp">
        <div class="form-box">
          <div><input id="txtUserName" name="txtUserName" type="text" placeholder="输入用户昵称"  datatype="*" nullmsg="请输入用户昵称" sucmsg=" " /></div>
          <div><input id="txtUserTel" name="txtUserTel" type="text" placeholder="输入联系电话" datatype="*0-20" sucmsg=" " /></div>
          <div><input id="txtUserQQ" name="txtUserQQ" type="text" placeholder="输入联系QQ" datatype="*0-20" sucmsg=" " /></div>
          <div><input id="txtUserEmail" name="txtUserEmail" type="text" placeholder="邮箱地址" /></div>
          <div><input id="txtTitle" name="txtTitle" type="text" placeholder="输入留言标题" datatype="*2-100" nullmsg="请填写留言标题" sucmsg=" " /></div>
          <div><textarea id="txtContent" name="txtContent" rows="3" placeholder="输入您要反馈的留言内容" datatype="*" nullmsg="请填写留言内容" sucmsg=" "></textarea></div>
          <div><input id="txtCode" name="txtCode" type="text" placeholder="验证码" style="width:100px;" datatype="*" nullmsg="请输入验证码" sucmsg=" " />
          <a id="verifyCode" href="javascript:;" onclick="ToggleCode(this, '/Include/getcode.asp');return false;" style="display:inline-block;"><img src="/Include/getcode.asp" width="80" height="30" style="vertical-align:middle;" /> 看不清楚？</a>
          </div>
          <div><input id="btnSubmit" name="btnSubmit" type="submit" value="发表留言" class="btn orange full" /></div>
        </div>
      </form>
      <div style="padding-bottom:15px;"></div>
      <input id="turl" type="hidden" value="messagewrite.asp" />
      
    </div>
    <!--/发表留言-->
    
    <!--底部导航-->
    <footer id="main_footer">
      <a href="#mainPanel" class="icon message pressed">留言反馈</a>
      <a href="#addPanel" class="icon pencil">发表留言</a>
    </footer>
    <!--/底部导航-->
    <!--左侧导航-->
        <nav>
      <ul class="list">
        <li class="divider">网站导航</li>
        <li><a href="index.asp" class="icon home" data-ignore="true">网站首页</a></li>
        <li><a href="newslist.asp" class="icon tv" data-ignore="true">新闻资讯</a></li>
        <li><a href="productList.asp" class="icon basket" data-ignore="true">公司产品</a></li>
        <li><a href="downlist.asp" class="icon download" data-ignore="true">资料下载</a></li>
        <li><a href="login.asp" class="icon user" data-ignore="true">会员中心</a></li>
        <li><a href="about.asp" class="icon phone" data-ignore="true">关于我们</a></li>
        <li><a href="messagewrite.asp" class="icon message" data-ignore="true">在线留言</a></li>
        <li><a href="about.asp?Id=10" class="icon phone" data-ignore="true">联系我们</a></li>
      </ul>
    </nav>
    <!--/左侧导航-->
      
  </div>
</div>
</body>
</html>
