Author |
Topic |
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 17 January 2014 : 02:29:55
|
I did the addon for the "Poll Mod" here that hides the results of polls until the polls are closed.
I'm not sure if it affected the active_polls.asp but polls that are still active are not displaying as active.
Some polls that have been set to last for a week or longer are not displaying as active.
Is there something that could be added to allow them to be displayed as being active?
|
"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 |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 17 January 2014 : 07:58:28
|
Same exact issue you were experiencing with "active.asp", your "activesince" value isn't being read from the cookie. The hide result sub-mod has no effect on the "active_polls.asp" file. |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 17 January 2014 : 15:45:15
|
So, you could make my active_polls.asp work like you did my active.asp. . .if it's not too much trouble? But, I think I would want it to display the polls from the last 7 days. Couldn't that work?
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'
' This allows all Members to View all Active Polls in the past 30 Days
' instead of poking around the forum looking for them all.
'
' Original script by: Dayve
' Modified and upgraded by: Davio
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
nDays = Request.Cookies(strCookieURL & "PollDays")
if Request.form("cookie") = 1 then
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "PollDays").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "PollDays") = Request.Form("PollDays")
Response.Cookies(strCookieURL & "PollDays").expires = strForumTimeAdjust + 365
nDays = Request.Form("PollDays")
end if
if nDays = "" then
nDays = "-1"
end if
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
if Request.form("cookie") = "2" then
ActiveSince = Request.Form("PollDays")
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
if nDays = "-1" then
defDate = Session(strCookieURL & "last_here_date")
else
defDate = DateToStr(DateAdd("d", -(nDays), strForumTimeAdjust))
end if
if mlev = 3 then
strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _
" WHERE MEMBER_ID = " & MemberID
Set rsMod = Server.CreateObject("ADODB.Recordset")
rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsMod.EOF then
recModCount = ""
else
allModData = rsMod.GetRows(adGetRowsRest)
recModCount = UBound(allModData,2)
end if
RsMod.close
set RsMod = nothing
if recModCount <> "" then
for x = 0 to recModCount
if x = 0 then
ModOfForums = allModData(0,x)
else
ModOfForums = ModOfForums & "," & allModData(0,x)
end if
next
else
ModOfForums = ""
end if
else
ModOfForums = ""
end if
'## Forum_SQL - Get all active polls
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, F.FORUM_ID, F.F_SUBJECT, F.F_STATUS, T.TOPIC_ID, " &_
"T.T_SUBJECT, T.T_STATUS, T.T_AUTHOR, T.T_REPLIES, M.M_NAME, P.P_LASTVOTE, P.P_WHOVOTES "
For nCount = 1 To 15
strSql = strSql & ", P.ANSWER" & CStr(nCount)
strSql = strSql & ", P.COUNT" & CStr(nCount)
Next
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F, " &_
strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "POLLS P " &_
"WHERE C.CAT_ID = T.CAT_ID AND F.FORUM_ID = T.FORUM_ID AND P.TOPIC_ID = T.TOPIC_ID " &_
"AND M.MEMBER_ID = T.T_AUTHOR AND T.T_ISPOLL = 1 AND T.T_POLLSTATUS = 1"
if nDays > "0" or nDays = "-1" then
strSql = strSql & " AND (P.P_LASTVOTE > '" & defDate & "' OR T.T_DATE > '" & defDate & "')"
end if
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, P.P_LASTVOTE DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
if strDBType <> "mysql" then rs.cachesize = 50
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rs.EOF then
recActivePollsCount = ""
else
allActivePolls = rs.GetRows(adGetRowsRest)
recActivePollsCount = UBound(allActivePolls,2)
end if
rs.close
set rs = nothing
Response.Write "<script language=""JavaScript"">" & vbNewLine & _
"<!--" & vbNewLine & _
"function setDays() {document.PollFilter.submit(); return 0;}" & vbNewLine & _
"function jumpTo(s) {if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;}" & vbNewLine & _
"// -->" & vbNewLine & _
"</script>" & vbNewLine & _
"<table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><form action=""active_polls.asp"" method=""post"" name=""PollFilter"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen, "", "") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar, "", "") & getCurrentIcon(strIconFolderOpen, "", "") & " Active Polls" & vbNewLine & _
" <select name=""PollDays"" onchange=""javascript:setDays();"">" & vbNewLine & _
" <option value=""-1"" " & chkSelect(ndays,-1) & ">Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"),"",true) & "</option>" & vbNewLine & _
" <option value=""1"" " & chkSelect(ndays,1) & ">From yesterday</option>" & vbNewLine & _
" <option value=""7"" " & chkSelect(ndays,7) & ">From last 7 days</option>" & vbNewLine & _
" <option value=""14"" " & chkSelect(ndays,14) & ">From last 14 days</option>" & vbNewLine & _
" <option value=""30"" " & chkSelect(ndays,30) & ">From last 30 days</option>" & vbNewLine & _
" <option value=""60"" " & chkSelect(ndays,60) & ">From last 60 days</option>" & vbNewLine & _
" <option value=""120"" " & chkSelect(ndays,120) & ">From last 120 days</option>" & vbNewLine & _
" <option value=""365"" " & chkSelect(ndays,365) & ">From last year</option>" & vbNewLine & _
" <option value=""0"" " & chkSelect(ndays,0) & ">All Polls</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
" </font></form></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
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 & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""center""> </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Poll</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Replies</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Total Votes</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Vote</font></b></td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
if recActivePollsCount = "" then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""7"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Polls Found</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
else
currForum = 0
fDisplayCount = 0
aCount = 0
for Rowcount = 0 to recActivePollsCount
Cat_ID = allActivePolls(0,Rowcount)
Cat_Name = allActivePolls(1,Rowcount)
Cat_Status = allActivePolls(2,Rowcount)
Forum_ID = allActivePolls(3,Rowcount)
Forum_Subject = allActivePolls(4,Rowcount)
Forum_Status = allActivePolls(5,Rowcount)
Topic_ID = allActivePolls(6,Rowcount)
Topic_Subject = allActivePolls(7,Rowcount)
Topic_Status = allActivePolls(8,Rowcount)
Topic_Author = allActivePolls(9,Rowcount)
Topic_Replies = allActivePolls(10,Rowcount)
Member_Name = allActivePolls(11,Rowcount)
Last_Vote = allActivePolls(12,Rowcount)
Who_Votes = allActivePolls(13,Rowcount)
nCount = 14
For i = 1 to 15
vAnswers(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
vCount(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
Next
if chkForumAccess(Forum_ID, MemberID, false) then
if mLev = 4 then
ModerateAllowed = "Y"
elseif mLev = 3 and ModOfForums <> "" then
if (strAuthType = "nt") then
if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N"
else
if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) then ModerateAllowed = "Y" else ModerateAllowed = "N"
end if
else
ModerateAllowed = "N"
end if
fDisplayCount = fDisplayCount + 1
if currForum <> Forum_ID then
Response.Write " <tr>" & vbNewLine & _
" <td height=""20"" colspan=""6"" bgcolor=""" & strCategoryCellColor & """ valign=""middle"" ><a href=""forum.asp?FORUM_ID=" & Forum_ID & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""default.asp?CAT_ID=" & Cat_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Cat_Name,"display") & "</b></font></a> / <a href=""forum.asp?FORUM_ID=" & Forum_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Forum_Subject,"display") & "</b></font></a>" & vbNewLine & _
" </td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""center"">" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
call ForumAdminOptions
else
if Cat_Status <> 0 and Forum_Status <> 0 then
ForumMemberOptions
else
Response.Write " " & vbNewLine
end if
end if
Response.Write " </td>" & vbNewline
elseif (mLev = 3) then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle""> </td>" & vbNewline
end if
Response.Write " </tr>" & vbNewLine
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""center"">" & vbNewLine
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
if lcase(strHotTopic) = "1" then
if Topic_Replies >= intHotTopicNum then
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNewHot, "Hot Topic", "hspace=""0""") & "</a>" & vbNewLine 'hspace="0"
else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNew, "View Poll", "") & "</a>" & vbNewLine
end if
end if
else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>"
if Cat_Status = 0 then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Category Locked", "")
elseif Forum_Status = 0 then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Forum Locked", "")
else
Response.Write getCurrentIcon(strIconFolderNewLocked, "Poll Locked", "")
end if
Response.Write "</a>"
end if
'Go through all and get total
nTotal = 0
For nCount = 1 To 15
If trim(vAnswers(nCount)) <> "" Then
nTotal = nTotal + vCount(nCount)
End If
Next
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & chkString(left(Topic_Subject, 50),"display") & "</a> </font>" & vbNewLine
if Who_Votes = "members" then
Response.write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>(members only)</font>" & vbNewLine
end if
if strShowPaging = "1" then TopicPaging()
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & chkString(Member_Name,"display") & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & nTotal & "</font></td>"& vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>"
if cint(nTotal) > 0 then Response.Write(chkDate(Last_Vote, " ", true)) else Response.Write("Never")
Response.Write "</b></font></td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
call TopicAdminOptions
else
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
call TopicMemberOptions
else
Response.Write " " & vbNewline
end if
end if
elseif (mLev = 3) then
Response.Write "<td bgcolor=""" & strForumCellColor & """> </td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
end if
currForum = Forum_ID
next
if fDisplayCount = 0 then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""6"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Topics Found</b></font></td>" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strForumCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
end if
end if
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table width=""100%"" border=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" width=""50%"">" & vbNewline & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderNew,"New Posts","align=""absmiddle""") & " New posts since last logon.<br />" & vbNewLine & _
" " & 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 />" & vbNewLine)
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine
' DEM --> Start of Code added for moderation
if HeldFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderHold,"Held Topic","align=""absmiddle""") & " Held Topic.<br />" & vbNewline
end if
if UnapprovedFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderUnmoderated,"UnModerated Topic","align=""absmiddle""") & " UnModerated Topic.<br />" & vbNewline
end if
' DEM --> End of Code added for moderation
Response.Write " </font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""right"" valign=""top"" width=""50%"" nowrap>" & vbNewLine
%><!--#INCLUDE FILE="inc_jump_to.asp" --><%
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
WriteFooter
Response.End
sub ForumAdminOptions()
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
if Cat_Status = 0 then
if mlev = 4 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Category","") & "</a>" & vbNewline
else
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Category Locked","") & vbNewline
end if
else
if Forum_Status <> 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderLocked,"Lock Forum","") & "</a>" & vbNewline
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Forum","") & "</a>" & vbNewline
end if
end if
if (Cat_Status <> 0 and Forum_Status <> 0) or (ModerateAllowed = "Y") then
Response.Write " <a href=""post.asp?method=EditForum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "&type=0"">" & getCurrentIcon(strIconFolderPencil,"Edit Forum Properties","hspace=""0""") & "</a>" & vbNewline
end if
if mLev = 4 or lcase(strNoCookies) = "1" then Response.Write(" <a href=""JavaScript:openWindow('pop_delete.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderDelete,"Delete Forum","") & "</a>" & vbNewLine)
Response.Write " <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Poll","") & "</a>" & vbNewLine
end if
end sub
sub ForumMemberOptions()
if (mlev > 0) then
Response.Write " <a href=""post.asp?method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Topic","") & "</a>" & vbNewLine
' DEM --> Start of Code added to handle subscription processing.
if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and strEmail = 1 then
if InArray(strForumSubs, Forum_ID) then
Response.Write ShowSubLink ("U", Cat_ID, Forum_ID, 0, "N")
elseif strBoardSubs <> "Y" and not(InArray(strCatSubs,Cat_ID)) then
Response.Write ShowSubLink ("S", Cat_ID, Forum_ID, 0, "N")
end if
end if
end if
end sub
sub TopicAdminOptions()
if Cat_Status = 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Category","hspace=""0""") & "</a>" & vbNewLine
elseif Forum_Status = 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Forum","hspace=""0""") & "</a>" & vbNewLine
elseif Topic_Status <> 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconLock,"Lock Topic","hspace=""0""") & "</a>" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (ModerateAllowed = "Y") or (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&auth=" & Topic_Author & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
end if
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
if Topic_Status <= 1 then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
end if
' DEM --> Start of Code for Full Moderation
if Topic_Status > 1 then
TopicString = "TOPIC_ID=" & Topic_ID & "&CAT_ID=" & Cat_ID & "&FORUM_ID=" & Forum_ID
Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject this Topic","hspace=""0""") & "</a>" & vbNewline
end if
' DEM --> End of Code for Full Moderation
' DEM --> Start of Code added to handle subscription processing.
if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then
if InArray(strTopicSubs, Topic_ID) then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
end if
end if
' DEM --> End of code added to handle subscription processing.
end sub
sub TopicMemberOptions()
if (Topic_Status > 0 and Topic_Author = MemberID) or (ModerateAllowed = "Y") then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (Topic_Status > 0 and Topic_Author = MemberID and Topic_Replies = 0) or (ModerateAllowed = "Y") then
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if Topic_Status <= 1 then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then
if InArray(strTopicSubs, Topic_ID) then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
end if
end if
' DEM --> End of code added to handle subscription processing.
end sub
sub TopicPaging()
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 & _
" <tr>" & vbNewLine & _
" <td valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","align=""absmiddle""") & "</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 & """>" & counter & "</a></span></font></td>"
Response.Write ref & vbNewLine
if counter mod strPageNumberSize = 0 and counter < mxpages then
Response.Write(" </tr>" & vbNewLine)
Response.Write(" <tr>" & vbNewLine)
Response.Write(" <td> </td>" & vbNewLine)
end if
next
Response.Write(" </tr>" & vbNewLine)
Response.Write(" </table>" & vbNewLine)
end if
end sub
%>
|
"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 17 January 2014 15:46:27 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 17 January 2014 : 16:07:25
|
Yes, it'll work. Try this:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'
' This allows all Members to View all Active Polls in the past 30 Days
' instead of poking around the forum looking for them all.
'
' Original script by: Dayve
' Modified and upgraded by: Davio
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
nDays = Request.Cookies(strCookieURL & "PollDays")
if Request.form("cookie") = 1 then
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "PollDays").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "PollDays") = Request.Form("PollDays")
Response.Cookies(strCookieURL & "PollDays").expires = strForumTimeAdjust + 365
nDays = Request.Form("PollDays")
end if
if nDays = "" then
nDays = "-7"
end if
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
if Request.form("cookie") = "2" then
ActiveSince = Request.Form("PollDays")
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
if nDays = "-1" then
defDate = DateToStr(DateAdd("d", -(nDays), strForumTimeAdjust))
else
defDate = DateToStr(DateAdd("d", -(nDays), strForumTimeAdjust))
end if
if mlev = 3 then
strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _
" WHERE MEMBER_ID = " & MemberID
Set rsMod = Server.CreateObject("ADODB.Recordset")
rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsMod.EOF then
recModCount = ""
else
allModData = rsMod.GetRows(adGetRowsRest)
recModCount = UBound(allModData,2)
end if
RsMod.close
set RsMod = nothing
if recModCount <> "" then
for x = 0 to recModCount
if x = 0 then
ModOfForums = allModData(0,x)
else
ModOfForums = ModOfForums & "," & allModData(0,x)
end if
next
else
ModOfForums = ""
end if
else
ModOfForums = ""
end if
'## Forum_SQL - Get all active polls
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, F.FORUM_ID, F.F_SUBJECT, F.F_STATUS, T.TOPIC_ID, " &_
"T.T_SUBJECT, T.T_STATUS, T.T_AUTHOR, T.T_REPLIES, M.M_NAME, P.P_LASTVOTE, P.P_WHOVOTES "
For nCount = 1 To 15
strSql = strSql & ", P.ANSWER" & CStr(nCount)
strSql = strSql & ", P.COUNT" & CStr(nCount)
Next
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F, " &_
strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "POLLS P " &_
"WHERE C.CAT_ID = T.CAT_ID AND F.FORUM_ID = T.FORUM_ID AND P.TOPIC_ID = T.TOPIC_ID " &_
"AND M.MEMBER_ID = T.T_AUTHOR AND T.T_ISPOLL = 1 AND T.T_POLLSTATUS = 1"
if nDays > "0" or nDays = "-1" then
strSql = strSql & " AND (P.P_LASTVOTE > '" & defDate & "' OR T.T_DATE > '" & defDate & "')"
end if
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, P.P_LASTVOTE DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
if strDBType <> "mysql" then rs.cachesize = 50
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rs.EOF then
recActivePollsCount = ""
else
allActivePolls = rs.GetRows(adGetRowsRest)
recActivePollsCount = UBound(allActivePolls,2)
end if
rs.close
set rs = nothing
Response.Write "<script language=""JavaScript"">" & vbNewLine & _
"<!--" & vbNewLine & _
"function setDays() {document.PollFilter.submit(); return 0;}" & vbNewLine & _
"function jumpTo(s) {if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;}" & vbNewLine & _
"// -->" & vbNewLine & _
"</script>" & vbNewLine & _
"<table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><form action=""active_polls.asp"" method=""post"" name=""PollFilter"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen, "", "") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar, "", "") & getCurrentIcon(strIconFolderOpen, "", "") & " Active Polls" & vbNewLine & _
" <select name=""PollDays"" onchange=""javascript:setDays();"">" & vbNewLine & _
" <option value=""-1"" " & chkSelect(ndays,-1) & ">Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"),"",true) & "</option>" & vbNewLine & _
" <option value=""1"" " & chkSelect(ndays,1) & ">From yesterday</option>" & vbNewLine & _
" <option value=""7"" " & chkSelect(ndays,7) & ">From last 7 days</option>" & vbNewLine & _
" <option value=""14"" " & chkSelect(ndays,14) & ">From last 14 days</option>" & vbNewLine & _
" <option value=""30"" " & chkSelect(ndays,30) & ">From last 30 days</option>" & vbNewLine & _
" <option value=""60"" " & chkSelect(ndays,60) & ">From last 60 days</option>" & vbNewLine & _
" <option value=""120"" " & chkSelect(ndays,120) & ">From last 120 days</option>" & vbNewLine & _
" <option value=""365"" " & chkSelect(ndays,365) & ">From last year</option>" & vbNewLine & _
" <option value=""0"" " & chkSelect(ndays,0) & ">All Polls</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
" </font></form></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
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 & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""center""> </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Poll</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Replies</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Total Votes</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Vote</font></b></td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
if recActivePollsCount = "" then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""7"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Polls Found</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
else
currForum = 0
fDisplayCount = 0
aCount = 0
for Rowcount = 0 to recActivePollsCount
Cat_ID = allActivePolls(0,Rowcount)
Cat_Name = allActivePolls(1,Rowcount)
Cat_Status = allActivePolls(2,Rowcount)
Forum_ID = allActivePolls(3,Rowcount)
Forum_Subject = allActivePolls(4,Rowcount)
Forum_Status = allActivePolls(5,Rowcount)
Topic_ID = allActivePolls(6,Rowcount)
Topic_Subject = allActivePolls(7,Rowcount)
Topic_Status = allActivePolls(8,Rowcount)
Topic_Author = allActivePolls(9,Rowcount)
Topic_Replies = allActivePolls(10,Rowcount)
Member_Name = allActivePolls(11,Rowcount)
Last_Vote = allActivePolls(12,Rowcount)
Who_Votes = allActivePolls(13,Rowcount)
nCount = 14
For i = 1 to 15
vAnswers(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
vCount(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
Next
if chkForumAccess(Forum_ID, MemberID, false) then
if mLev = 4 then
ModerateAllowed = "Y"
elseif mLev = 3 and ModOfForums <> "" then
if (strAuthType = "nt") then
if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N"
else
if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) then ModerateAllowed = "Y" else ModerateAllowed = "N"
end if
else
ModerateAllowed = "N"
end if
fDisplayCount = fDisplayCount + 1
if currForum <> Forum_ID then
Response.Write " <tr>" & vbNewLine & _
" <td height=""20"" colspan=""6"" bgcolor=""" & strCategoryCellColor & """ valign=""middle"" ><a href=""forum.asp?FORUM_ID=" & Forum_ID & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""default.asp?CAT_ID=" & Cat_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Cat_Name,"display") & "</b></font></a> / <a href=""forum.asp?FORUM_ID=" & Forum_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Forum_Subject,"display") & "</b></font></a>" & vbNewLine & _
" </td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""center"">" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
call ForumAdminOptions
else
if Cat_Status <> 0 and Forum_Status <> 0 then
ForumMemberOptions
else
Response.Write " " & vbNewLine
end if
end if
Response.Write " </td>" & vbNewline
elseif (mLev = 3) then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle""> </td>" & vbNewline
end if
Response.Write " </tr>" & vbNewLine
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""center"">" & vbNewLine
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
if lcase(strHotTopic) = "1" then
if Topic_Replies >= intHotTopicNum then
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNewHot, "Hot Topic", "hspace=""0""") & "</a>" & vbNewLine 'hspace="0"
else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNew, "View Poll", "") & "</a>" & vbNewLine
end if
end if
else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>"
if Cat_Status = 0 then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Category Locked", "")
elseif Forum_Status = 0 then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Forum Locked", "")
else
Response.Write getCurrentIcon(strIconFolderNewLocked, "Poll Locked", "")
end if
Response.Write "</a>"
end if
'Go through all and get total
nTotal = 0
For nCount = 1 To 15
If trim(vAnswers(nCount)) <> "" Then
nTotal = nTotal + vCount(nCount)
End If
Next
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & chkString(left(Topic_Subject, 50),"display") & "</a> </font>" & vbNewLine
if Who_Votes = "members" then
Response.write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>(members only)</font>" & vbNewLine
end if
if strShowPaging = "1" then TopicPaging()
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & chkString(Member_Name,"display") & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & nTotal & "</font></td>"& vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>"
if cint(nTotal) > 0 then Response.Write(chkDate(Last_Vote, " ", true)) else Response.Write("Never")
Response.Write "</b></font></td>" & vbNewLine
if (mLev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
call TopicAdminOptions
else
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
call TopicMemberOptions
else
Response.Write " " & vbNewline
end if
end if
elseif (mLev = 3) then
Response.Write "<td bgcolor=""" & strForumCellColor & """> </td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
end if
currForum = Forum_ID
next
if fDisplayCount = 0 then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""6"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Topics Found</b></font></td>" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strForumCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
end if
end if
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table width=""100%"" border=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" width=""50%"">" & vbNewline & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderNew,"New Posts","align=""absmiddle""") & " New posts since last logon.<br />" & vbNewLine & _
" " & 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 />" & vbNewLine)
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine
' DEM --> Start of Code added for moderation
if HeldFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderHold,"Held Topic","align=""absmiddle""") & " Held Topic.<br />" & vbNewline
end if
if UnapprovedFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderUnmoderated,"UnModerated Topic","align=""absmiddle""") & " UnModerated Topic.<br />" & vbNewline
end if
' DEM --> End of Code added for moderation
Response.Write " </font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""right"" valign=""top"" width=""50%"" nowrap>" & vbNewLine
%><!--#INCLUDE FILE="inc_jump_to.asp" --><%
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
WriteFooter
Response.End
sub ForumAdminOptions()
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
if Cat_Status = 0 then
if mlev = 4 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Category","") & "</a>" & vbNewline
else
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Category Locked","") & vbNewline
end if
else
if Forum_Status <> 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderLocked,"Lock Forum","") & "</a>" & vbNewline
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Forum","") & "</a>" & vbNewline
end if
end if
if (Cat_Status <> 0 and Forum_Status <> 0) or (ModerateAllowed = "Y") then
Response.Write " <a href=""post.asp?method=EditForum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "&type=0"">" & getCurrentIcon(strIconFolderPencil,"Edit Forum Properties","hspace=""0""") & "</a>" & vbNewline
end if
if mLev = 4 or lcase(strNoCookies) = "1" then Response.Write(" <a href=""JavaScript:openWindow('pop_delete.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderDelete,"Delete Forum","") & "</a>" & vbNewLine)
Response.Write " <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Poll","") & "</a>" & vbNewLine
end if
end sub
sub ForumMemberOptions()
if (mlev > 0) then
Response.Write " <a href=""post.asp?method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Topic","") & "</a>" & vbNewLine
' DEM --> Start of Code added to handle subscription processing.
if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and strEmail = 1 then
if InArray(strForumSubs, Forum_ID) then
Response.Write ShowSubLink ("U", Cat_ID, Forum_ID, 0, "N")
elseif strBoardSubs <> "Y" and not(InArray(strCatSubs,Cat_ID)) then
Response.Write ShowSubLink ("S", Cat_ID, Forum_ID, 0, "N")
end if
end if
end if
end sub
sub TopicAdminOptions()
if Cat_Status = 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Category","hspace=""0""") & "</a>" & vbNewLine
elseif Forum_Status = 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Forum","hspace=""0""") & "</a>" & vbNewLine
elseif Topic_Status <> 0 then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconLock,"Lock Topic","hspace=""0""") & "</a>" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (ModerateAllowed = "Y") or (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&auth=" & Topic_Author & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
end if
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
if Topic_Status <= 1 then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
end if
' DEM --> Start of Code for Full Moderation
if Topic_Status > 1 then
TopicString = "TOPIC_ID=" & Topic_ID & "&CAT_ID=" & Cat_ID & "&FORUM_ID=" & Forum_ID
Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject this Topic","hspace=""0""") & "</a>" & vbNewline
end if
' DEM --> End of Code for Full Moderation
' DEM --> Start of Code added to handle subscription processing.
if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then
if InArray(strTopicSubs, Topic_ID) then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
end if
end if
' DEM --> End of code added to handle subscription processing.
end sub
sub TopicMemberOptions()
if (Topic_Status > 0 and Topic_Author = MemberID) or (ModerateAllowed = "Y") then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (Topic_Status > 0 and Topic_Author = MemberID and Topic_Replies = 0) or (ModerateAllowed = "Y") then
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if Topic_Status <= 1 then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
end if
if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then
if InArray(strTopicSubs, Topic_ID) then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
end if
end if
' DEM --> End of code added to handle subscription processing.
end sub
sub TopicPaging()
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 & _
" <tr>" & vbNewLine & _
" <td valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","align=""absmiddle""") & "</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 & """>" & counter & "</a></span></font></td>"
Response.Write ref & vbNewLine
if counter mod strPageNumberSize = 0 and counter < mxpages then
Response.Write(" </tr>" & vbNewLine)
Response.Write(" <tr>" & vbNewLine)
Response.Write(" <td> </td>" & vbNewLine)
end if
next
Response.Write(" </tr>" & vbNewLine)
Response.Write(" </table>" & vbNewLine)
end if
end sub
%>
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 17 January 2014 : 20:22:45
|
I think this displayed all of the polls, Carefree.
The oldest poll I have was dated December 30, 2013 and it's displaying that one, too.
We've started doing polls around the last of December so I only have about 10. The second oldest poll that is displaying is dated January 9 so it appears to be displaying all of them.
I logged out and back in a few times and deleted my cookies but it's still doing the same thing. |
"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 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 18 January 2014 : 08:40:42
|
I did some cleaning to make it easier for my old brain to follow. This looks like it solved your issue:
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-14 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'
' This allows all Members to View all Active Polls in the past 30 Days
' instead of poking around the forum looking for them all.
'
' Original script by: Dayve
' Modified and upgraded by: Davio
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
nDays = Request.Cookies(strCookieURL & "PollDays")
If Request.Form("Cookie") = 1 Then
If strSetCookieToForum = "1" Then
Response.Cookies(strCookieURL & "PollDays").Path = strCookieURL
End If
Response.Cookies(strCookieURL & "PollDays") = Request.Form("PollDays")
Response.Cookies(strCookieURL & "PollDays").Expires = strForumTimeAdjust + 365
nDays = Request.Form("PollDays")
End If
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
If Request.Form("Cookie") = "2" Then
ActiveSince = Request.Form("PollDays")
If strSetCookieToForum = 1 Then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
End If
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
End If
If IsEmpty(Session(strCookieURL & "last_here_date")) Then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
End If
If nDays = "-1" or nDays="" Then
nDays=7
defDate = DateToStr(DateAdd("d", -7, strForumTimeAdjust))
Else
defDate = DateToStr(DateAdd("d", -(nDays), strForumTimeAdjust))
End If
If mlev = 3 Then
strSql = "Select FORUM_ID FROM " & strTablePrefix & "MODERATOR WHERE MEMBER_ID = " & MemberID
Set rsMod = Server.CreateObject("ADODB.Recordset")
rsMod.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
If rsMod.EOF Then
recModCount = ""
Else
allModData = rsMod.GetRows(adGetRowsRest)
recModCount = UBound(allModData,2)
RsMod.Close
End If
Set RsMod = Nothing
If recModCount <> "" Then
For x = 0 to recModCount
If x = 0 Then
ModOfForums = allModData(0,x)
Else
ModOfForums = ModOfForums & "," & allModData(0,x)
End If
Next
Else
ModOfForums = ""
End If
Else
ModOfForums = ""
End If
strSql = "Select C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, F.FORUM_ID, F.F_SUBJECT, F.F_STATUS, T.TOPIC_ID, " &_
"T.T_SUBJECT, T.T_STATUS, T.T_AUTHOR, T.T_REPLIES, M.M_NAME, P.P_LASTVOTE, P.P_WHOVOTES "
For nCount = 1 To 15
strSql = strSql & ", P.ANSWER" & CStr(nCount)
strSql = strSql & ", P.COUNT" & CStr(nCount)
Next
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F, " &_
strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "POLLS P " &_
"WHERE C.CAT_ID = T.CAT_ID AND F.FORUM_ID = T.FORUM_ID AND P.TOPIC_ID = T.TOPIC_ID " &_
"AND M.MEMBER_ID = T.T_AUTHOR AND T.T_ISPOLL = 1 AND T.T_POLLSTATUS = 1"
If nDays > "0" or nDays = "-1" Then
strSql = strSql & " AND (P.P_LASTVOTE > '" & defDate & "' OR T.T_DATE > '" & defDate & "')"
End If
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, P.P_LASTVOTE DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
If strDBType <> "mysql" Then rs.cachesize = 50
rs.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
If rs.EOF Then
recActivePollsCount = ""
Else
allActivePolls = rs.GetRows(adGetRowsRest)
recActivePollsCount = UBound(allActivePolls,2)
rs.Close
End If
Set rs = Nothing
Response.Write "<script language=""JavaScript"">" & vbNewLine & _
"<!--" & vbNewLine & _
"function setDays() {document.PollFilter.submit(); return 0;}" & vbNewLine & _
"function jumpTo(s) {if (s.SelectedIndex != 0) top.location.href = s.options[s.SelectedIndex].value;return 1;}" & vbNewLine & _
"// -->" & vbNewLine & _
"</script>" & vbNewLine & _
"<table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><form action=""active_polls.asp"" method=""post"" name=""PollFilter"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen, "", "") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar, "", "") & getCurrentIcon(strIconFolderOpen, "", "") & " Active Polls" & vbNewLine & _
" <Select name=""PollDays"" onchange=""javascript:setDays();"">" & vbNewLine & _
" <Option value=""-1"" " & chkSelect(ndays,-1) & ">Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"),"",true) & "</option>" & vbNewLine & _
" <Option value=""1"" " & chkSelect(ndays,1) & ">From yesterday</option>" & vbNewLine & _
" <Option value=""7"" " & chkSelect(ndays,7) & ">From last 7 days</option>" & vbNewLine & _
" <Option value=""14"" " & chkSelect(ndays,14) & ">From last 14 days</option>" & vbNewLine & _
" <Option value=""30"" " & chkSelect(ndays,30) & ">From last 30 days</option>" & vbNewLine & _
" <Option value=""60"" " & chkSelect(ndays,60) & ">From last 60 days</option>" & vbNewLine & _
" <Option value=""120"" " & chkSelect(ndays,120) & ">From last 120 days</option>" & vbNewLine & _
" <Option value=""365"" " & chkSelect(ndays,365) & ">From last year</option>" & vbNewLine & _
" <Option value=""0"" " & chkSelect(ndays,0) & ">All Polls</option>" & vbNewLine & _
" </Select>" & vbNewLine & _
" <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
" </font></form></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<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 & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""center""> </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Poll</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Replies</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Total Votes</font></b></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Vote</font></b></td>" & vbNewLine
If (mLev > 0) or (lcase(strNoCookies) = "1") Then
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
End If
Response.Write " </tr>" & vbNewLine
If recActivePollsCount = "" Then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""7"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Polls Found</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
Else
currForum = 0
fDisplayCount = 0
aCount = 0
For Rowcount = 0 to recActivePollsCount
Cat_ID = allActivePolls(0,Rowcount)
Cat_Name = allActivePolls(1,Rowcount)
Cat_Status = allActivePolls(2,Rowcount)
Forum_ID = allActivePolls(3,Rowcount)
Forum_Subject = allActivePolls(4,Rowcount)
Forum_Status = allActivePolls(5,Rowcount)
Topic_ID = allActivePolls(6,Rowcount)
Topic_Subject = allActivePolls(7,Rowcount)
Topic_Status = allActivePolls(8,Rowcount)
Topic_Author = allActivePolls(9,Rowcount)
Topic_Replies = allActivePolls(10,Rowcount)
Member_Name = allActivePolls(11,Rowcount)
Last_Vote = allActivePolls(12,Rowcount)
Who_Votes = allActivePolls(13,Rowcount)
nCount = 14
For i = 1 to 15
vAnswers(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
vCount(i) = allActivePolls(nCount,Rowcount)
nCount = nCount + 1
Next
If chkForumAccess(Forum_ID, MemberID, False) Then
If mLev > 3 Then
ModerateAllowed = "Y"
ElseIf mLev = 3 and ModOfForums <> "" Then
If (strAuthType = "nt") Then
If (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") Then ModerateAllowed = "Y" Else ModerateAllowed = "N"
Else
If (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) Then ModerateAllowed = "Y" Else ModerateAllowed = "N"
End If
Else
ModerateAllowed = "N"
End If
fDisplayCount = fDisplayCount + 1
If currForum <> Forum_ID Then
Response.Write " <tr>" & vbNewLine & _
" <td height=""20"" colspan=""6"" bgcolor=""" & strCategoryCellColor & """ valign=""middle"" ><a href=""forum.asp?FORUM_ID=" & Forum_ID & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""default.asp?CAT_ID=" & Cat_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Cat_Name,"display") & "</b></font></a> / <a href=""forum.asp?FORUM_ID=" & Forum_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Forum_Subject,"display") & "</b></font></a>" & vbNewLine & _
" </td>" & vbNewLine
If (mLev > 0) or (lcase(strNoCookies) = "1") Then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""center"">" & vbNewLine
If (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") Then
Call ForumAdminOptions
Else
If Cat_Status <> 0 and Forum_Status <> 0 Then
ForumMemberOptions
Else
Response.Write " " & vbNewLine
End If
End If
Response.Write " </td>" & vbNewline
ElseIf (mLev > 2) Then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle""> </td>" & vbNewline
End If
Response.Write " </tr>" & vbNewLine
End If
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""center"">" & vbNewLine
If Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 Then
If lcase(strHotTopic) = "1" Then
If Topic_Replies >= intHotTopicNum Then
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNewHot, "Hot Topic", "hspace=""0""") & "</a>" & vbNewLine 'hspace="0"
Else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderNew, "View Poll", "") & "</a>" & vbNewLine
End If
End If
Else
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>"
If Cat_Status = 0 Then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Category Locked", "")
ElseIf Forum_Status = 0 Then
Response.Write getCurrentIcon(strIconFolderNewLocked, "Forum Locked", "")
Else
Response.Write getCurrentIcon(strIconFolderNewLocked, "Poll Locked", "")
End If
Response.Write "</a>"
End If
nTotal = 0
For nCount = 1 To 15
If trim(vAnswers(nCount)) <> "" Then
nTotal = nTotal + vCount(nCount)
End If
Next
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & chkString(left(Topic_Subject, 50),"display") & "</a> </font>" & vbNewLine
If Who_Votes = "members" Then
Response.write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>(members only)</font>" & vbNewLine
End If
If strShowPaging = "1" Then TopicPaging()
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & chkString(Member_Name,"display") & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & nTotal & "</font></td>"& vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>"
If cint(nTotal) > 0 Then Response.Write(chkDate(Last_Vote, " ", true)) Else Response.Write("Never")
Response.Write "</b></font></td>" & vbNewLine
If (mLev > 0) or (lcase(strNoCookies) = "1") Then
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
If (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") Then
Call TopicAdminOptions
Else
If Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 Then
Call TopicMemberOptions
Else
Response.Write " " & vbNewline
End If
End If
ElseIf (mLev = 3) Then
Response.Write "<td bgcolor=""" & strForumCellColor & """> </td>" & vbNewLine
End If
Response.Write " </tr>" & vbNewLine
End If
currForum = Forum_ID
Next
If fDisplayCount = 0 Then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""6"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Active Topics Found</b></font></td>" & vbNewLine
If (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") Then
Response.Write " <td align=""center"" bgcolor=""" & strForumCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
End If
End If
End If
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table width=""100%"" border=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" width=""50%"">" & vbNewline & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderNew,"New Posts","align=""absmiddle""") & " New posts since last logon.<br />" & vbNewLine & _
" " & 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 />" & vbNewLine)
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine
If HeldFound = "Y" Then
Response.Write " " & getCurrentIcon(strIconFolderHold,"Held Topic","align=""absmiddle""") & " Held Topic.<br />" & vbNewline
End If
If UnapprovedFound = "Y" Then
Response.Write " " & getCurrentIcon(strIconFolderUnmoderated,"UnModerated Topic","align=""absmiddle""") & " UnModerated Topic.<br />" & vbNewline
End If
Response.Write " </font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""right"" valign=""top"" width=""50%"" nowrap>" & vbNewLine
%>
<!--#INCLUDE FILE="inc_jump_to.asp" -->
<%
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
WriteFooter
Sub ForumAdminOptions()
If (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") Then
If Cat_Status = 0 Then
If mLev > 3 Then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Category","") & "</a>" & vbNewline
Else
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Category Locked","") & vbNewline
End If
Else
If Forum_Status <> 0 Then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderLocked,"Lock Forum","") & "</a>" & vbNewline
Else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Forum","") & "</a>" & vbNewline
End If
End If
If (Cat_Status <> 0 and Forum_Status <> 0) or (ModerateAllowed = "Y") Then
Response.Write " <a href=""post.asp?method=EditForum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "&type=0"">" & getCurrentIcon(strIconFolderPencil,"Edit Forum Properties","hspace=""0""") & "</a>" & vbNewline
End If
If mLev > 3 or lcase(strNoCookies) = "1" Then Response.Write(" <a href=""JavaScript:openWindow('pop_delete.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderDelete,"Delete Forum","") & "</a>" & vbNewLine)
Response.Write " <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Poll","") & "</a>" & vbNewLine
End If
End Sub
Sub ForumMemberOptions()
If (mLev > 0) Then
Response.Write " <a href=""post.asp?method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Topic","") & "</a>" & vbNewLine
If (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and strEmail = 1 Then
If InArray(strForumSubs, Forum_ID) Then
Response.Write ShowSubLink ("U", Cat_ID, Forum_ID, 0, "N")
ElseIf strBoardSubs <> "Y" and not(InArray(strCatSubs,Cat_ID)) Then
Response.Write ShowSubLink ("S", Cat_ID, Forum_ID, 0, "N")
End If
End If
End If
End Sub
Sub TopicAdminOptions()
If Cat_Status = 0 Then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Category","hspace=""0""") & "</a>" & vbNewLine
ElseIf Forum_Status = 0 Then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Forum","hspace=""0""") & "</a>" & vbNewLine
ElseIf Topic_Status <> 0 Then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconLock,"Lock Topic","hspace=""0""") & "</a>" & vbNewLine
Else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconUnlock,"Un-Lock Topic","hspace=""0""") & "</a>" & vbNewLine
End If
If (ModerateAllowed = "Y") or (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) Then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&auth=" & Topic_Author & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
End If
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
If Topic_Status <= 1 Then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
End If
If Topic_Status > 1 Then
TopicString = "TOPIC_ID=" & Topic_ID & "&CAT_ID=" & Cat_ID & "&FORUM_ID=" & Forum_ID
Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject this Topic","hspace=""0""") & "</a>" & vbNewline
End If
If (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 Then
If InArray(strTopicSubs, Topic_ID) Then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
ElseIf strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) Then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
End If
End If
End Sub
Sub TopicMemberOptions()
If (Topic_Status > 0 and Topic_Author = MemberID) or (ModerateAllowed = "Y") Then
Response.Write " <a href=""post.asp?poll=1&method=EditTopic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
End If
If (Topic_Status > 0 and Topic_Author = MemberID and Topic_Replies = 0) or (ModerateAllowed = "Y") Then
Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?poll=1&mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconTrashcan,"Delete Topic","hspace=""0""") & "</a>" & vbNewLine
End If
If Topic_Status <= 1 Then
Response.Write " <a href=""post.asp?method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","hspace=""0""") & "</a>" & vbNewLine
End If
If (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 Then
If InArray(strTopicSubs, Topic_ID) Then
Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N")
ElseIf strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) Then
Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N")
End If
End If
End Sub
Sub TopicPaging()
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 & _
" <tr>" & vbNewLine & _
" <td valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","align=""absmiddle""") & "</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 & """>" & counter & "</a></span></font></td>"
Response.Write ref & vbNewLine
If counter mod strPageNumberSize = 0 and counter < mxpages Then
Response.Write " </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td> </td>"
End If
Next
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine
End If
End Sub
%>
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 18 January 2014 : 23:41:33
|
Yes, it's PERFECT!
Members were having difficulty finding them.
Thank you so much, Carefree!!
|
"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 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 19 January 2014 : 00:22:32
|
You're welcome. |
|
|
|
Topic |
|
|
|