📄 newspl_save.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<!--#include file="admin/MD5.asp"-->
<!--#include file = Include/Art_user.asp -->
<%
Dim UserHS
Set UserHS = New Art_User
id=int(chkhtm(trim(request("id"))))
action=trim(request("action"))
username=chkhtm(trim(S("username")))
content=chkhtm(trim(request("content")))
Artyzm = Request.Form("Artyzm")
Pass= S("Pass")
Anonymous=ChkClng(S("Anonymous"))
addtime=now()
If CStr(Artyzm) <>CStr(Session("Artyzm")) then
call alert("验证码有误,重新输入!","")
End If
if Anonymous=0 Then
if Cbool(UserHS.UserLoginChecked)=false then
if Pass="" Then
Response.Write("请填写登录密码或选择游客发表。")
Response.End
End if
PassWord=Md5(Pass)
Set UserRS=Server.CreateObject("Adodb.RecordSet")
UserRS.Open "Select * From Art_User Where UserName='"&username&"' And PassWord='"&PassWord&"' ",Conn,1,3
If UserRS.Eof And UserRS.BOf Then
call alert("你输入的用户名或密码有误,请重新输入或选择游客发表!","")
UserRS.Close:Set UserRS=Nothing
ElseIf UserRS("Locked")=1 Then
call alert("您的账号已被管理员锁定,请与管理员联系或选择游客发表!","")
Else
UserRS("LoginTime") = Now
UserRS("LoginIP") = GetIP()
UserRS("LoginNumber") = UserRS("LoginNumber")+1
UserRS("Score")=UserRS("Score")+Split(config("usersetting"),"^@$@^")(5)
UserRS.update
Response.Cookies(Art2008)("UserName") = username
Response.Cookies(Art2008)("PassWord") = PassWord
Response.Cookies(Art2008)("GroupID") = UserRS("GroupID")
Response.Cookies(Art2008)("upload") = "user"
end if
end if
end if
if Anonymous=0 then
plsh=1
else
plsh=config("plsh") '2007_12_28增加 评论审核功能
if (not isNumeric(plsh)) then
plsh=0
end if
end if
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
if id<>"" and username<>"" and content<>"" then
conn.Execute = "insert into newspl (username,content,addtime,ip,newsid,sh,Anonymous) values('"&username&"','"&content&"','"&addtime&"','"&userip&"',"&id&","&plsh&","&Anonymous&")"
end if
if plsh=0 then '2007_12_28增加 评论审核功能
response.write "<script language=JavaScript>" & chr(13) & "alert('已经提交成功,请等待工作人员审核!');" & "history.back()" & "</Script>"
response.end
end if
url=fun_html_url(id)
if action="" then
Response.Write "<META http-equiv='refresh' CONTENT='0;url=newspl.asp?id="&id&"'>"
else
Response.Redirect fun_html_url(id)
end if
Set UserHS = Nothing:call CloseConn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -