<!--#include file="connxy.asp"-->
<%
Call head()
Call saycarda("历史上今天")
if saytk<>1 then
	Response.write "<form name=""form"" method=""post"" action=""index.asp?saytk="&saytk&"&amp;sid="&sid&""">"
end if
%>



<input name="mm" type="text" size="4" maxlength="2" format="*N" value="7"/>月
<input name="dd" type="text" size="4" maxlength="2" format="*N" value="10"/>日<br/>
<%if saytk<>1 Then

Response.Write "<input type=""submit"" value=""[-查询-]""/></form><br/>"
else%>

<anchor>[-查询-]
<go href="index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>" method="post">
<postfield name="mm" format="*N" value="$mm"/>
<postfield name="dd" format="*N" value="$dd"/>
</go></anchor><br/>

<%
End If
dim m,dd,d,c
	m=trim(request("mm"))
	dd=trim(request("dd"))
	d=split(date(),"-")
	if m="" or dd="" then 
		c=cstr(d(1)) &"-"& cstr(d(2))
	else
		c=cstr(m) &"-"& cstr(dd)
	end if
set rs=Server.CreateObject("ADODB.Recordset")
rsstr="select * from title where dates='"&c&"' order by id desc"
rs.open rsstr,connxy,1,2
maxpage=int((rs.recordcount-1)/10)+1
if p>maxpage then p=maxpage
if rs.recordcount = 0 then response.write("暂无历史内容！<br/>")
if rs.recordcount > 0 then
rs.Move((p-1)*8)
dim j
j=1

do while ((not rs.EOF) and j<=8)
%>
<%=((p-1)*8+j)%>.<%=rs("demo")%><%=rs("title")%><br/>

<%
rs.MoveNext
j=j+1
loop
end if
if p*10<rs.recordcount then response.write("<a href='index.asp?p=" & p+1 & "&amp;imi="&imi&"&amp;sid="&sid&"&amp;mm="&m&"&amp;dd="&dd&"'>[下页]</a>&nbsp;")
if p>1 then response.write("<a href='index.asp?p=" & p-1 & "&amp;imi="&imi&"&amp;mm="&m&"&amp;sid="&sid&"&amp;dd="&dd&"'>[上页]</a>&nbsp;")
if p*10<rs.recordcount or p>1 then response.write("第" & p & "页,共" & (int((rs.recordcount-1)/10)+1) & "页<br/>")
%>

<br/>
<!--#include file="123.asp"-->
<!--#include file="../fanhui.asp"-->
<%
Call headsay()
%>
