?? favadd.asp
字號:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!--#include file="inc/theme.asp"-->
<%
rem ----------------------
rem ------主程序開始------
rem ----------------------
dim boardid
dim announceid
dim rootid
dim topic
dim url
stats="論壇收藏夾"
set rs=server.createobject("adodb.recordset")
if membername="" then
Errmsg=Errmsg+"<br>"+"<li>您還沒有<a href=reg.asp>登錄</a>。"
Founderr=true
end if
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定論壇版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面參數。"
else
boardid=request("boardid")
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
AnnounceID=request("id")
end if
if request("RootID")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("RootID")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
RootID=request("RootID")
end if
call nav()
call headline(1)
if founderr then
call Error()
else
url="dispbbs.asp?"
url=url+"boardid="+boardid+"&rootid="+rootid+"&id="+announceid
call chkurl()
if founderr=true then
call Error()
else
call favadd()
if founderr=true then
call Error()
else
call success()
end if
end if
end if
call endline()
sub chkurl()
sql="select topic,rootid,announceid,boardid from bbs1 where announceid="&cstr(announceid)&" and rootid="&cstr(rootid)&" and boardid="&cstr(boardid)
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br>"+"<li>沒有相關貼子。"
Founderr=true
else
topic=rs("topic")
end if
rs.close
end sub
sub favadd()
sql="select * from bookmark where url='"&trim(url)&"'"
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
Errmsg=Errmsg+"<br>"+"<li>該貼子已經在收藏夾中。"
Founderr=true
else
rs.addnew
rs("username")=membername
rs("topic")=topic
rs("url")=url
rs("addtime")=Now()
rs.update
end if
rs.close
end sub
sub success()
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=TableWidth%> bgcolor=<%=tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr align="center">
<td width="100%" bgcolor=<%=tabletitlecolor%>><font color="<%=TablefontColor%>">成功:帖子收藏</font></td>
</tr>
<tr>
<td width="100%" bgcolor=<%=tablebodycolor%>><font color="<%=TableContentColor%>"><b>本帖子已經收入您在論壇的<a href=favlist.asp>收藏夾</a></b><br><br></font>
</td>
</tr>
<tr align="center">
<td width="100%" bgcolor=<%=tabletitlecolor%>>
<a href="javascript:history.go(-1)"> << 返回上一頁</a>
</td>
</tr>
</table> </td></tr></table>
<%
end sub
set rs=nothing
rem ----------------------
rem ------主程序結束------
rem ----------------------
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -