⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xgbody.asp

📁 ASP+ACCESS 作用非常强大
💻 ASP
字号:
<%
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_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_count=rs.recordcount
rs.addnew
rs("xg_body")=xg_body
rs.update
rs.close
if xg_count=20 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()
rs.open "select top 20 * from xg_ly order by xg_id desc",conn,1,1
do while not rs.eof
Response.Write "<tr><td><strong style=""font-weight:bold"">"&xg_name&"网友 "&rs("xg_time")&"</strong> <p>"&rs("xg_body")&"</p><br></td></tr>"
rs.movenext
loop
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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -