<!--#include file="sd_mdb.asp"-->
<%
Const MaxPerPage=8
	dim rs,sql
   	dim totalPut   
   	dim CurrentPage, TotalPages
   	if not isempty(request("page")) then
      	currentPage=cint(request("page"))
   	else
      	currentPage=1
   	end if
  	set rs = server.createobject("adodb.recordset")
%>
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留言建议-<%=sd_site%>,<%=sd_fbt%></TITLE>
<meta name="Keywords" content="<%=sd_Keywords%>">
<meta name="Description" content="<%=sd_Description%>">
<link href="sd_style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="check_top.js"></script>
</head>
<body>
<div id="container" class="wrapper">
<!--#include file="sd_top.asp"-->
<div id="main" align="center"><div class="linkcontent">
<script language="javascript">
function form_onsubmit()
{
if (document.form.sd_xm.value==""){
alert("请填写昵称");
return false;
}
if (document.form.sd_qq.value==""){
alert("请填写qq号");
return false;
}
if (document.form.sd_log.value==""){
alert("请填写留言内容");
return false;
}
if (document.form.verifycode.value==""){
alert("验证码不能为空");
return false;
}
}
</script><br>
<TABLE border="0" align="center" cellpadding="5" cellspacing="0" width="100%">
<form action="sd_subit.asp" method="post" name="form" id="form" onSubmit="return form_onsubmit()">
<TR><TD style="padding-left:20px;" align="left">昵称：<input name="sd_xm" type="text"/>　　Q Q：<input name="sd_qq" type="text"/> 您的QQ号将只有管理员才能看到。</TD></TR>
<TR><TD style="padding-left:20px;" align="left">留言：<textarea name="sd_log" style="height:50px; width:500px;"></textarea></TD></TR>
<TR><TD style="padding-left:20px;" align="left">验证：<input name="verifycode" type="text" size="6" maxlength="4" value="<%If GetCode=9999 Then Response.Write "9999"%>"  style="width:80px;" onkeyup="if(isNaN(this.value)){alert('只能输入数字');this.value='';}" /> <img src="sd_getcode.asp" name="imgCode" id="imgCode" height="10" border=0 align="absmiddle"></TD></TR>
<TR><TD style="padding-left:20px;" align="left"><input type="image" src="images/submit.gif" value="添加留言"/></TD></TR>
</form>
</TABLE><br>
<%
'导航条
Set rs = Server.CreateObject("ADODB.RecordSet")
StrSql="select * From sd_book where sd_shenhe=1 order by id desc"
rs.open StrSql,Conn,1,1
if rs.eof and rs.bof then
Response.Write("　没有找到留言！<br>")
else
%>

<%
page=Request("page")
if page=0 or page="" then
page=1
end if
RecordCount = 0 
do while not rs.Eof
RecordCount = RecordCount +1
rs.MoveNext 
loop
if not RecordCount=0 then
rs.MoveFirst
end if
pageCount=RecordCount/15
pageCount=int(pageCount)
if (RecordCount mod 15)>0 then
PageCount=PageCount +1
end if 
%>
<table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
<tr>
<td align="left">
<%
do while pos<(page-1)*15
pos=pos+1
rs.MoveNext 
loop
i=1
x=0 
do while x<15 and not rs.eof
%>
<div class=titt><span>日期：<%=rs("sd_time")%></span>姓名：<font color=red><%=rs("sd_xm")%></font>　QQ：<font color=red><%= left(rs("sd_qq"),len(rs("sd_qq"))-2) & "**" %></font></DIV>
留言：<%=rs("sd_log")%>
<%if rs("sd_reply")<>"0" then%><br /><font color="#CC0000">站长回复：</font><font color=green><%=rs("sd_reply")%></font><%else%><br><font color=green>留言未回复</font><%end if%>
<DIV class=hr></DIV>
<%
i=i+1
x=x+1
Rs.MoveNext
loop
rs.close
set rs=nothing
%>
</td>
 </tr>
  <tr><td bgcolor="f7f7f7" height="25" align="CENTER">共有软文<font color="#FF0000"><%=RecordCount%></font>篇，共<font color="#FF0000"><%=pageCount%></font>页，第<font color="#FF0000"><%=page%></font>页
<%y=1%>
<%do while y<pagecount+1%> <a href="?page=<%=y%>">[<%=y%>]</a>&nbsp;<%
y=y+1 
loop
%></td></tr>
</table>
<%
	end if
	rs.close
	set rs=nothing
%>
</div></div>
<!--#include file="sd_foot.asp"-->
</div>
</body>
</html>