⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookmark.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'########## Snitz Forums 2000 Version 3.1 SR4 ####################
'#                                                               #
'#  汉化修改: 资源搜罗站                                         #
'#  电子邮件: cgier@21cn.com                                     #
'#  主页地址: http://www.sdsea.com                               #
'#            http://www.99ss.net                                #
'#            http://www.cdown.net                               #
'#	     http://www.wzdown.com                               #
'#	     http://www.13888.net                                #
'#  论坛地址:http://ubb.yesky.net                                #
'#  最后修改日期: 2001/03/12    中文版本:Version 3.1 SR4        #
'#################################################################
'# 原始来源                                                      #
'# Snitz Forums 2000 Version 3.1 SR4                             #
'# Copyright 2000 http://forum.snitz.com - All Rights Reserved   #
'#################################################################
'#【版权声明】                                                   #
'#                                                               #
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,#
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。          #
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓#
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!  #
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作#
'# 如有任何问题请到我们的论坛告诉我们                            #
'#################################################################
%>
<% 
'Create New Bookmarks tableset 
'my_conn= Server.CreateObject("ADODB.Connection")
'set rs = Server.CreateObject("ADODB.Recordset")
'my_Conn.Open ConnString
'on error resume next
'StrSql = "CREATE TABLE FORUM_Bookmarks (Bookmark_ID COUNTER, "
'StrSql = StrSql & "B_MemberID REAL, B_TopicID REAL, "
'set rs = my_conn.Execute (StrSql)
'set rs = nothing
'set my_conn = nothing
'rs.Close
'my_conn.Close 

'Now here is the fun bit...

'Just add a link to the top.inc page probably near the search links and stuff:
'<a href="bookmark.asp" title="查看你的收藏夹">你的收藏夹</a> 
'Now add a link to the topic.asp page somewhere near the top:
'<a href="bookmark.asp?mode=add&id=<%=rs("Topic_ID")% >">将本主题加入收藏夹</a> 
'Then create a file called ... yes you can guess it ... bookmark.asp and put all this code in it:

 %>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<%
nRefreshTime = Request.Cookies(strCookieURL & "Reload")

if Request.form("cookie") = "1" then
        if strSetCookieToForum = 1 then	
      Response.Cookies(strCookieURL & "Reload").Path = strCookieURL
	end if
	Response.Cookies(strCookieURL & "Reload") = Request.Form("RefreshTime")
	Response.Cookies(strCookieURL & "Reload").expires = strForumTimeAdjust + 365
	nRefreshTime = Request.Form("RefreshTime")
end if

if nRefreshTime = "" then
	nRefreshTime = 0
end if
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
if Request.form("cookie") = "2" then
	ActiveSince = Request.Form("ShowSinceDateTime")
    if strSetCookieToForum = 1 then	
      Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
	end if
	Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
Select Case ActiveSince
	Case "LastVisit" 
		lastDate = ""
	Case "LastHour" 
		lastDate = DateToStr(DateAdd("h",-1,strForumTimeAdjust))
	Case "LastDay" 
		lastDate = DateToStr(DateAdd("d",-1,strForumTimeAdjust))
	Case "LastWeek" 
		lastDate = DateToStr(DateAdd("w",-7,strForumTimeAdjust))
	Case "LastMonth" 
		lastDate = DateToStr(DateAdd("m",-1,strForumTimeAdjust))
	Case "Registration"
		lastDate = "All"
	Case Else
		lastDate = ""
End Select
%>
<!--#INCLUDE FILE="inc_top.asp" -->
<script language="JavaScript">
<!--
function autoReload()
{
	document.ReloadFrm.submit()
}
//-->
</script>
<script language="JavaScript">
<!--
function SetLastDate()
{
	document.LastDateFrm.submit()
}
//-->
</script>

<%
if IsEmpty(Session(strCookieURL & "last_here_date")) then
	Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Cookies(strUniqueID & "User")("Name"))
end if
if lastDate = "" then
	lastDate = Session(strCookieURL & "last_here_date")
end if
if Request.Form("AllRead") = "Y" then
	Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Cookies(strUniqueID & "User")("Name"))
	Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Cookies(strUniqueID & "User")("Name"))
	lastDate = Session(strCookieURL & "last_here_date")
end if

	bkMarkPageSize = 2
	set rs = server.CreateObject("ADODB.RecordSet")
	set rsUser = server.CreateObject("ADODB.RecordSet")


If trim(strDBNTUserName)="" Then
	' No user/password so ask user
	response.write "<br><br><P><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><center><b>建立或查看收藏夹前请先登陆论坛</b><br><br>如果你尚未注册,请<a href=""policy.asp"">点击这里注册</a>"
	response.write "</P>"
	Response.End
End If

' Got password details so do it
Select Case Request.QueryString("mode")

Case "add"
	strTopic = Request.QueryString("id")
	testSql ="SELECT * FROM "& strTablePrefix & "Bookmarks WHERE B_MemberID=" & getmemberID(strDBNTUserName) & " and B_TopicID=" & strTopic
	rs.Open testSql, my_Conn
	If rs.BOF or rs.EOF Then

		' Bookmark doesn't already exist so add it
		insSql = "INSERT INTO "& strTablePrefix & "Bookmarks (B_MemberID, B_TopicID) VALUES ("
		insSql = insSql & getmemberID(strDBNTUserName) & ", "
		insSql = insSql & strTopic & ")"
		
		my_conn.Execute (insSql)
	End If
	%>
	<br><center>
	<meta http-equiv="Refresh" content="0; URL=<% response.write "link.asp?topic_id=" & strTopic %>">
	<center>
	
	<p><font size="<% =strDefaultFontSize %>"><b>已将主题加入收藏夹!</b></font></p>
	<p><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">你可以浏览任何你加入收藏夹的主题<br>在任何的时间,只要点选"我的收藏夹"。<br>现在系统把你送回论坛或主题,如果没有反应请<a href="<% response.write "link.asp?topic_id=" & strTopic %>">点击这里</a>.
	</font></p></center>
	<div align="center"><font face="<% =strDefaultFontFace %>" size="2"><a href="default.asp">返回论坛</a></font>
</div>
	<P>&nbsp;<p>&nbsp;<p>
	<%

Case "delete"
	delBookmark = split(Request.Form("delBookmark"), ",")
	for i = 0 to ubound(delBookmark)
		' Delete selected topic bookmarks
		delSQL = "Delete From "& strTablePrefix & "Bookmarks where Bookmark_ID = " & cint(delBookmark(i))
    my_conn.Execute delSQL
	next
	response.write "<br><center><font face=""" & strDefaultFontFace & """ size=3><b>选择的收藏夹已删除!</b></font><br>"
	response.write "<a href=""default.asp"">返回论坛首页</a></center>"
Case "deleteAll"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -