📄 more.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/bloginfo.asp"-->
<!--#include file="inc/userinfo.asp"-->
<!--#include file="inc/showcode.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/calendar.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim action,show_logid,commentid
dim showlogpass,logpassword
logpassword=trim(request("logpassword"))'md5
'show_username=replacebadchar(trim(request.QueryString("name")))
show_logid=clng(trim(request.QueryString("id")))
action=trim(request.QueryString("action"))
commentid=clng(request.QueryString("commentid"))
showlogpass=false
if logpassword<>"" then
logpassword=md5(logpassword)
set rs=conn.execute("select id from blog where id="&show_logid&" and ispassword='"&logpassword&"'")
if rs.eof then
Response.Write"<script language=JavaScript>"
Response.Write"alert(""对不起!密码错误!"");"
Response.Write"window.history.go(-1);"
Response.Write"</script>"
else
showlogpass=true
end if
end if
if action="addcomment" then
if CheckUserLogined()=true then
call addcomment()
else
if enguestcomment="true" then
if trim(request("password"))<>"" then
call commentlogin()
if CheckUserLogined()=true then
call addcomment()
end if
else
call addcomment()
end if
else
if CheckUserLogined()=false then
call commentlogin()
if CheckUserLogined()=true then
call addcomment()
end if
else
call addcomment()
end if
end if
end if
end if
call usershow()
response.Write "<script language=""javascript"">"
response.Write "quote='"&Replace(Replace(Replace(Replace(quote(commentid),"\","\\"),"'","\'"),VbCrLf,"\n"),chr(13),"")&"';"
response.Write "</script>"
call sub_showlogmore(user_showcomment_num,"more.asp?name="&show_username&"&id="&show_logid)
show=replace(show,"$show_log$",show_logmore)
response.Write show
call bottom()
function quote(commentid)
if commentid>0 then
dim rs
set rs=conn.execute("select comment_user,addtime,comment from comment where id="&commentid)
if not rs.eof then
quote="<div style='margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3'><strong>以下引用"&trim(rs(0))&"在"&trim(rs(1))&"的评论:</strong><br><br>"
quote=quote&rs(2)&"</div><br>"
end if
end if
set rs=nothing
end function
dim password,CookieDate,rsreg,sql
sub commentlogin()
dim sql
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
if UserName="" then
Response.Write"<script language=JavaScript>"
Response.Write"alert(""对不起!用户名不能为空!"");"
Response.Write"window.history.go(-1);"
Response.Write"</script>"
end if
if Password="" then
Response.Write"<script language=JavaScript>"
Response.Write"alert(""对不起!密码不能为空!"");"
Response.Write"window.history.go(-1);"
Response.Write"</script>"
end if
if CookieDate="" then
CookieDate=0
else
CookieDate=Clng(CookieDate)
end if
set rs=conn.execute("select lockip from lockip where lockip='"&Request.ServerVariables("REMOTE_ADDR")&"'")
if not (rs.bof or rs.eof) then
Response.Write"<script language=JavaScript>"
Response.Write"alert(""对不起!你的IP已被锁定,不能登陆!"");"
Response.Write"window.history.go(-1);"
Response.Write"</script>"
else
if ot_user then
call ot_chklogin()
else
call ob_chklogin()
end if
end if
end sub
'**************************************************
'过程名:addcomment
'作 用:添加回复
'参 数:无
'**************************************************
sub addcomment()
if ChkPost()=false then
response.write("不允许从外部提交!")
response.clear
response.End()
end if
dim rs,sql,subjectid,classid,mainuser
set rs=conn.execute("select lockip from lockip where lockip='"&Request.ServerVariables("REMOTE_ADDR")&"'")
if not (rs.bof or rs.eof) then
Response.Write"<script language=JavaScript>"
Response.Write"alert(""对不起!你的IP已被锁定,不能发表留言!"");"
Response.Write"window.history.go(-1);"
Response.Write"</script>"
end if
'增加日志回复数
set rs=server.createobject("adodb.recordset")
sql="select * from blog where id="&show_logid
rs.open sql,conn,1,3
subjectid=rs("subjectid")
mainuser=rs("username")
classid=rs("classid")
rs("commentnum")=rs("commentnum")+1
rs.update
rs.close
'增加用户表评论数
conn.execute("update [user] set commentcount=commentcount+1 where username='"&show_username&"'")
'增加系统评论数
conn.execute("update [bloginfo] set commentcount=commentcount+1 ")
'添加评论
sql="select * from comment where mainuser='"&show_username&"'"
rs.open sql,conn,1,3
rs.addnew
rs("mainid")=clng(request.QueryString("id"))
if CheckUserLogined()=true then
rs("comment_user")=username
else
rs("comment_user")=request.Form("username")&"(游客)"
end if
rs("comment")=debadstr(request.Form("edit"))
rs("commenttopic")=debadstr(request.Form("commenttopic"))
rs("homepage")=request.Form("homepage")
rs("addtime")=blognow()
rs("mainsubject")=subjectid
rs("mainuser")=mainuser
rs("mainclass")=classid
rs("addip")=Request.ServerVariables("REMOTE_ADDR")
rs.update
rs.close
Response.Redirect("more.asp?name="&show_username&"&id="&show_logid)
end sub
'**************************************************
'过程名:sub_showlogmore
'作 用:显示日志及回复
'参 数:where 条件,显示条数,连接名
'**************************************************
sub sub_showlogmore(num,strurl)
dim show_logcyc,show_topic,show_loginfo,show_logtext,show_more,commenttopic
dim show_emot,show_author,show_addtime,show_topictxt
dim rs,rssubject
dim vipsee
dim qurl,qcommentid
dim homepage
qcommentid=clng(request.QueryString("commentid"))
'response.Write(strurl)
dim count,pagesize,pagecount,page,temp
'=======以下为分页设置=====================
'num=2
pagesize=num '每页显示多少篇回复
set rs=conn.execute("select count(id) from comment where mainid="&show_logid)
count=rs(0)
set rs=nothing
if (count mod pagesize)=0 then
pagecount= count \ pagesize
else
pagecount= (count \ pagesize)+1
end if
if request.querystring("page")<>"" then
page=request.querystring("page")
if page<=0 then page=1
else
page=1
end if
'===============以下为显示代码===============
if issqldate then
dim cmd
set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection=conn
cmd.CommandType=4
cmd.CommandText="ob_user_showlogmore"
cmd("@id")=show_logid
set rs=cmd.Execute
set cmd=nothing
else
set rs=conn.execute("select face,topic,subjectid,id,username,addtime,logtext,ishide,commentnum,showword,ispassword,iis,trackback,isbest,blog_password,author from blog where passcheck<>'false' and id="&show_logid)
end if
if not rs.eof then
response.write "<meta name='DEscriptions' contect='"&user_blogname&"--"&rs(1)&"'>"& vbcrlf
response.Write "<title>"&user_blogname&"--"&rs(1)&"</title>"& vbcrlf
response.Write "</head>" & vbcrlf
response.Write "<body>" & vbcrlf& "<a name='top'></a>"
show_emot=""'<img src=images/face/"&rs(0)&".gif >"
if isnull(rs(15)) then
if nickname<>"" then show_author=nickname else show_author=rs(4)
else
if rs(15)=rs(4) then
if nickname<>"" then show_author=nickname else show_author=rs(4)
else
dim rstmp
set rstmp=conn.execute("select nickname from [user] where username='"&rs(15)&"'")
if rstmp.eof then
show_author=rs(15)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -