Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Problem with Saved Draft in "User Space Mod"
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 06 May 2014 :  10:05:52  Show Profile  Reply with Quote
I did this mod: User Space Mod.

A member is wanting to edit a reply that's been saved but can't.

I've logged onto her account and I am unable to do anything to her reply that's been sent to the "Saved Draft" folder. There's the icon "icon_draft_reply.gif" on the left but it's not clickable. Should it be? It looks much like an edit button with the tiny pencil on the icon.

I can click on the "Go to Topic" link and it does take me to the topic.

There's the icon "icon_trashcan.gif" on the right and it is clickable but I don't want to delete the saved draft.

If I click on the draft name I receive this message: "Note: Only the poster of this draft, and the Admin can edit this draft." The only option then is to click on the "Post" button. But when I click on it, the screen just goes blank (except for the header). . .the saved draft isn't posted.

I can then go back to the draft folder and it's showing that it's still there.

Any help will be greatly appreciated!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 09 May 2014 01:00:35

MaGraham
Senior Member

USA
1297 Posts

Posted - 12 May 2014 :  09:33:13  Show Profile

Is no one familiar with the User Space Mod?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 12 May 2014 :  11:23:12  Show Profile
I'll take a look at it soon, Ma. It's a big mod and I've been pretty busy with the modular package.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 15 May 2014 :  01:59:32  Show Profile

Okay, Carefree. I understand.

Thank you!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 10 January 2015 :  15:36:29  Show Profile
I forgot all about this one, Ma. Was browsing and stumbled on it. Try this, the pencil icon has no function. To edit, just click the post title.

"inc_draft_info.asp"


<%
Select Case MethodType
	Case "Topic", "TopicQuote", "Reply", "ReplyQuote"
		If Trim(lCase(Request.Form("Submit"))) = "save as draft" or Trim(Request.Form("draft")) <> "" Then
			Dim isDraft,isOldDraft,strSqlAction
			If Trim(lCase(Request.Form("Submit"))) = "save as draft" Then
				isDraft = 1
			Else
				isDraft = 0
			End If
			If Trim(Request.Form("draft")) <> "" Then
				If isNumeric(Request.Form("draft")) Then
					Draft_ID = cLng(Request.Form("draft"))
					isOldDraft = 1
				Else
					Go_Result "There is a problem with the form data", 0
				End If
			Else
				isOldDraft = 0
			End If
			'# three possibilities  0-insert|1-update|2-delete
			If isDraft Then
				If isOldDraft = 0 Then
					strSqlAction = 0
				Else
					strSqlAction = 1
				End If
			Else
				strSqlAction = 2
			End If
			If strFloodCheck = 1 Then
				If Trim(Request.Cookies(strCookieURL & "floodcheck")) <> "" and mLev < 3 Then
					strTimeLimit = replace(strFloodCheckTime, "-", "")
					Go_Result "Sorry! We have flood control activated.<br />You cannot post within " & strTimeLimit & " seconds of your last post.<br />Please try again after this period of time elapses.", 0
				End If
			End If
			Select Case strSqlAction
				Case 1,2
					strSql = "Select D_AUTHOR "
					strSql = strSql & " FROM " & strActivePrefix & "DRAFTS "
					strSql = strSql & " WHERE DRAFT_ID = " & Draft_ID
					Set rsChk = my_Conn.Execute(strSql)
					If rsChk.EOF or rsChk.BOF Then
						Set rsChk = Nothing
						Go_Result "Draft could not be found.<br />It may have been deleted or it never existed.", 0
					Else
						intMemberID = rsChk("D_AUTHOR")
						rsChk.close
					End If
					Set rsChk = Nothing
					ChkMember = cLng(ChkUser(strDBNTUserName, strPassword, intMemberID))
					Select Case ChkMember
						Case 0 '## Invalid Pword
							Go_Result "Invalid Password or UserName.",0
						Case 1 '## Author of Post so OK
							'## Do Nothing
						Case 2 '## Normal User - Not Authorised
							Go_Result "Only an Admin, a Moderator or the Author can change this draft.",0
						Case 3 '## Moderator so OK - check the Moderator of this forum
							If chkForumModerator(Forum_ID, strDBNTUserName) = "0" Then
								Go_Result "Only an Admin, a Moderator or the Author can change this draft", 0
							End If
							If intMemberID = intAdminMemberID and MemberID <> intAdminMemberID Then
								Go_Result "Only the Forum Admin can change this draft", 0
							End If
						Case 4,5 '## Admin so OK
							If intMemberID = intAdminMemberID and MemberID <> intAdminMemberID Then
								Go_Result "Only the Forum Admin can change this draft", 0
							End If
						Case Else
							Go_Result cStr(ChkMember),0
					End Select
				Case 0
					strSql = "SELECT MEMBER_ID, M_LEVEL, M_LASTPOSTDATE, " & strDBNTSQLName
					If strAuthType = "db" Then
						strSql = strSql & ", M_PASSWORD "
					End If
					strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS WHERE " & strDBNTSQLName & " = '" & strDBNTUserName & "' AND M_STATUS = " & 1
					If strAuthType = "db" Then
						strSql = strSql & " AND M_PASSWORD = '" & ChkString(strPassword,"SQLString") & "'"
						QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
					Else
						QuoteOk = ChkQuoteOk(strDBNTUserName)
					End If
					Set rs = my_Conn.Execute (strSql)
					If not (ChkQuoteOk(strPassword)) Then rs.Close
					If rs.BOF or rs.EOF or not(QuoteOk) or not (ChkQuoteOk(strPassword)) Then '##  Invalid Password
						Set rs = Nothing
						Go_Result "Invalid UserName or Password!", 0
					Else
						intMemberID = rs("MEMBER_ID")
						strLastPostDate = rs("M_LASTPOSTDATE")
						rs.Close
					End If
					Set rs = Nothing
					If strFloodCheck = 1 Then
						If strLastPostDate > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 Then
							strTimeLimit = replace(strFloodCheckTime, "-", "")
							Go_Result "Sorry! We have flood control activated.<br />You cannot post within " & strTimeLimit & " seconds of your last post.<br />Please try again after this period of time elapses.", 0
						End If
					End If
					If strPrivateForums = "1" and ForumChkSkipAllowed = 0 Then
						If not(chkForumAccess(Forum_ID,intMemberID,false)) Then
							Go_Result "You are not allowed to post in this forum !", 0
						End If
					End If
			End Select
			Select Case strSqlAction
				Case 0,1
					txtMessage = ChkString(Request.Form("Message"),"message")
					Select Case MethodType
						Case "Topic"
							txtSubject = ChkString(Request.Form("Subject"),"SQLString")
							If strBadWordFilter = "1" Then
								txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
							End If
							If Len(txtSubject) > 50 Then
								Go_Result "The Subject can not be greater than 50 characters",0
							End If
						Case "Reply", "ReplyQuote", "TopicQuote"
							strSql = "Select T_SUBJECT FROM " & strTablePrefix & "TOPICS " & _
							"WHERE TOPIC_ID = " & Topic_ID
							Set rs = my_Conn.Execute (strSql)
							If rs.BOF or rs.EOF Then '##  Invalid Password
								Set rs = Nothing
								Go_Result "Error - Topic does not exist!", 0
							Else
								txtSubject = chkString("re: " & rs("T_SUBJECT"),"sqlstring")
								rs.close
							End If
							Set rs = Nothing
					End Select
					UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
					If UserIPAddress = "" Then
						UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
					End If
					If txtMessage = " " Then
						Go_Result "You must post a message!", 0
						Response.End
					End If
					If strSqlAction = 0 Then
						'## Forum_SQL - Add new draft to Drafts Table
						strSql = "INSERT INTO " & strTablePrefix & "DRAFTS (FORUM_ID, CAT_ID, D_MESSAGE, D_AUTHOR, D_DATE, D_SUBJECT"
						If strIPLogging <> "0" Then
							strSql = strSql & ", D_IP"
						End If
						Select Case MethodType
							Case "Reply", "TopicQuote", "ReplyQuote"
								strSql = strSql & ", TOPIC_ID"
						End Select
						strSql = strSql & ") VALUES ("& Forum_ID & "," & Cat_ID & ",'" & txtMessage & "'," & MemberID & ",'" & DateToStr(strForumTimeAdjust) & "','" & txtSubject & "'"
						If strIPLogging <> "0" Then
							strSql = strSql & ", '" & UserIPAddress & "'"
						End If
						Select Case MethodType
							Case "Reply", "TopicQuote", "ReplyQuote"
								strSql = strSql & ", " & Topic_ID
						End Select
						strSql = strSql & ")"
					Else
						strSql = "UPDATE " & strTablePrefix & "DRAFTS SET FORUM_ID = " & Forum_ID & ", CAT_ID = " & Cat_ID & ", D_MESSAGE = '" & txtMessage & "', D_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "', D_LAST_EDITBY = " & intMemberID & ", D_SUBJECT = '" & txtSubject & "'"
						If strIPLogging <> "0" Then
							strSql = strSql & ", D_IP = '" & UserIPAddress & "'"
						End If
						Select Case MethodType
							Case "Reply", "TopicQuote", "ReplyQuote"
								strSql = strSql & ", TOPIC_ID = " & Topic_ID
						End Select
						strSql = strSql & " WHERE DRAFT_ID = " & Draft_ID
					End If
					my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
					If Err.description <> "" Then
						goMsg = "There was an error = " & Err.description
					Else
						If MethodType = "Topic" Then
							goMsg = "This topic was added to your draft folder"
						Else
							goMsg = "This reply was added to your draft folder"
						End If
					End If
					If strFloodCheck = 1 and mLev < 3 Then
						Response.Cookies(strCookieURL & "floodcheck") = "Goodbye"
						Response.Cookies(strCookieURL & "floodcheck").Expires = dateAdd("s",Abs(strFloodCheckTime),strForumTimeAdjust)
					End If
					Response.write  "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>" & goMsg & "</font></p>" & vbNewLine & _
						"      <meta http-equiv=""Refresh"" content=""2; URL="
					If Trim(Request.Form("refer")) <> "" Then
						Response.Write  chkString(Request.Form("refer"),"refer")
					Else
						Response.Write  "default.asp"
					End If
					Response.Write  """>" & vbNewLine & _
						"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & chkString(Request.Form("refer"),"refer") & """>Back to Forum</a><font></p>" & vbNewLine
					Response.End
				Case 2
					strSQL = "DELETE FROM " & strTablePrefix & "DRAFTS WHERE DRAFT_ID=" & Draft_ID
					my_Conn.Execute(strSQL)
			End Select
		End If
	End Select
%>


"userspace.asp"


<%
'#################################################################################
'##
'## USER SPACE MOD by cripto9t
'##
'#################################################################################
%>
<!-- #INCLUDE FILE="config.asp" -->
<!-- #INCLUDE FILE="includes/inc_sha256.asp"-->
<!-- #INCLUDE FILE="includes/inc_func_chknew.asp" -->
<!-- #INCLUDE FILE="includes/inc_func_member.asp" -->
<!-- #INCLUDE FILE="includes/inc_header.asp" -->
<% 
'Legend
'1 User Posts
'2 Drafts
'3 Bookmarks
'4 Friends
'## begin constants
'## Page titles and what-not - you can change these to what ever you like
Const strUSTxt = "Your Space"       ' Main page title
'== strUSMessage - Use forum code to write opening message - forum code must be on
Const strUSMessage = "Welcome to Your Space!
Your Space is your personal portal to manage and track your forum activities.

Only You and Forum Administrators have access to your files.

"
Const strPostTxt = "Posts"                ' Post page title
Const strDraftTxt = "Drafts"              ' Draft page title
Const intDraftWarn = 7                    ' Days till auto delete - warns member that a draft is close to deletion
Const strBookmarkTxt = "Bookmarks"        ' Bookmark page title
Const intIsNew = 7                        ' Number of days to display the new icon - used For bookmarks, friends
Const strFriendTxt = "Friends"            ' Friend page title
Const strFriendLev1 = "Level 1"           ' Friend Level 1
Const strFriendLev2 = "Level 2"           ' Friend Level 2
Const strFriendLev3 = "Level 3"           ' Friend Level 3
'Icon Legend
Const strDraftTopicTxt = "Topic Draft"      ' Draft topic icon text
Const strDraftReplyTxt = "Reply Draft"      ' Draft reply icon text
Const strBookmarkNewTxt = "Recently Added"  ' New bookmark icon text
Const strBookmarkOldTxt = "Bookmark"        ' Old bookmark icon text
Const strFriendNewTxt = "Recently Added"    ' New friend icon text
Const strFriendOldTxt = "Friend"            ' Old friend icon text
'## DO NOT EDIT BELOW THIS LINE!!
Const intFRow = 4                   ' !!! Do Not Edit This Line !!!! Holds # of feature rows
Const intFCol = 6                   ' !!! Do Not Edit This Line !!!! Holds # of feature cols
'## End constants
Dim memID, memName, memLink, bAdminView, intAdminQuery
Dim intMode
Dim strSql
Dim myPage
Dim arrFeatures()
Dim arrSwitch()   'loaded in chkVariables Sub - boolean - holds on/off status of features - Used For menu tree
'## Admin View Check
intAdminQuery = Request.Querystring("memid") 
bAdminView = chkAdminView(intAdminQuery)
If bAdminView = true Then
	memID = clng(intAdminQuery)
	memLink = "&memid=" & memID
	Set rs = my_Conn.Execute ("SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & memID)
	If rs.EOF or rs.BOF Then
		Set rs = Nothing
		getMsg "Member does not exist.<br />Member ID could not be found."
	Else
		memName = rs("M_NAME")
		rs.Close
	End If
	Set rs = Nothing
Else
	memID = MemberID
	memLink = ""
	memName = strDBNTUserName
End If
If mLev = 0 Then
	getMsg "You must login to view this page."
End If
'## Check the mode - set mode variable within parameters For people who like to play with the url
If Trim(Request.QueryString("mode")) <> "" Then
	If isNumeric(Request.QueryString("mode")) <> false Then
		If cLng(Request.QueryString("mode")) > intFRow or cLng(Request.QueryString("mode")) < 0 Then
			intMode = 0
		Else
			intMode = cLng(Request.QueryString("mode"))
		End If
	Else
		intMode = 0
	End If
Else
	intMode = 0
End If
'## check If feature is turned on/off or exists
ReDim arrFeatures(intFCol,intFRow)
'## Main Page
arrFeatures(0,0) = 0                             'Mode
arrFeatures(1,0) = strUSSwitch                   'on/off variable
arrFeatures(2,0) = strUSTxt                      'name of page - constant (top of page)
arrFeatures(3,0) = strIconFolderUserSpace        'closed folder icon
arrFeatures(4,0) = strIconFolderOpen             'open folder icon
arrFeatures(5,0) = strIconFolderUserSpace        'page icon
'## User Posts
arrFeatures(0,1) = 1
arrFeatures(1,1) = strUSPostSwitch 
arrfeatures(2,1) = strPostTxt
arrFeatures(3,1) = strIconFolderPostsClosed
arrFeatures(4,1) = strIconFolderOpenTopic
arrFeatures(5,1) = strIconPosts
'## User Drafts
arrFeatures(0,2) = 2
arrFeatures(1,2) = strUSDraftSwitch
arrFeatures(2,2) = strDraftTxt
arrFeatures(3,2) = strIconFolderDraftsClosed
arrFeatures(4,2) = strIconFolderDraftsOpen
arrFeatures(5,2) = strIconEditTopic
'## User Bookmarks
arrFeatures(0,3) = 3
arrFeatures(1,3) = strUSBookmarkSwitch
arrFeatures(2,3) = strBookmarkTxt
arrFeatures(3,3) = strIconFolderFavoritesClosed
arrFeatures(4,3) = strIconFolderFavoritesOpen
arrFeatures(5,3) = strIconFavorites
'## User Friends
arrFeatures(0,4) = 4
arrFeatures(1,4) = strUSFriendSwitch
arrFeatures(2,4) = strFriendTxt
arrFeatures(3,4) = strIconFolderFriendsClosed
arrFeatures(4,4) = strIconFolderFriendsOpen
arrFeatures(5,4) = strIconFriends
chkVariables arrFeatures,intMode
Select Case intMode
	Case 1,2,3,4
		Dim strHeadCell(), intHeadCnt, intColSpan
End Select
Select Case intMode
	'# 1 = posts
	'# 2 = drafts
	'# 3 = bookmarks
	'# 4 = Friends
	Case 1
		mypage = request("whichpage")
		If ((Trim(mypage) = "") or IsNumeric(mypage) = False) Then mypage = 1
		mypage = cLng(mypage)
		nDays = Request.Cookies(strCookieURL & "USNumDays")
		If cLng(Request.form("Cookie")) = 1 Then
			If strSetCookieToForum = "1" Then
				Response.Cookies(strCookieURL & "USNumDays").Path = strCookieURL
			End If
			Response.Cookies(strCookieURL & "USNumDays") = Request.Form("Days")
			Response.Cookies(strCookieURL & "USNumDays").expires = dateAdd("yyyy", 1, strForumTimeAdjust)
			nDays = Request.Form("Days")
			mypage = 1
		End If
		If request("ARCHIVE") = "true" Then
			nDays = "0"
		End If
		If nDays = "" Then
			nDays = 7
		End If
		defDate = DateToStr(dateadd("d",-(nDays),strForumTimeAdjust))
		strSql = "SELECT DISTINCT T.TOPIC_ID, T.T_AUTHOR, T.T_SubJECT, T.T_STATUS, T.T_STICKY, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, " & _
		"T.T_LAST_POST_REPLY_ID, T.T_REPLIES, T.T_UREPLIES, T.T_VIEW_COUNT, " & _
		"C.CAT_ID, C.CAT_STATUS, C.CAT_ORDER, C.CAT_NAME, " & _ 
		"F.FORUM_ID, F.F_ORDER, F.F_SubJECT, F.F_STATUS, " & _
		"M.MEMBER_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME " & _
		"FROM ((((" & strTablePrefix & "FORUM F LEFT JOIN FORUM_TOPICS T ON F.FORUM_ID = T.FORUM_ID) " & _
		"LEFT JOIN " & strTablePrefix & "REPLY R ON T.TOPIC_ID = R.TOPIC_ID) " & _
		"LEFT JOIN " & strTablePrefix & "MEMBERS M ON T.T_AUTHOR = M.MEMBER_ID) " & _
		"LEFT JOIN " & strTablePrefix & "CATEGORY C ON T.CAT_ID = C.CAT_ID) " & _
		"LEFT JOIN " & strTablePrefix & "MEMBERS MEMBERS_1 ON T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID " & _
		"WHERE (M.MEMBER_ID = " & memID & " OR R.R_AUTHOR = " & memID & ") AND F.F_TYPE = 0 " & _
		"AND T.T_LAST_POST > '" & defDate & "' " & _
		"ORDER BY C.CAT_ORDER ASC, CAT_NAME ASC, F.F_ORDER ASC, F.F_SubJECT ASC, T.T_LAST_POST DESC "
		reDim strHeadCell(6)
		strHeadCell(0) = " "
		strHeadCell(1) = " "
		strHeadCell(2) = "Topic"
		strHeadCell(3) = "Author"
		strHeadCell(4) = "Replies"
		strHeadCell(5) = "Read"
		strHeadCell(6) = "Last Post"
	Case 2
		If cLng(strUSDraftAutoDeleteSwitch) = 1 Then
			call AutoDelete(memID)
		End If
		strSql = "SELECT D.CAT_ID, D.FORUM_ID, DRAFT_ID, TOPIC_ID, D_SubJECT, D_AUTHOR, D_DATE, " & _ 
		"D_LAST_EDIT, M.M_NAME, C.CAT_NAME, F.F_SubJECT " & _
		"FROM ((FORUM_DRAFTS D LEFT JOIN FORUM_CATEGORY C ON D.CAT_ID = C.CAT_ID) " & _
		"LEFT JOIN FORUM_FORUM F ON D.FORUM_ID = F.FORUM_ID) " & _
		"LEFT JOIN FORUM_MEMBERS M ON D.D_AUTHOR = M.MEMBER_ID " & _
		"WHERE D.D_AUTHOR = " & memID & " " & _ 
		"ORDER BY C.CAT_ORDER ASC, C.CAT_NAME ASC, F.F_ORDER ASC, F.F_SubJECT ASC, D.DRAFT_ID DESC" 
		reDim strHeadCell(6)
		strHeadCell(0) = " "
		strHeadCell(1) = " "
		strHeadCell(2) = "Draft"
		strHeadCell(3) = "Topic"
		strHeadCell(4) = "Date"
		strHeadCell(5) = "Last Edit"
		strHeadCell(6) = " "
	Case 3
		strSql = "SELECT BOOKMARK_ID, B_URL, B_TITLE, B_CAT, B_DATE, M_NAME " & _
		"FROM " & strTablePrefix & "BOOKMARKS, " & strMemberTablePrefix & "MEMBERS " & _
		"WHERE B_MEMBER = " & memID & " AND B_MEMBER = MEMBER_ID " & _
		"ORDER BY B_CAT ASC, B_TITLE ASC, B_DATE DESC"
		reDim strHeadCell(5)
		strHeadCell(0) = " "
		strHeadCell(1) = " "
		strHeadCell(2) = "Bookmark"
		strHeadCell(3) = "Url"
		strHeadCell(4) = "Date"
		strHeadCell(5) = " "
	Case 4
		strSql = "SELECT FRIEND_ID, F_MEMBER, F_FRIEND, F_LEVEL, F_DATE, M.M_NAME, " & _
		"F.M_STATUS, F.M_LEVEL, F.M_NAME, F.M_TITLE, F.M_POSTS, F.M_DATE, F.M_EMAIL, " & _
		"F.M_COUNTRY, F.M_HOMEPAGE, F.M_LASTPOSTDATE, F.M_LEVEL, F.M_AIM, " & _
		"F.M_ICQ, F.M_MSN, F.M_YAHOO " & _
		"FROM " & strTablePrefix & "FRIENDS, " & strMemberTablePrefix & "MEMBERS M, " & strMemberTablePrefix & "MEMBERS F " & _
		"WHERE F_MEMBER = " & memID & " AND F_MEMBER = M.MEMBER_ID " & _
		"AND F_FRIEND = F.MEMBER_ID " & _
		"AND F_LEVEL <= 2 " & _
		"ORDER BY F_LEVEL ASC, M.M_LEVEL DESC, M.M_NAME ASC, F_DATE ASC"
		reDim strHeadCell(8)
		strHeadCell(0) = " "
		strHeadCell(1) = " "
		strHeadCell(2) = "Friend"
		strHeadCell(3) = "Level"
		strHeadCell(4) = "Contact"
		strHeadCell(5) = "Friend Since"
		strHeadCell(6) = "Last Post"
		strHeadCell(7) = "Member Since"
		strHeadCell(8) = " "
End Select
If intMode <> 0 Then
	If intMode = 1 Then    '## Paging For user posts
		If strDBType = "mysql" Then 'MySql specific code
			If mypage > 1 Then 
				intOffset = cLng((mypage-1) * strPageSize)
				strSql = strSql & " LIMIT " & intOffSet & ", " & strPageSize & " "
			End If
			strSql1 = "SELECT COUNT(TOPIC_ID) AS TOPICCOUNT " & _
			"FROM " & strTablePrefix & "TOPICS " & _
			"WHERE T_AUTHOR = " & memID & " AND T_LAST_POST > '" & defDate & "' "
			Set rsCount = my_Conn.Execute(strSql1)
			TopicTotal = rsCount(0).value
			rsCount.Close
			Set rsCount = Nothing
			strSql2 = "SELECT COUNT(DISTINCT R.TOPIC_ID) " & _
			"FROM " & strTablePrefix & "REPLY R " & _
			"LEFT JOIN " & strTablePrefix & "TOPICS T " & _
			"ON R.TOPIC_ID = T.TOPIC_ID " & _
			"WHERE R.R_AUTHOR = " & memID & " AND R.R_AUTHOR <> T.T_AUTHOR " & _
			"AND T.T_LAST_POST > '" & defDate & "' "
			Set rsCount = my_Conn.Execute(strSql2)
			ReplyTotal = rsCount(0).value
			rsCount.Close
			Set rsCount = Nothing
			iPageTotal = TopicTotal + ReplyTotal
			If iPageTotal > 0 Then
				intTotalPosts = iPageTotal
				maxpages = (iPageTotal \ strPageSize )
				If iPageTotal mod strPageSize <> 0 Then
					maxpages = maxpages + 1
				End If
				If iPageTotal < (strPageSize + 1) Then
					intGetRows = iPageTotal
				ElseIf (mypage * strPageSize) > iPageTotal Then
					intGetRows = strPageSize - ((mypage * strPageSize) - iPageTotal)
				Else
					intGetRows = strPageSize
				End If
			Else
				iPageTotal = 0
				intTotalPosts = iPageTotal
				maxpages = 0
			End If 
			If iPageTotal > 0 Then
				Set rs = Server.CreateObject("ADODB.Recordset")
				rs.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
				allTableData = rs.GetRows(intGetRows)
				RowCnt = UBound(allTableData, 2)
				rs.Close
				Set rs = Nothing
			Else
				RowCnt = ""
			End If
		Else '#### end mysql
			Set rs = Server.CreateObject("ADODB.Recordset")
			rs.cachesize = strPageSize
			rs.Open strSql, my_Conn, adOpenStatic
			If not rs.EOF or not rs.BOF Then
				rs.MoveFirst
				rs.pagesize = strPageSize
				intTotalPosts = cLng(rs.recordcount)
				rs.absolutepage = mypage '**
				maxpages = cLng(rs.pagecount)
				allTableData = rs.GetRows(strPageSize)
				RowCnt = UBound(allTableData, 2)
			Else
				RowCnt = ""
				intTotalPosts = 0
			End If
			rs.Close
			Set rs = Nothing
			If intTotalPosts < (strPageSize + 1) Then
				intGetRows = intTotalPosts
			ElseIf (mypage * strPageSize) > intTotalPosts Then
				intGetRows = strPageSize - ((mypage * strPageSize) - intTotalPosts)
			Else
				intGetRows = strPageSize
			End If
		End If
		topicpage = mypage
		If (topicpage <= 1) Then
			TopicRecLow = 1
			TopicRecHigh = intGetRows
		Else
			TopicRecLow = ((topicpage - 1) * strPageSize) + 1
			TopicRecHigh = (topicreclow - 1) + intGetRows
		End If
	Else    '## end paging
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		If rs.EOF or rs.BOF Then
			RowCnt = ""
		Else
			allTableData = rs.GetRows(adGetRowsRest)
			RowCnt = UBound(allTableData,2)
		End If
		rs.Close
		Set rs = Nothing
	End If
	intHeadCnt = uBound(strHeadCell)
	intColSpan = intHeadCnt + 1
End If
'## Begin head table
Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
	"        <tr>" & vbNewLine & _
	"          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"          <a href=""default.asp"">" & getCurrentIcon(strIconFolderOpen,"All Forums","align=""absmiddle""") & "</a> <a href=""default.asp"">All Forums</a><br />" & vbNewLine
getMenu arrFeatures
Response.Write  "          </font></td>" & vbNewLine & _
	"          <td width=""33%"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>"
getHeader intMode,memName,bAdminView
Response.Write  "          <br /><br />" & vbNewLine
getLinks intMode,arrFeatures,arrSwitch       
Response.Write  "</font></td>" & vbNewLine & _
	"          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
getIconLegend
Response.Write  "          <font></td>" & vbNewLine &_
	"        </tr>" & vbNewLine
'## Additional row For posts dropdown boxes
If intMode = 1 Then
	Response.Write	"        <tr>" & vbNewLine & _
		"          <td> </td>" & vbNewLine & _
		"          <td align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine
	Call DropDownDays()
	Response.Write  "          </td>" & vbNewLine & _
		"          <td align=""right"" valign=""bottom"">" & vbNewLine
	If maxpages > 1 Then
		Call DropDownPaging(1)
	Else
		Response.Write  " "
	End If
	Response.Write	"          </td>" & vbNewLine & _
		"        </tr>" & vbNewLine
Else
	Response.Write	"        <tr>" & vbNewLine & _
		"          <td colspan=""3""><span style=""font-size: 6px;""><br /></span></td>" & vbNewLine & _
		"        </tr>" & vbNewLine
End If
Response.Write  "      </table>" & vbNewLine
'## End head table Start content table
If intMode = 0 Then
	Response.Write  "<p align=""center""><font color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """ face=""" & strDefaultFontFace & """>" & chkString(strUSMessage,"preview") & "</font></p>"
Else
	Response.Write  "      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
		"            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
		"              <tr>" & vbNewLine 
	'## Start Table Header
	For iHeadCell = 0 to intHeadCnt
		Select Case iHeadCell
			Case 0
				' Do Nothing
			Case 1
				Response.Write  "                <td colspan=""2"" align=""center"" bgcolor=""" & strHeadCellColor & """>" & strHeadCell(iHeadCell) & "</td>" & vbNewLine
			Case Else      
				Response.Write  "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & strHeadCell(iHeadCell) & "</font></b></td>" & vbNewLine
		End Select
	Next
		'## End Table Header
		Response.Write  "              </tr>" & vbNewLine
		If RowCnt = "" Then
			Response.Write	"              <tr>" & vbNewLine & _
				"                <td colspan=""" & intColSpan & """ bgcolor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """> <br /><b>"
			Select Case intMode
				Case 1
					Response.Write  "You Have No Active Posts."
				Case 2  
					Response.Write  "Your Draft Folder is Empty."
				Case 3
					Response.Write  "Your Bookmark Folder is Empty."
				Case 4
					Response.Write  "Your Friends Folder is Empty."
			End Select
			Response.Write  "</b><br /> </font></td>" & vbNewLine & _
				"              </tr>" & vbNewLine
		Else
			If intMode = 1 Then
				Dim CatArr()
				Dim CatArrCnt
				CatArrCnt = 0
				For iCatCnt = 0 to RowCnt
					CatID = allTableData(6,iCatCnt)
					If CatID <> tmpCnt Then
						ReDim CatArr(CatArrCnt)
						CatArr(CatArrCnt) = CatID
						CatArrCnt = CatArrCnt + 1
					End If
					tmpCnt = CatID
				Next
			End If
			intI = 0
			For iRowCnt = 0 to RowCnt
				If intI = 0 Then 
					CColor = strForumCellColor
				Else
					CColor = strAltForumCellColor
				End If
				Select Case intMode
					Case 1
						Topic_ID = allTableData(0,iRowCnt)
						Topic_Author = allTableData(1,iRowCnt)
						Topic_Subject = allTableData(2,iRowCnt)
						Topic_Status = allTableData(3,iRowCnt)
						Topic_Sticky = allTableData(4,irowCnt)
						Topic_LastPost = allTableData(5,iRowCnt)
						Topic_LastPostAuthor = allTableData(6,iRowCnt)
						Topic_LastPostReplyID = allTableData(7,iRowCnt)
						Topic_Replies = allTableData(8,iRowCnt)
						Topic_UReplies = allTableData(9,iRowCnt)
						Topic_ViewCount = allTableData(10,iRowCnt)
						Cat_ID = allTableData(11,iRowCnt)
						Cat_Status = allTableData(12,iRowCnt)
						Cat_Order = allTableData(13,iRowCnt)
						Cat_Name = allTableData(14,iRowCnt)
						Forum_ID = allTableData(15,iRowCnt)
						Forum_Order = allTableData(16,iRowCnt)
						Forum_Subject = allTableData(17,iRowCnt)
						Forum_Status = allTableData(18,iRowCnt)
						Member_ID = allTableData(19,iRowCnt)
						Member_Name = allTableData(20,iRowCnt)
						Topic_LastPostAuthorName = allTableData(21,iRowCnt)
						strPage = "&whichpage=" & mypage
						Call DoHideCategory("Cat" & Cat_ID & "Forum" & Forum_ID)
						If currForum <> Forum_ID Then
							HideCat = strUniqueID & "Hide" & intMode & "USCat" & Cat_ID & "Forum" & Forum_ID
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td colspan=""2"" bgcolor=""" & strCategoryCellColor & """ valign=""middle""> "
							If Request.Cookies(HideCat) = "Y" Then
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=N" & strPage & """>" & getCurrentIcon(strIconFolder,"Expand this Category","hspace=""0""") & "</a>"
							Else
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=Y" & strPage & """>" & getCurrentIcon(strIconFolderOpenTopic,"Hide this Category","hspace=""0""") & "</a>"
							End If
							Response.Write  "</td>" & vbNewLine & _
								"                <td colspan=""" & intColSpan - 1 & """ bgcolor=""" & strCategoryCellColor & """ valign=""middle""><font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <b><a href=""default.asp?cat_id=" & Cat_ID & """><font color=""" & strCategoryFontColor & """>" & chkString(Cat_Name,"display") & "</font></a> / <a href=""forum.asp?forum_id=" & Forum_ID & """><font color=""" & strCategoryFontColor & """>" & chkString(Forum_Subject,"display") & "</font></a></b></font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
							If i > 0 Then 
								CColor = strForumCellColor
								intI = 0
							End If
						End If
						currForum = Forum_ID
						If mLev > 3 Then
							AdminAllowed = 1
						Else
							AdminAllowed = 0
						End If
						If mLev > 3 Then
							intModerateAllowed = "Y"
						ElseIf mLev = 3 and ModOfForums <> "" Then
							If (strAuthType = "nt") Then
								If (chkForumintModerator(Forum_ID, Session(strCookieURL & "username")) = "1") Then intModerateAllowed = "Y" Else intModerateAllowed = "N"
							Else 
								If (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) Then intModerateAllowed = "Y" Else intModerateAllowed = "N"
							End If
						Else
							intModerateAllowed = "N"
						End If
						If intModerateAllowed = "Y" and Topic_UReplies > 0 Then
							Topic_Replies = Topic_Replies + Topic_UReplies
						End If
						If Request.Cookies(HideCat) <> "Y" Then
							Response.Write	"              <tr>" & vbNewline & _
								"                <td colspan=""2"" bgcolor=""" & strForumCellColor & """ align=""right""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & SearchLink & """>"
							If Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 Then
								If Topic_Sticky and strStickyTopic = "1" Then 
									If Topic_LastPost > Session(strCookieURL & "last_here_date") Then
										Response.Write	getCurrentIcon(strIconFolderNewSticky,"New Sticky Topic","hspace=""0""")
									Else
										Response.Write	getCurrentIcon(strIconFolderSticky,"Sticky Topic","hspace=""0""")
									End If
								Else 
									If Topic_Status = 2 Then
										UnApprovedFound = "Y"
										Response.Write  getCurrentIcon(strIconFolderUnModerated,"Topic UnModerated","hspace=""0""")
									ElseIf Topic_Status = 3 Then
										HeldFound = "Y"
										Response.Write  getCurrentIcon(strIconFolderHold,"Topic Held","hspace=""0""")
									Else
										Response.Write  ChkIsNew(Topic_LastPost)
									End If
								End If
							Else 
								If Cat_Status = 0 Then 
									strAltText = "Category Locked"
								ElseIf Forum_Status = 0 Then 
									strAltText = "Forum Locked"
								Else
									strAltText = "Topic Locked"
								End If 
								Response.Write  getCurrentIcon(strIconFolderLocked,strAltText,"hspace=""0""")
							End If
							Response.Write  "</a></td>" & vbNewLine & _
								"                <td bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
							Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & chkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewLine
							If strShowPaging = "1" Then
								TopicPaging()
							End If
							Response.Write	"                </td>" & vbNewLine & _
								"                <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"">" & Member_Name & "</span></font></td>" & vbNewLine & _
								"                <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine & _
								"                <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_ViewCount & "</font></td>" & vbNewLine
							If IsNull(Topic_LastPostAuthor) Then
								strLastAuthor = ""
							Else
								strLastAuthor = "<br />by: <span class=""spnMessageText"">" & Topic_LastPostAuthorName & "</span>"
								If (strJumpLastPost = "1" and ArchiveView = "") Then strLastAuthor = strLastAuthor & " " & DoLastPostLink
							End If
							Response.Write	"                <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """><b>" & ChkDate(Topic_LastPost, "</b> " ,true) & strLastAuthor & "</font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
						End If
					Case 2
						Cat_ID = allTableData(0,iRowCnt)
						Forum_ID = allTableData(1,iRowCnt)
						Draft_ID = allTableData(2,iRowCnt)
						Topic_ID = allTableData(3,iRowCnt)
						dSubject = allTableData(4,iRowCnt)
						dAuthor = allTableData(5,iRowCnt)
						dDate = allTableData(6,iRowCnt)
						dLastEdit = allTableData(7,iRowCnt)
						mName = allTableData(8,iRowCnt)
						Cat_Name = allTableData(9,iRowCnt)
						Forum_Subject = allTableData(10,iRowCnt)
						If isNull(dLastEdit) = true or Trim(dLastEdit) = "" Then
							strLastEdit = "_____"
							strEditDate = chkDate(dDate,"",false)
						Else
							strLastEdit = chkDate(dLastEdit,"<br />",true)
							strEditDate = chkDate(dLastEdit,"",false)
						End If
						strTrimWarning = ""
						If strUSDraftAutoDeleteSwitch = 1 and strUSDraftAutoDelete <> "" Then
							If DateDiff("d",strEditDate,strForumTimeAdjust) >= (strUSDraftAutoDelete - intDraftWarn) Then
								strTrimWarning = "<font color=""" & strHiLiteFontColor & """><acronym title=""This Draft will be deleted soon"">*</acronym></font>"
							End If
						End If
						strIcon = ""
						strUrl = ""
						If cLng(Topic_ID) = 0 Then
							strIcon = getCurrentIcon(strIconDraftTopic,strDraftTopicTxt,"align=""absmiddle""")
							strUrl = strUrl & "TopicDraft&DRAFT_ID=" & Draft_ID & "&FORUM_ID=" & Forum_ID
						Else
							strIcon = getCurrentIcon(strIconDraftReply,strDraftReplyTxt,"align=""absmiddle""")
							strUrl = strUrl & "ReplyDraft&DRAFT_ID=" & Draft_ID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID
						End If
						Call DoHideCategory("Cat" & Cat_ID & "Forum" & Forum_ID)
						If currForum <> Forum_ID Then
							HideCat = strUniqueID & "Hide" & intMode & "USCat" & Cat_ID & "Forum" & Forum_ID
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td colspan=""2"" bgcolor=""" & strCategoryCellColor & """ valign=""middle""> "
							If Request.Cookies(HideCat) = "Y" Then
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=N"">" & getCurrentIcon(strIconFolderDraftsClosed,"Expand this Category","hspace=""0""") & "</a>"
							Else
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=Y"">" & getCurrentIcon(strIconFolderDraftsOpen,"Hide this Category","hspace=""0""") & "</a>"
							End If
							Response.Write  "</td>" & vbNewLine & _
								"               <td colspan=""" & intColSpan - 1 & """ bgcolor=""" & strCategoryCellColor & """ valign=""middle""><font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <b><a href=""default.asp?cat_id=" & Cat_ID & """><font color=""" & strCategoryFontColor & """>" & chkString(Cat_Name,"display") & "</font></a> / <a href=""forum.asp?forum_id=" & Forum_ID & """><font color=""" & strCategoryFontColor & """>" & chkString(Forum_Subject,"display") & "</font></a></b></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
							If i > 0 Then 
								CColor = strForumCellColor
								intI = 0
							End If
						End If
						currForum = Forum_ID
						If Request.Cookies(HideCat) <> "Y" Then
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td align=""right"" bgcolor=""" & CColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strIcon & "</font></td>" & vbNewLine & _
								"                <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strTrimWarning & "<a href=""post.asp?method=" & strUrl & " """
							If strTrimWarning <> "" Then Response.Write  " title=""This draft will be deleted soon."""
							Response.Write  ">" & chkString(dSubject,"title") & "</a>" & strTrimWarning & "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>"
							If cLng(Topic_ID) > 0 Then
								Response.Write  "<a href=""topic.asp?Topic_ID=" & Topic_ID & """><font color=""" & strDefaultFontColor & """>Go to Topic</font></a>"
							Else
								Response.Write  "_____________"
							End If
							Response.Write  "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>" & chkDate(dDate,"<br />",true) & "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>" & strLastEdit & "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""JavaScript:openWindow5('pop_user_space.asp?mode=draft&draft_id=" & Draft_ID & memLink & "')"">" & getCurrentIcon(strIconTrashcan,"Delete this Bookmark","align=""absmiddle""") & "</a></font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
						End If
					Case 3
						'BOOKMARK_ID, B_URL, B_TITLE, B_CAT, M_NAME
						Bookmark_ID = allTableData(0,iRowCnt)
						Bookmark_Url = allTableData(1,iRowCnt)
						Bookmark_Title = allTableData(2,iRowCnt)
						Bookmark_Cat = allTableData(3,iRowCnt)
						Bookmark_Date = allTableData(4,iRowCnt)
						Bookmark_Name = allTableData(5,iRowCnt)
						If ChkIsRecent(Bookmark_Date) Then 
							BookMark_Icon = getCurrentIcon(strIconFavorites,strBookmarkNewTxt,"hspace=""0""")
						Else
							BookMark_Icon = getCurrentIcon(strIconFavoritesOld,strBookmarkOldTxt,"hspace=""0""")
						End If
						Call DoHideCategory(Bookmark_Cat)
						If currForum <> Bookmark_Cat Then
							HideCat = strUniqueID & "Hide" & intMode & "US" & Bookmark_Cat
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td colspan=""2"" bgcolor=""" & strCategoryCellColor & """ valign=""middle""> "
							If Request.Cookies(HideCat) = "Y" Then
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=N"">" & getCurrentIcon(strIconFolderFavoritesClosed,"Expand this Category","hspace=""0""") & "</a>"
							Else
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=Y"">" & getCurrentIcon(strIconFolderFavoritesOpen,"Hide this Category","hspace=""0""") & "</a>"
							End If
							Response.Write  "</td>" & vbNewLine & _
								"                <td colspan=""" & intColSpan - 1 & """ bgcolor=""" & strCategoryCellColor & """ valign=""middle""><font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <b>" & chkString(Bookmark_Cat,"display") & "</b></font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
							If i > 0 Then 
								CColor = strForumCellColor
								intI = 0
							End If
						End If
						currForum = Bookmark_Cat
						If Request.Cookies(HideCat) <> "Y" Then
							Response.Write  "              <form>" & vbNewLine & _
								"              <tr>" & vbNewLine & _
								"                <td align=""right"" bgcolor=""" & CColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & Bookmark_Icon & "</font></td>" & vbNewLine & _
								"                <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""" & chkString(Bookmark_Url,"display") & """ target=""_blank"">" & chkString(Bookmark_Title,"title") & "</a></font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><button type=""button"" onClick=""javascript:this.form.a" & i & ".focus();this.form.a" & i & ".select();"" style=Background-color:" & CColor & ";""><font size=""" & strFooterFontSize & """>Select</font></button>  <input type=""text"" size=""50"" value=""" & Bookmark_Url & """ style=""border-left:1px solid black; border-top:1px solid black; border-right:0px; border-bottom:0px; background-color:" & cColor & ";"" name=""a" & i & """ readonly /></font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>" & chkDate(Bookmark_Date,"<br />",true) & "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """><a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=delete&id=" & Bookmark_ID & memLink & "')"">" & getCurrentIcon(strIconTrashcan,"Delete this Bookmark","align=""absmiddle""") & "</a></font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine & _
								"              </form>" & vbNewLine
						End If
					Case 4
						F_ID = allTableData(0,iRowCnt)
						F_MemberID = allTableData(1,iRowCnt)
						F_FriendID = allTableData(2,iRowCnt)
						F_Level = allTableData(3,iRowCnt)
						F_Date = allTableData(4,iRowCnt)
						F_MemberName = allTableData(5,iRowCnt)
						F_FriendStatus = allTableData(6,iRowCnt)
						F_FriendLevel = allTableData(7,iRowCnt)
						F_FriendName = allTableData(8,iRowCnt)
						F_FriendTitle = allTableData(9,iRowCnt)
						F_FriendPosts = allTableData(10,iRowCnt)
						F_FriendDate = allTableData(11,iRowCnt)
						F_FriendEmail = allTableData(12,iRowCnt)
						F_FriendCountry = allTableData(13,iRowCnt)
						F_FriendHomepage = allTableData(14,iRowCnt)
						F_FriendLastPostDate = allTableData(15,iRowCnt)
						F_FriendLevel = allTableData(16,iRowCnt)
						F_FriendAIM = allTableData(17,iRowCnt)
						F_FriendICQ = allTableData(18,iRowCnt)
						F_FriendMSN = allTableData(19,iRowCnt)
						F_FriendYAHOO = allTableData(20,iRowCnt)
						'# use constants For categories
						Select Case cLng(F_Level)
							Case 0
								strLevel = strFriendLev1
							Case 1
								strLevel = strFriendLev2
							Case 2
								strLevel = strFriendLev3
						End Select
						If chkIsRecent(F_Date) Then
							Friend_Icon = getCurrentIcon(strIconFriendNew,strFriendNewTxt,"hspace=""0""")
						Else
							Friend_Icon = getCurrentIcon(strIconFriend,strFriendOldTxt,"hspace=""0""")
						End If
						Call DoHideCategory(F_Level)
						If currForum <>  strLevel Then
							HideCat = strUniqueID & "Hide" & intMode & "US" & F_Level
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td colspan=""2"" bgcolor=""" & strCategoryCellColor & """ valign=""middle""> "
							If Request.Cookies(HideCat) = "Y" Then
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=N"">" & getCurrentIcon(strIconFolderFriendsClosed,"Expand this Category","hspace=""0""") & "</a>"
							Else
								Response.Write  "<a href=""" & ScriptName & "?mode=" & intMode & "&" & HideCat & "=Y"">" & getCurrentIcon(strIconFolderFriendsOpen,"Hide this Category","hspace=""0""") & "</a>"
							End If
							Response.Write  "</td>" & vbNewLine & _
								"                <td colspan=""" & intColSpan - 1 & """ bgcolor=""" & strCategoryCellColor & """ valign=""middle""><font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <b>" & chkString(strLevel,"display") & "</b></font></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
							If i > 0 Then 
								CColor = strForumCellColor
								intI = 0
							End If
						End If
						currForum = strLevel
						If Request.Cookies(HideCat) <> "Y" Then
							Response.Write  "              <tr>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """ colspan=""2"">" 
							If strUseExtendedProfile Then
								Response.Write	"                <span class=""spnMessageText""><a href=""pop_profile.asp?mode=display&id=" & F_FriendID & """ title=""View " & ChkString(F_FriendName,"display") & "'s Profile""" & dWStatus("View " & ChkString(F_FriendName,"display") & "'s Profile") & ">"
							Else
								Response.Write	"                <span class=""spnMessageText""><a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & F_FriendID & "')"" title=""View " & ChkString(F_FriendName,"display") & "'s Profile""" & dWStatus("View " & ChkString(F_FriendName,"display") & "'s Profile") & ">"
							End If
							Response.Write  Friend_Icon & "</a></span></td>" & vbNewLine & _
								"                <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>"
							If strUseExtendedProfile Then
								Response.Write	"                <span class=""spnMessageText""><a href=""pop_profile.asp?mode=display&id=" & F_FriendID & """ title=""View " & ChkString(F_FriendName,"display") & "'s Profile""" & dWStatus("View " & ChkString(F_FriendName,"display") & "'s Profile") & ">"
							Else
								Response.Write	"                <span class=""spnMessageText""><a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & F_FriendID & "')"" title=""View " & ChkString(F_FriendName,"display") & "'s Profile""" & dWStatus("View " & ChkString(F_FriendName,"display") & "'s Profile") & ">"
							End If
							Response.Write  ChkString(F_FriendName,"display") & "</a></span></font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>"
							If strShowRank = 1 or strShowRank = 3 Then
								Response.Write	"                <small>" & ChkString(getMember_Level(F_FriendTitle, F_FriendLevel, f_FriendPosts),"display") & "</small>" & vbNewLine
							End If
							If strShowRank = 2 or strShowRank = 3 Then
								Response.Write	"                <br />" & getStar_Level(F_FriendLevel, F_FriendPosts) & vbNewLine
							End If
							Response.Write  " (" & F_FriendPosts & ")</font></td>" & vbNewLine & _
								"                <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
								"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""3"""),F_FriendID) & vbNewLine
							If mLev > 2 or F_FriendReceiveEmail = "1" Then
								If (mLev <> 0) or (mLev = 0 and  strLogonForMail <> "1") Then
									Response.Write	"                       <a href=""JavaScript:openWindow('pop_mail.asp?id=" & F_FriendID & "')"">" & getCurrentIcon(strIconEmail,"Email Poster","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
								End If
							End If
							If strHomepage = "1" Then
								If F_FriendHomepage <> " " Then
									Response.Write	"                       <a href=""" & F_FriendHomepage & """ target=""_blank"">" & getCurrentIcon(strIconHomepage,"Visit " & ChkString(F_FriendName,"display") & "'s Homepage","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
								End If
							End If
							If (strAIM = "1") Then
								If Trim(F_FriendAIM) <> "" Then
									Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=AIM&ID=" & F_FriendID & "')"">" & getCurrentIcon(strIconAIM,"Send " & ChkString(F_FriendName,"display") & " an AOL message","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
								End If
							End If
							If strICQ = "1" Then
								If Trim(F_FriendICQ) <> "" Then
									Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ID=" & F_FriendID & "')"">" & getCurrentIcon(strIconICQ,"Send " & ChkString(F_FriendName,"display") & " an ICQ Message","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
								End If
							End If
							If (strMSN = "1") Then
								If Trim(F_FriendMSN) <> "" Then
									Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=MSN&ID=" & F_FriendID & "')"">" & getCurrentIcon(strIconMSNM,"Click to see " & ChkString(F_FriendName,"display") & "'s MSN Messenger address","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
								End If
							End If
							If strYAHOO = "1" Then
								If Trim(F_FriendYAHOO) <> "" Then
									Response.Write	"                       <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Reply_MemberYAHOO, "urlpath") & "&.src=pg"" target=""_blank"">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(F_FriendName,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
								End If
							End If
							Response.Write  "                </font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & chkDate(F_Date,"<br />",false) & "</font></td>" & vbNewLine & _
								"                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>"
							If IsNull(F_FriendLastPostDate) or Trim(F_FriendLastPostDate) = "" Then
								Response.Write  "-"
							Else
								Response.Write  ChkDate(F_FriendLastPostDate,"<br />",true)
							End If
							Response.Write  "</font</td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & chkDate(F_FriendDate,"<br />",false) & "</font></td>" & vbNewLine & _
								"                <td align=""center"" bgcolor=""" & CColor & """><a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&action=delete&id=" & F_ID & memLink & "')"">" & getCurrentIcon(strIconTrashcan,"Remove This Friend","align=""absmiddle""") & "</a></td>" & vbNewLine & _
								"              </tr>" & vbNewLine
						End If
					Case Else
						'
				End Select
				intI  = 1 - intI
			Next
		End If
		Response.Write  "      </table>" & vbNewLine & _
			"    </td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
		'# End Content table Start prefoot table
		Response.Write  "<table border=""0"" width=""100%"" align=""center"">" & vbNewLine
		If intMode = 1 and maxpages > 1 Then 
			Response.Write  "  <tr>" & vbNewLine & _
				"    <td colspan=""3"" align=""left"">" & vbNewLine & _
				"      <table>" & vbNewLine & _
				"        <tr>" & vbNewLine
			call DropDownPaging(2)
			Response.Write  "         </tr>" & vbNewLine & _
				"       </table>" & vbNewLine & _
				"     </td>" & vbNewLine & _
				"   </tr>" & vbNewLine
		End If
		Response.Write  "  <tr>" & vbNewLine & _
			"    <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
		getIconLegend
		Response.Write  "    <font></td>" & vbNewLine & _
			"    <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & _
			"     </font></td>" & vbNewLine & _
			"    <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & _
			"     </font></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine & _
			"<br />" & vbNewLine
End If
'# End prefoot Start Footer
WriteFooter
'# End Footer Start Functions and Subs
Function chkFeature(strVar)
	Dim iValue
	If Trim(strVar) <> "" Then
		iValue = cLng(strVar)
	Else
		iValue = 0               '## Does not exist
	End If 
	chkFeature = iValue
End Function

Function chkAdminView(iMem)
	Dim bTmp
	bTmp = false
	If Trim(iMem) <> "" and isNumeric(iMem) = true Then
		If mLev = 4 Then
			bTmp = true
		End If
	End If
	chkAdminView = bTmp
End Function

Function ChkIsRecent(eDate)
	Dim blnDate
	blnDate = false
	If DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew Then blnDate = true
	ChkIsRecent = blnDate
End Function

Function DoLastPostLink()
	If Topic_Replies < 1 or Topic_LastPostReplyID = 0 Then
		DoLastPostLink = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & SearchLink & """>" & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & "</a>"
	ElseIf Topic_LastPostReplyID <> 0 Then
		PageLink = "whichpage=-1&"
		AnchorLink = "&REPLY_ID="
		DoLastPostLink = "<a href=""topic.asp?" & ArchiveLink & PageLink & "TOPIC_ID=" & Topic_ID & SearchLink & AnchorLink & Topic_LastPostReplyID & """>" & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & "</a>"
	Else
		DoLastPostLink = ""
	End If
End Function

Sub chkVariables(arrVar,iMode)
	Dim iRow, lCnt, uCnt, fCnt, tmpCnt 
	lCnt = lBound(arrVar,2) 
	uCnt = uBound(arrVar,2)
	fCnt = uCnt
	tmpCnt = 0
	ReDim arrSwitch(uCnt-1)   'declared at top of page
	For iRow = lCnt to uCnt
		fMode =     arrVar(0,iRow)
		fVariable = arrVar(1,iRow)
		fText =     arrVar(2,iRow)
		If iRow <> 0 Then 
			If Trim(fVariable) = "" or cLng(fVariable) = 0 Then 
				tmpCnt = tmpCnt + 1
				arrSwitch(iRow-1) = 0
			Else
				arrSwitch(iRow-1) = 1
			End If
		End If
		If fMode = iMode Then
			If Trim(fVariable) = "" Then       'Does not exist
				If mLev = 4 Then
					getMsg fText & " setting could not be detected.<br />Check the database."
				Else
					Response.Redirect "default.asp"
				End If
			ElseIf cLng(fVariable) = 0 Then     'Turn off
				If mLev > 2 Then
					getMsg "Admin has " & fText & " turned off."
				Else
					Response.Redirect "default.asp"
				End If
			Else
				' Do Nothing
			End If
		Else
			'# do Nothing
		End If
	Next
	If fCnt = tmpCnt Then
		If mLev > 2 Then
			getMsg "All User Space features have been turned off by Admin."
		Else
			Response.Redirect "default.asp"
		End If
	End If
End Sub

Sub getMenuBranch(arrVar,iMode)
	Dim iCnt,i
	iCnt = 0
	For i = cLng(iMode) to uBound(arrVar)  'uBound(arrVar,2)
		If arrVar(i) = 1 Then
			iCnt = iCnt + 1
		End If
	Next
	If iCnt > 0 Then 
		Response.Write  "          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""")
		If iCnt = 1 Then
			Response.Write  getCurrentIcon(strIconBar,"","align=""absmiddle""")
		Else
			Response.Write  getCurrentIcon(strIconBranch,"","align=""absmiddle""")
		End If
	End If
End Sub

Sub getHeader(iMode,mName,bAdmin)
	Dim sIcon,sMsg,sTxt,sLink
	sIcon = ""
	sMsg = ""
	If bAdmin Then
		sTxt = mName & "'s"
	Else
		sTxt = ""
	End If
	sLink = ""
	'tMsg = arrFeatures(2,iMode)
	'tIcon = arrFeatures(5,iMode)
	sIcon = getCurrentIcon(arrFeatures(5,iMode),"","align=""absmiddle"" hspace=""6""")
	sMsg = sTxt & arrFeatures(2,iMode) 
	If bAdmin Then Response.Write  "<font color=""" & strHiLiteFontColor & """><b>Only a Forum Admin or the Space Owner<br />can view this page.<b></font><br /><br />"
	If sMsg <> "" Then Response.Write  "<font size=""" & strHeaderFontSize & """>" & sIcon & " " & sMsg & sLink & "</font>"
End Sub

Sub getIconLegend()
	Select Case intMode
		Case 1
			Response.Write  "         " & getCurrentIcon(strIconFolderNew,"New Posts","align=""absmiddle""") & " New posts since last logon.<br />" & getCurrentIcon(strIconFolder,"Old Posts","align=""absmiddle""") & " Old Posts."
			If lCase(strHotTopic) = "1" Then Response.Write	(" (" & getCurrentIcon(strIconFolderHot,"Hot Topic","align=""absmiddle""") & " " & intHotTopicNum & " replies or more.)<br />")
			Response.Write	"" & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />"
			' DEM --> Start of Code added For moderation
			If HeldFound = "Y" Then
				Response.Write "" & getCurrentIcon(strIconFolderHold,"Held Topic","align=""absmiddle""") & " Held Topic.<br />"
			End If
			If UnapprovedFound = "Y" Then
				Response.Write "" & getCurrentIcon(strIconFolderUnmoderated,"UnModerated Topic","align=""absmiddle""") & " UnModerated Topic.<br />" & vbNewLine
			End If
		Case 2
			Response.Write  "           " & getCurrentIcon(strIconDraftTopic,strDraftTopicTxt,"align=""absmiddle""") & " " & strDraftTopicTxt & "<br /> " & getCurrentIcon(strIconDraftReply,strDraftReplyTxt,"align=""absmiddle""") & " " & strDraftReplyTxt & vbNewLine 
		Case 3
			Response.Write  "           " & getCurrentIcon(strIconFavorites,strBookmarkNewTxt,"align=""absmiddle""") & " " & strBookmarkNewTxt & "<br /> " & getCurrentIcon(strIconFavoritesOld,strBookmarkOldTxt,"align=""absmiddle""") & " " & strBookmarkOldTxt & vbNewLine
		Case 4
			Response.Write  "           " & getCurrentIcon(strIconFriendNew,strFriendNewTxt,"align=""absmiddle""") & " " & strFriendNewTxt & "<br /> " & getCurrentIcon(strIconFriend,strFriendOldTxt,"align=""absmiddle""") & " " & strFriendOldTxt & vbNewLine 
	End Select
End Sub

Sub TopicPaging()                              '## Post specific
	mxpages = (Topic_Replies / strPageSize)
	If mxPages <> cLng(mxPages) Then
		mxpages = int(mxpages) + 1
	End If
	If mxpages > 1 Then
		Response.Write("                  <table border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine)
		Response.Write("                    <tr>" & vbNewLine)
		Response.Write("                      <td valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","") & "</font></td>" & vbNewLine)
		For counter = 1 to mxpages
			ref = "                      <td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
			If ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) Then
				ref = ref & " "
			End If		
			ref = ref & widenum(counter) & "<span class=""spnMessageText""><a href=""topic.asp?"
			ref = ref & ArchiveLink
			ref = ref & "TOPIC_ID=" & Topic_ID
			ref = ref & "&whichpage=" & counter
			ref = ref & SearchLink
			ref = ref & """>" & counter & "</a></span></font></td>"
			Response.Write ref & vbNewLine
			If counter mod strPageNumberSize = 0 Then
				Response.Write  "                    </tr>" & vbNewLine & _
					"                    <tr>" & vbNewLine & _
					"                      <td> </td>" & vbNewLine
			End If
		Next				
		Response.Write  "                    </tr>" & vbNewLine & _
			"                  </table>" & vbNewLine
	End If
End Sub

Sub DropDownDays()
	Dim aDays,iOption,iHiCnt,strTxt
	aDays = array(14,30,60,120,365)
	iHiCnt = uBound(aDays)
	strTxt = ""
	Response.Write  "            <form action=""" & Request.ServerVariables("SCRIPT_NAME") & "?" & ChkString(Request.Querystring,"sqlstring") & """ method=""post"" name=""DaysFilter"">" & vbNewLine & _
		"             <font size=""" & strFooterFontSize & """><b>"
	If intTotalPosts = 0 Then
		Response.Write("No Topics Found")
	ElseIf TopicRecLow = TopicRecHigh Then
		Response.Write("Showing topic " & TopicRecLow & " of " & intTotalPosts)
	Else
		Response.Write("Showing topics " & TopicRecLow & " - " & TopicRecHigh & " of " & intTotalPosts)
	End If
	Response.Write  "              </b></font>" & vbNewLine & _
		"              <select name=""Days"" onchange=""javascript:setDays();"">" & vbNewLine & _
		"          	<option value=""1""" & chkSelect(ndays,1) & ">Show topics from last day</option>" & vbNewLine & _
		"          	<option value=""2""" & chkSelect(ndays,2) & ">Show topics from last 2 days</option>" & vbNewLine & _
		"          	<option value=""5""" & chkSelect(ndays,5) & ">Show topics from last 5 days</option>" & vbNewLine & _
		"          	<option value=""7""" & chkSelect(ndays,7) & ">Show topics from last 7 days</option>" & vbNewLine
	For iOption = 0 to iHiCnt
		If iOption < iHiCnt Then strTxt = aDays(iOption) & " days" Else strTxt = "year"
		If cLng(strUSPostMaxSwitch) = 1 and mLev < 3 Then
			If cLng(strUSPostMax) >= aDays(iOption) Then
				Response.Write  "          	<option value=""" & aDays(iOption) & """" & chkSelect(ndays,aDays(iOption)) & ">Show topics from last " & strTxt & "</option>" & vbNewLine
			End If
		Else
			Response.Write  "          	<option value=""" & aDays(iOption) & """" & chkSelect(ndays,aDays(iOption)) & ">Show topics from last " & strTxt & "</option>" & vbNewLine
		End If
	Next
	Response.Write  "              </select>" & vbNewLine & _
		"              <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
		"            </form>" & vbNewLine
End Sub

Sub DropDownPaging(fnum)    '## Post specific - For now        
	If maxpages > 1 Then
		If mypage = "" Then
			pge = 1
		Else
			pge = mypage
		End If
		scriptname = request.servervariables("script_name")
		Response.Write	"                <form name=""PageNum" & fnum & """ action=""user_space.asp"">" & vbNewLine & _
			"                <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
			"                <input name=""mode"" type=""hidden"" value=""" & intMode & """>" & vbNewLine
		If bAdminView = true Then Response.Write  "                <input name=""memid"" type=""hidden"" value=""" & memID & """>" & vbNewLine
		If ArchiveView = "true" Then Response.Write "                <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine
		If fnum = 1 Then
			Response.Write("                <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
		Else
			Response.Write("                <b>There are " & maxpages & " Pages of Topics: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
		End If
		For counter = 1 to maxpages
			If counter <> cLng(pge) Then   
				Response.Write "                	<option value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			Else
				Response.Write "                	<option selected value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			End If
		Next
		If fnum = 1 Then
			Response.Write "                </select><b> of " & maxPages & "</b>" & vbNewLine
		Else
			Response.Write "                </select>" & vbNewLine
		End If
		Response.Write "                </font></td>" & vbNewLine & _
			"                </form>" & vbNewLine
	End If
End Sub

Sub getMsg(msg)
	Response.Write  "<p align=""center""><font color=""" & strHiliteFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>" & msg & "</b></font></p><br />" & vbNewLine
	WriteFooter
	Response.End
End Sub

Sub DoHideCategory(strCat)
	HideCat = strUniqueID & "Hide" & intMode & "US" & strCat
	If Request.QueryString(HideCat) = "Y" Then
		Response.Cookies(HideCat) = "Y"
		Response.Cookies(HideCat).Expires = dateAdd("d", 30, strForumTimeAdjust)
	Else
		If Request.QueryString(HideCat) = "N" Then
			Response.Cookies(HideCat) = "N"
			Response.Cookies(HideCat).Expires = dateadd("d", -2, strForumTimeAdjust)
		End If
	End If
End Sub

Sub AutoDelete(dID)         '## Draft specific
	strSql = "SELECT DRAFT_ID, D_DATE, D_LAST_EDIT " & _
	"FROM " & strTablePrefix & "DRAFTS " & _
	"WHERE D_AUTHOR = " & Did & ""
	Set rsDelete = Server.CreateObject("ADODB.Recordset")
	rsDelete.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
	If rsDelete.EOF or rsDelete.BOF Then
		DraftCnt = ""
	Else
		alldData = rsDelete.GetRows(adGetRowsRest)
		DraftCnt = UBound(alldData,2)
	End If
	rsDelete.Close
	Set rsDelete = Nothing
	If DraftCnt <> "" Then
		For iDelete = 0 to DraftCnt
			dDraftID =  alldData(0,iDelete)
			dDate =     alldData(1,iDelete)
			dLastEdit = alldData(2,iDelete)
			If isNull(dLastEdit) or dLastEdit = "" Then
				strDelTime = StrToDate(dDate)
			Else
				strDelTime = StrToDate(dLastEdit)
			End If
			If DateDiff("d", strDelTime, strForumTimeAdjust) > cLng(strUSDraftAutoDelete) Then
				strDeleteSql = "DELETE FROM " & strTablePrefix & "DRAFTS " & _
				"WHERE DRAFT_ID = " & dDraftID & " AND D_AUTHOR = " & dID
				my_Conn.Execute (strDeleteSql),,adCmdText + adExecuteNoRecords
			End If
		Next
	End If
End Sub

Sub getMenu(aFeature)
	Dim iCnt, iCnt1
	Dim lCnt : lCnt = lBound(aFeature,2)
	Dim lCnt1 : lCnt1 = lCnt + 1
	Dim uCnt : uCnt = uBound(aFeature,2)
	Response.Write  "          " & getCurrentIcon(strIconBar,"","align=""absmiddle""")
	For iCnt = lCnt to uCnt
		tMode = aFeature(0,iCnt)
		tTxt = aFeature(2,iCnt)
		tIconClosed = aFeature(3,iCnt)
		tIconOpen = aFeature(4,iCnt)
		If iCnt = lCnt Then
			If intMode > 0 or Trim(Request.Querystring("folder")) = "open" Then
				Response.Write  "<a href=""user_space.asp?mode=" & iCnt & memLink & """>" & getCurrentIcon(tIconOpen,tTxt,"align=""absmiddle""") & "</a> <a href=""user_space.asp?mode=" & iCnt & memLink & """>" & chkString(memName,"display") & "s Space</a><br />" & vbNewLine
				getMenuBranch arrSwitch,tMode
				For iCnt1 = lCnt1 to uCnt
					fMode = aFeature(0,iCnt1)
					fSwitch = aFeature(1,iCnt1)
					fTxt = aFeature(2,iCnt1)
					fIconClosed = aFeature(3,iCnt1)
					fIconOpen = aFeature(4,iCnt1)
					If fSwitch = 1 Then 
						If intMode = fMode Then
							Response.Write  getCurrentIcon(fIconOpen,"","align=""absmiddle""") & " <b>" & fTxt & "</b><br />" & vbNewLine
						Else
							Response.Write  "<a href=""user_space.asp?mode=" & fMode & memLink & """>" & getCurrentIcon(fIconClosed,"Open " & fTxt & " Folder","align=""absmiddle""") & "</a> <a href=""user_space.asp?mode=" & fMode & memLink & """ title=""Open " & fTxt & " Folder"">" & fTxt & "</a><br />" & vbNewLine
						End If
						getMenuBranch arrSwitch,fMode
					End If
				Next
			Else
				Response.Write  "<a href=""user_space.asp?mode=" & tMode & memLink & "&folder=open"">" & getCurrentIcon(tIconClosed,tTxt,"align=""absmiddle""") & "</a> <a href=""user_space.asp?mode=" & iCnt & memLink & "&folder=open"">" & chkString(memName,"display") & "s Space</a><br />" & vbNewLine
			End If
		End If
		exit for
	Next
End Sub

Sub getLinks(iMode,aFeature,aSwitch)
	Select Case iMode
		Case 0
			Dim lCnt,uCnt,mCnt,i,fTxt,fIcon
			lCnt = lBound(aSwitch)
			uCnt = uBound(aSwitch)
			mCnt = lCnt + 1
			For i = lCnt to uCnt
				fTxt = aFeature(2,mCnt)
				fIcon = aFeature(5,mCnt)
				If arrSwitch(i) Then
					Response.Write  "  <a href=""user_space.asp?mode=" & mCnt & memLink & """>" & getCurrentIcon(fIcon,"View Your " & fTxt & " Folder","align=""absmiddle""") & "</a> <a href=""user_space.asp?mode=" & mCnt & memLink & """ title=""Your " & fTxt & """><font color=""" & strDefaultFontColor & """><b>" & fTxt & "</b></font></a>" 
				End If
				mCnt = mCnt + 1
			Next
		Case 1
			'# No Links
		Case 2
			'# Autodelete Message
			If strUSDraftAutoDeleteSwitch = 1 and strUSDraftAutoDelete <> "" Then
				Response.Write  strDraftTxt & " are deleted after " & strUSDraftAutoDelete & " days of inactivity."
			End If
		Case 3
			'# Add a bookmark link
			Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=url')"">" & getCurrentIcon(strIconFavorites,"Add " & strBookmarkTxt,"align=""absmiddle""") & "</a> <a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=url')""><font color=""" & strDefaultFontColor & """>Add " & strBookmarkTxt & "</font></a>" & vbNewLine
		Case 4
			'# no Link
	End Select
End Sub
%>

<script language="JavaScript" type="text/javascript">
<!-----
	function ChangePage(fnum){
		if (fnum == 1) {
			document.PageNum1.Submit();
			}
		else {
			document.PageNum2.Submit();
			}
		}
	function setDays() {document.DaysFilter.Submit(); return 0;}
// -->
</script>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 12 January 2015 :  00:34:37  Show Profile

Carefree, I just got home after being gone for 3 and 1/2 months. . .and, boy am I TIRED!

I'm afraid to try this until my brain rests a bit. (lol)

I'll let you know when I get to it. Thank you so much in advance!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.69 seconds. Powered By: Snitz Forums 2000 Version 3.4.07