<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
Call saycardd("收藏书签")
dim sql,tid
tid=trim(request("tid"))
if TID = "" or IsNumeric(TID) = False then
  Call Error("ID错误！")
end if

dim linkname,linkurl
set Rs=Server.CreateObject("ADODB.Recordset")
Sql="select id from [sell] Where ID="&tID
Rs.open Sql,conn,1,1
If rs.eof Then
  Call Error("不存在的记录！")
end if
rs.close
set rs=nothing
linkurl=ubb(tid)
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from [mysq] where urlsq='"&linkurl&"' and cid=1 and ids="&myid
rs.open sql,conn,1,2
if rs.eof then
rs.addnew
rs("title")=linkname
rs("urlsq")=linkurl
rs("ids")=myid
rs("cid")=1
rs("gxtime")=now()
rs.update
response.write"成功将该书签收藏<br/>"
Else
response.write"该书签已经在您的收藏中了<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<a href='topic.asp?tid="&tid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>返回上级</a>"
response.write"<br/><a href='mybook.asp?saytk="&saytk&"&amp;sid="&sid&"'>[我的书签]</a><br/>"
%>
<%
call headsay()
%>
