<%
Set rs=Server.CreateObject("ADODB.Recordset")
if request("action")="dc" then
rs.open "select * from xg_dc",conn,1,3
if request("a")=1 then rs("xg_a")=rs("xg_a")+1
if request("b")=1 then rs("xg_b")=rs("xg_b")+1
if request("c")=1 then rs("xg_c")=rs("xg_c")+1
if request("d")=1 then rs("xg_d")=rs("xg_d")+1
if request("e")=1 then rs("xg_e")=rs("xg_e")+1
if request("f")=1 then rs("xg_f")=rs("xg_f")+1
rs.update
rs.close
response.write"<SCRIPT language=JavaScript>alert('提交成功');window.location='index.asp';</SCRIPT>"
elseif request("action")="ly" and request("body")<>"" then
xg_body=request("body")
xg_xing=request("xing")
xg_ming=request("ming")
xg_province=request("province")
xg_body=replace(xg_body,"<","＜")
xg_body=replace(xg_body,">","＞")
rs.open "select * from xg_ly order by xg_id asc",conn,1,3
xg_id=rs("xg_id")
xg_xing=rs("xing")
xg_ming=rs("ming")
xg_province=rs("province")
xg_count=rs.recordcount
rs.addnew
rs("xg_body")=xg_body
rs("xg_xing")=xg_xing
rs("xg_ming")=xg_ming
rs("xg_province")=xg_province
rs.update
rs.close
if xg_count=10000000 then conn.execute "delete xg_id from xg_ly where xg_id="&xg_id
rs.open "select xg_number from xg_xin",conn,1,3
xg_number=rs("xg_number")+1
rs("xg_number")=rs("xg_number")+1
rs.update
rs.close
response.write"<SCRIPT language=JavaScript>alert('您是本网第"&xg_number&"位网友，为中国加油！');window.location='index.asp';</SCRIPT>"
end if
sub xg_ly()
page=clng(request("page"))
rs.open "select * from xg_ly order by xg_id desc",conn,1,1
rs.PageSize=20
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page  
for j=1 to rs.PageSize 
Response.Write "<DIV class=list_01 align=left>"&rs("xg_province")&" "&rs("xg_xing")&""&rs("xg_ming")&" <SPAN class=font_08>留下祝福：</SPAN>“"&rs("xg_body")&"” <SPAN class=div_time>"&rs("xg_time")&"</SPAN></DIV>"
rs.movenext
if rs.eof then exit for
next
if Page<2 then      
    response.write "<DIV class=list_01 align=left>首页 上一页&nbsp;"
  else
    response.write "<a href=index.asp?&page=1 class=e>首页</a>&nbsp;"
    response.write "<a href=index.asp?&page=" & Page-1 & " class=e>上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=index.asp?page=" & (page+1) & " class=e>"
    response.write "下一页</a> <a href=index.asp?page="&rs.pagecount&" class=e>尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#000000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"

   response.write "</DIV>" 
rs.close
end sub
rs.open "select xg_number from xg_xin",conn,1,1
xg_number=rs("xg_number")
rs.close
rs.open "select * from xg_dc",conn,1,1
xg_dca=rs("xg_a")
xg_dcb=rs("xg_b")
xg_dcc=rs("xg_c")
xg_dcd=rs("xg_d")
xg_dce=rs("xg_e")
xg_dcf=rs("xg_f")
rs.close
%>