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

📄 bookmark.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	      http://www.ChinaXP.Net/bbs/    中国在线--极酷论坛
'#
'#############################################################
%>
<%
'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>

<% '################################## %>
	<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
  <TR>
    <TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0">&nbsp;<% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;你的收藏夹
</FONT></TD>
  </TR>
</TABLE>
</TD>
</TR>
</TABLE>
<% '################################## %>

<%
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><br><br><P><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><center><b>建立或查看收藏夹前请先登陆论坛</b><br><br>如果你尚未注册,请<a href=""policy.asp"">点击这里注册</a>"
	response.write "<BR><BR><A href=""" & Request.ServerVariables("HTTP_REFERER") & """>回到你原来的地方</A></P><BR><BR>"
%>
<meta http-equiv="refresh" content="5; url=<% Response.Write Request.ServerVariables("HTTP_REFERER") %>">
<!--#include file="inc_adv.asp"-->
<!--#include file="inc_footer.asp"-->
<%
	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

⌨️ 快捷键说明

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