www.gusucode.com > 易心博客[圣诞版] 3.5手动安装码程序 > tb.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="conn.asp"--> <!--#include file="Ex_Cls/Ex_FsoCls.asp"--> <!--#include file="Ex_Cls/Ex_CommonCls.asp"--> <% Dim ExComm Set ExComm=new Ex_CommonCls ExComm.CheckInstall ExComm.IsIpAllow Dim id,title,blog_name,url,excerpt Dim rs,strsql,strsqla id=ExComm.G(request.querystring("id")) url=ExComm.G(request.querystring("url")) blog_name=ExComm.G(request.querystring("blog_name")) excerpt=ExComm.G(request.querystring("excerpt")) title=ExComm.G(request.querystring("title")) If url="" Then url=ExComm.G(request.Form("url")) blog_name=ExComm.G(request.form("blog_name")) excerpt=ExComm.G(request.form("excerpt")) title=ExComm.G(request.form("title")) End If If id="" Then id=ExComm.G(request.Form("id")) End If If url=""Then tbResponseXML 1,"无效参数,URL地址不存在!" End if If id="" Then tbResponseXML 1,"无效参数,没有id参数!" End if If title="" Then title=ExComm.cutstr(url,50) End If If id<>"" And url<>"" Then Set rs=Conn.execute("select * from log where id="&id) If Not rs.eof And Not rs.bof Then If rs("ishide")<>"游客" Then tbResponseXML 1,"此日志不允许引用!" Else Conn.execute("update Ex_Log Set tb=tb+1 where id="&id ) strsql="insert into Ex_Trackback (url,parentid,title" strsqla="values('"&url&"',"&id&",'"&title&"'" If blog_name<>"" Then strsql=strsql&",blog_name" strsqla=strsqla&",'"&blog_name&"'" End If If excerpt<>"" Then strsql=strsql&",excerpt" strsqla=strsqla&",'"&excerpt&"'" End If strsql=strsql&")"&strsqla&")" Conn.execute(strsql) tbResponseXML 0,"引用添加成功!" End if Else tbResponseXML 1,"日志不存在!" End If End if Function tbResponseXML(intFlag, strMessage) Response.contentType="text/xml" Response.write "<?xml version=""1.0"" encoding=""GB2312""?><response><error>"&intFlag&"</error>" If intFlag=1 Then Response.write "<message>"&strMessage&"</message>" End if Response.write "</response>" Response.End End Function %>