<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
call saycardd("增加书签")

%>

<%
dim titles,addurl,act
titles = request("titles")
addurl = request("addurl")
act = request("act")
if act<>"" then
if addurl="" or titles="" then
  conn.close
  set conn=nothing
  response.write "所有都不能为空！"
  Response.Write "<br/><anchor><prev/>返回</anchor>"
  call headsay()
  Response.End
end if
if len(addurl)>200 then
  response.write "输入的地址太长！"
  conn.close
  set conn=nothing
  Response.Write "<br/><anchor><prev/>返回</anchor>"
  call headsay()
  response.end
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select ID from mysq where ids="&myid&" and urlsq='"&addurl&"'",conn,1,1
if not rs.eof then
  Response.write "这个书签您已经成功加入！"
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  Response.Write "<br/><anchor><prev/>返回</anchor>"
  call headsay()
  response.end
end if
rs.close
set rs=nothing
  set rs=server.CreateObject("ADODB.RecordSet")
  rs.open "select ids,urlsq,Gxtime,title from mysq",conn,1,2
  rs.addnew
  rs("ids")=myid
  rs("urlsq")=addurl
  rs("title")=titles
  rs("Gxtime")=now()
  rs.update
  rs.close
  set rs=nothing

conn.close
set conn=Nothing
%>
成功加入到我的书签！
<%else%>
书签标题： 
<br/><input emptyok="true" name="titles"/>
<br/>访问网址：<br/><input emptyok="true" name="addurl" value="http://"/>
<br/><anchor>增加书签<go href="mybookadd.asp?act=ok&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>" method="post" accept-charset="utf-8">
<postfield name="titles" value="$(titles)"/>
<postfield name="addurl" value="$(addurl)"/>
</go></anchor>
<%end if%>
<br/><a href="mybook.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[我的书签]</a>
<%call headsay()%>