xinxi_hf.asp

来自「二手书籍系统」· ASP 代码 · 共 55 行

ASP
55
字号
<!--#include file="inc/conn.asp"-->
<%
dim id,username,nm
nm=Request.form("nm")
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误!"
cl
response.end
end if
if nm="on" then
call cnmai()
else if request.cookies("cnmai")("username")="" or request.cookies("cnmai")("domain")="" or request.cookies("cnmai")("id")="" then 
response.write "<br>"
response.write "<li>你还没有登陆!"
response.write "<meta http-equiv=refresh content=""2;URL=login.asp"">"
response.end
    else 
    if request("cnmai")="chk" then
    call cnmai()
    response.end
    end if
    end if
end if
%>

<%
sub cnmai()
dim rs,sql,neirong
if len(trim(request("neirong")))<2 then
response.write "<li>回复内容没有填写!"
cl
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from hf "
rs.open sql,conn,1,3
rs.addnew
rs("username")=request.cookies("cnmai")("username")
rs("neirong")=trim(request("neirong"))
rs("xxusername")=trim(request("xxusername"))
rs("xxid")=id
rs.update
rs.close
set rs=nothing
Conn.Execute("Update xinxi Set hfcs=hfcs+1 where id="&cstr(id))
Conn.Execute("Update xinxi Set fbsj=now() where id="&cstr(id))
closedb
response.write "<li>回复成功!"
cl
end sub
%>
<%sub cl()
response.write "<meta http-equiv=refresh content=""2;URL=xinximemo.asp?cnmai="&id&""">"
end sub%>

⌨️ 快捷键说明

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