Davio, I'd like to make a suggestion. I was thinking for the active_polls.asp page we might not want to have locked polls included since they're not really "active".
I made this change to my active_polls.asp page:
around line 101:
'## 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"
if nDays > 0 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"
replace with:
'## 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 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"
Just my opinion/suggestion. This should be done on the admin_polls.asp page as well (unless you want a locked poll to be your featured poll).
If you (or everyone else) disagree with me, you could always add a little note to the active polls page (like how it says "members only"). Let me know if you want me to whip up the code for that.<