📄 blog_tb.asp
字号:
<!--#include file="mdb.asp" -->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/function_blog.asp" -->
<%
IF IsInteger(Request.QueryString("id")) And Request.QueryString("action")<>"deltb" Then
Dim tbID,tbTitle,tbURL,tbExcerpt,tbBlog,tbCP
tbID = clng(trim(Request.QueryString("id")))
tbCP="GB2312"
If Trim(Request.QueryString("CP"))="GBK" Then tbCP="GB2312"
If Trim(Request.QueryString("TM"))="RSS" Then
Set tbBlog=Conn.Execute("SELECT tb_Title,tb_URL,tb_Intro FROM b_Trackback WHERE blog_ID="&tbID)
If Not (tbBlog.BOF and tbBlog.EOF) Then
Response.contentType="text/xml"
%>
<?xml version="1.0" encoding="<%=tbCP%>"?>
<response>
<error>0</error>
<rss version="0.91"><channel>
<title><%=SiteName%></title>
<link><%=SiteURL%></link>
<description><%=SiteName%></description>
<language>zh-cn</language>
<item>
<% do while not tbBlog.eof %>
<title><%=tbBlog(0)%></title>
<link><%=tbBlog(1)%></link>
<description><%=tbBlog(2)%></description>
<% tbBlog.MoveNext
Loop
Else
Call tbResponseXML(1,"无效参数,日志不存在!",tbCP)
End If
Set tbBlog=Nothing
%>
</item>
</channel>
</rss></response>
<%Else
If Request.QueryString("url")<>Empty Then
tbURL = CheckStr(Request.QueryString("url"))
tbTitle = CheckStr(Request.QueryString("title"))
tbExcerpt = HTMLEncode(CheckStr(Request.QueryString("excerpt")))
tbBlog = CheckStr(Request.QueryString("blog_name"))
ElseIf Request.Form("url")<>Empty Then
tbURL = CheckStr(Request.Form("url"))
tbTitle = CheckStr(Request.Form("title"))
tbExcerpt = CheckStr(Request.Form("excerpt"))
tbBlog = CheckStr(Request.Form("blog_name"))
Else
Call tbResponseXML(1,"无效参数,URL地址不存在!",tbCP)
End If
tbURL=CutStr(tbURL,100)
if tbTitle="" Then
tbTitle=tbURL
Else
tbTitle=CutStr(tbTitle,100)
End If
tbExcerpt=CutStr(tbExcerpt,252)
If tbExcerpt="" Then Call tbResponseXML(1,"无效内容,出现非法字符!",tbCP)
tbBlog=CutStr(tbBlog,100)
tbURL=HTMLEncode(tbURL)
tbTitle=HTMLEncode(tbTitle)
tbExcerpt=HTMLEncode(tbExcerpt)
tbBlog=HTMLEncode(tbBlog)
If Conn.Execute("SELECT count(blog_ID) FROM b_Content WHERE blog_IsShow=True And blog_DisComment=False AND blog_ID="&tbID)(0)>0 AND Conn.Execute("SELECT count(tb_ID) FROM b_Trackback WHERE blog_ID="&tbID&" AND tb_URL='"&tbURL&"' AND tb_Title='"&tbTitle&"' AND tb_Intro='"&tbExcerpt&"' AND tb_Site='"&tbBlog&"'")(0)<1 Then
Conn.Execute("INSERT INTO b_TrackBack (blog_ID, tb_URL, tb_Title, tb_Intro, tb_Site, tb_PostTime) VALUES ("&tbID&",'"&tbURL&"','"&tbTitle&"','"&tbExcerpt&"','"&tbBlog&"',Now())")
Conn.Execute("UPDATE b_Content SET blog_QuoteNums=blog_QuoteNums+1 WHERE blog_ID="&tbID)
Else
Call tbResponseXML(1,"此日志是隐藏日志不允许引用,或者此引用通告已发送!",tbCP)
End If
End If
Else
start="BLOG日志 - 引用通告"
call head()
call menu()
%>
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class="table-hx66s">
<TR>
<TD height="25"><%Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='blog.asp'>BLOG日志</a>"
Response.Write " >> 引用通告"%></td>
</tr>
</table>
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class="table-hx66s">
<tr>
<TD width=175 vAlign=top align=center>
<table border="0" width=165 align="center" cellpadding="0" cellspacing="1" class="b5" style="border-collapse: collapse">
<tr>
<td height="23" class="a5"> 会 员 登 录</td>
</tr>
<tr>
<td height="22"><%call userlogin()%></td>
</tr>
</table><br>
</td>
<td width="*" valign="top" align="right">
<table border="0" width="99%" align="center" cellpadding="0" cellspacing="1" class="b5" style="border-collapse: collapse">
<tr>
<td height="23" class="a5"> 引 用 通 告</td>
</tr>
<tr>
<td align="center" height="136">
<%If Request.QueryString("action")="deltb" Then
If Not (IsInteger(Request.QueryString("tbID")) AND IsInteger(Request.QueryString("blogID"))) Then
Response.write("无效参数, <a href='javascript:history.go(-1);'>请点击返回</a>")
Else
Dim dele_tb
Set dele_tb=Conn.ExeCute("SELECT T.blog_ID,C.blog_Author FROM b_TrackBack as T,b_Content as C WHERE T.blog_ID=C.blog_ID AND T.tb_ID="&clng(Request.QueryString("tbID")))
IF dele_tb.EOF AND dele_tb.BOF Then
Response.write("引用通告不存在,<a href='javascript:history.go(-1);'>请点击返回</a>")
Else
If (checkmember=true AND dele_tb("blog_Author")=Hx66_Name) OR SupAdmin=true Then
Conn.ExeCute("UPDATE b_Content SET blog_QuoteNums=blog_QuoteNums-1 WHERE blog_ID="&dele_tb("blog_ID"))
Conn.Execute("DELETE * FROM b_TrackBack WHERE tb_ID="&clng(Request.QueryString("tbID")))
Response.write("引用通告删除成功<br><a href='showblog.asp?blog_id="&clng(Request.QueryString("blogID"))&"'>请点击返回,或者3秒后自动返回</a><meta http-equiv='refresh' content='3;url=showblog.asp?blog_id="&clng(Request.QueryString("blogID"))&"'>")
Else
Response.write("你没有权限删除引用通告,<a href='javascript:history.go(-1);'>请点击返回</a>")
End If
End IF
End If
Else
If IsInteger(Request.QueryString("blogID"))=False Then
Response.Write("<a href=""blog.asp"">非法参数,请返回BLOG</a>")
Else
Dim blogRS, tbRS
Set blogRS=Conn.Execute("SELECT * FROM b_Content WHERE blog_ID="&clng(Request.QueryString("blogID")))
If Not (blogRS.bof and blogRS.eof) Then%>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#F0F0F0">
<tr>
<td bgcolor="#F0F0F0"><%Response.Write("<a href='showblog.asp?blog_id="&blogRS("blog_ID")&"'><b>"&blogRS("blog_Title")&"</b></a> [ "&DateToStr(blogRS("blog_PostTime"),"Y-m-d")&" | 作者:"&blogRS("blog_Author")&" | 来自:<a href='"&blogRS("blog_FromURL")&"' target='_blank'>"&blogRS("blog_From")&"</a> ]")%></td>
</tr>
<tr><td bgcolor="#FFFFFF">
<%If blogRS("blog_IsShow")=False Then
Response.Write("<b>此日志为隐藏日志,禁止引用通告</b>")
Else%>
<b>引用地址:</b><br><img src="img/blog/gb2312_1.gif" border="0" align="absmiddle"> <%=webURL%>/blog_tb.asp?id=<%=blogRS("blog_ID")%><br><br>
<b>RSS引用地址:</b><br><img src="img/blog/gb2312.gif" border="0" align="absmiddle"> <%=webURL%>/blog_tb.asp?id=<%=blogRS("blog_ID")%>&TM=RSS<br><br>
<%Set tbRS=Server.CreateObject("Adodb.Recordset")
SQL="SELECT * FROM b_TrackBack WHERE blog_ID="&clng(Request.QueryString("blogID"))&" ORDER BY tb_PostTime DESC"
tbRS.Open SQL,CONN,1,1%>
<b>该日志引用文章(<%=tbRS.Recordcount%>):</b><hr size="1" noshade color="#CCCCCC">
<%Do While Not tbRS.eof
Response.write("<a href='"&tbRS("tb_URL")&"' target='_blank'><B>·</B> "&tbRS("tb_Title")&" [ "&tbRS("tb_PostTime")&" | <b>"&tbRS("tb_Site")&"</b> ]</a><br>")
tbRS.MoveNext
Loop
tbRS.Close
Set tbRS=nothing
End If%><br><br></td>
</tr>
</table>
<%Else
Response.Write("无效参数, <br><br><a href=""javascript:history.go(-1);"">请点击返回</a>")
End If
Set blogRS=nothing
End If
End If
%>
</td>
</tr>
</table></td>
</tr>
</table>
<%
call footer()
End If
Sub tbResponseXML(intFlag, strMessage,codePage)
Response.contentType="text/xml"
Response.write "<?xml version=""1.0"" encoding="""&codePage&"""?><response><error>"&intFlag&"</error>"
If intFlag=1 Then Response.write "<message>"&strMessage&"</message>"
Response.write "</response>"
Response.End
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -