<% '################################################################################# '## Ver.3.4.07 multi-language Skin3D Portal V2 '################################################################################# '## Copyright (C) 2001-07 Gaëtan Dupont All Rights Reserved '## '## By using this program, you are agreeing to the terms of the '## GNU General Public License. '## '## 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 ImageForums2001 must remain intact '## in the scripts and in the outputted HTML. '## The "Image Forums 2001" text with a link back to '## http://www.forums2001.ca in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## Support can be obtained from support forums at: '## http://www.forums2001.ca '## '## Email: image_forum_2001@hotmail.com '## '################################################################################# '## This Page Contains source code of Snitz Forums 2000 '################################################################################# '## Snitz Forums 2000 v3.4.07 '################################################################################# '## 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 '## '################################################################################# %> <% Dim activetab, activeborder, inactivetab, smallcalendar, largecalendarcell, stylecolor, CalAltForumCellColor, CalDefaultFontColor if strStylesCss = "1" and getStyles = "2" then activetab = "style=""background-color:" & strHeadCellColor & """" activeborder = "style=""background-color:" & strHeadCellColor & """" inactivetab = "style=""background-color:" & strAltForumCellColor & """" smallcalendar = "class=""smallcalendar""" largecalendarcell = "bgColor=""" & strAltForumCellColor & """ class=""largecalendarcell""" stylecolor = "style=""color:" & strForumFontColor & """" CalAltForumCellColor = strAltForumCellColor CalDefaultFontColor = strDefaultFontColor else activetab = "class=""activetab""" activeborder = "class=""activetab""" inactivetab = "class=""inactivetab""" smallcalendar = "class=""smallcalendarbody""" largecalendarcell = "class=""strPopUpTableColor""" stylecolor = "" CalAltForumCellColor = "" CalDefaultFontColor = "" end if '############################################################################ Sub DrawMonth(dateToDraw, enableHiLite, enableArrows, enableYearDisplay) '## '############################################################################ '### Create a table, then write the name of the month and the year ### Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine if enableArrows = "1" then Response.Write " " & getCurrentIcon(strIconLeftArrow,fLang("strLangCla00360"),"") & " " & vbNewLine Response.Write " " & vbNewLine & _ " " & MonthName(Month(dateToDraw)) if enableYearDisplay = "1" then Response.Write " " & Year(dateToDraw) Response.Write "" & vbNewLine if enableArrows = "1" then Response.Write " " & getCurrentIcon(strIconRightArrow,fLang("strLangCla00370"),"") & "" & vbNewLine Response.Write "
" & vbNewLine & _ " " & vbNewLine '### Generate the days of the week ### Response.Write "" & vbNewLine Dim intDays, dayofWeek dayofWeek = cLng(intFirstDayofWeekNum) - 1 For intDays=vbSunday To vbSaturday Response.Write " " & vbNewLine dayofWeek = dayofWeek + 1 Next Response.Write "" & vbNewLine '### Get the first day of the month ### Dim dateHolder dateHolder = DateSerial(Year(dateToDraw), Month(dateToDraw), 1) '### If first day of the month is not Sunday (or Monday or whatever) step back to the last Sunday (Monday or whatever) of the previous month ### Do while Weekday(dateHolder) <> cLng(intFirstDayofWeekNum) dateHolder = DateAdd("d", -1, dateHolder) Loop strSql = "SELECT T_EVENT_DATE " & _ "FROM " & strTablePrefix & "TOPICS " & _ "WHERE (T_ISEVENT=1) " & _ "AND (T_EVENT_DATE >= '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw),1)) & "') " & _ "AND (T_EVENT_DATE < '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw)+1,1)) & "') " & _ "ORDER BY T_EVENT_DATE ASC" Set rs = Server.CreateObject("ADODB.Recordset") rs.CursorLocation=AdUseClient rs.open strSql, My_conn, adOpenStatic intEventsforMonth=rs.recordcount '### There are as many as 6 weeks in a month! ### for i=1 to 6 Response.Write "" & vbNewLine For intDays=vbSunday To vbSaturday Response.Write " " '### Don't draw the date if it doesn't fall within the month ### if dateHolder > dateSerial(Year(dateToDraw), Month(dateToDraw), 1-1) and dateHolder < dateSerial(Year(dateToDraw), Month(dateToDraw)+1, 1) then isevent=false '### Determine if the date is an event. Improved code a bit. ### '### Get events for current date ### '### Count the Events for this date ### if intEventsforMonth > 0 then rs.filter=0 rs.filter="T_EVENT_DATE='" & DateToStr(dateHolder) & "'" if not(rs.EOF) then isevent=true end if if dateHolder=DateValue(strForumTimeAdjust) then Response.write "
" Response.Write "" if isevent then Response.Write "" Response.Write Day(dateHolder) if isevent then Response.Write "" Response.Write "" if dateHolder=DateValue(strForumTimeAdjust) then Response.write "
" end if dateHolder=DateAdd ("d",1,dateHolder) Response.Write "
" & vbNewLine Next Response.Write "
" & vbNewLine next rs.Close Set rs = nothing Response.Write "
" & Left(WeekDayName(dayofWeek mod 7 + 1),1) & "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine end sub '### DrawMonth ### '############################################################################ sub DrawMonthWeekly(dateToDraw) '## '############################################################################ '### Create a table, then write the name of the month and the year ### Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & getCurrentIcon(strIconLeftArrow,fLang("strLangCla00360"),"") & " " & vbNewLine & _ " " & vbNewLine & _ " " & MonthName(Month(dateToDraw)) & " " & Year(dateToDraw) & "" & vbNewLine & _ "  " & getCurrentIcon(strIconRightArrow,fLang("strLangCla00370"),"") & "" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine '### Generate the days of the week ### Response.Write "" & vbNewLine Dim intDays, dayofWeek dayofWeek = cLng(intFirstDayofWeekNum) - 1 For intDays=vbSunday To vbSaturday Response.Write " " & vbNewLine dayofWeek = dayofWeek + 1 Next Response.Write "" & vbNewLine '### Get the first day of the month ### Dim dateHolder dateHolder = DateSerial(Year(dateToDraw), Month(dateToDraw), 1) '### If first day of the month is not Sunday (or Monday or whatever) step back to the last Sunday (Monday or whatever) of the previous month ### Do while Weekday(dateHolder) <> cLng(intFirstDayofWeekNum) dateHolder = DateAdd("d", -1, dateHolder) Loop strSql = "SELECT T_EVENT_DATE " & _ "FROM " & strTablePrefix & "TOPICS " & _ "WHERE (T_ISEVENT=1) " & _ "AND (T_EVENT_DATE >= '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw),1)) & "') " & _ "AND (T_EVENT_DATE < '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw)+1,1)) & "') " & _ "ORDER BY T_EVENT_DATE ASC" Set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, My_conn, adOpenStatic intEventsforMonth=rs.recordcount firstdayofWeek = dateToDraw do while Weekday(firstdayofweek) <> cLng(intFirstDayofWeekNum) firstdayofWeek = DateAdd("d",-1,firstdayofWeek) loop '### There are as many as 6 weeks in a month! ### do while dateHolder < dateSerial(Year(dateToDraw),Month(dateToDraw)+1,1) Response.Write "" & vbNewLine For intDays=vbSunday To vbSaturday Response.Write "= firstdayofweek and dateHolder<= firstdayofweek+6 then Response.Write " class=dateselected" Response.Write ">" isevent=false '### Determine if the date is an event. Improved code a bit. ### '### Get events for current date ### '### Count the Events for this date ### if intEventsforMonth > 0 then rs.filter=0 rs.filter="T_EVENT_DATE='" & DateToStr(dateHolder) & "'" if not(rs.EOF) then isevent=true end if if dateHolder=DateValue(strForumTimeAdjust) then Response.write " " dateHolder=DateAdd ("d",1,dateHolder) Response.Write "" & vbNewLine Next Response.Write "" & vbNewLine loop rs.Close Set rs = nothing Response.Write "
" & Left(WeekDayName(dayofWeek mod 7 + 1),1) & "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine end sub '### DrawMonth ### '####################################################### sub WriteUpcomingEvents '## '####################################################### strSql = "SELECT " if strDBtype = "access" or strDBtype = "sqlserver" then strSql = strSql & "TOP " & intEventstoDisplay & " " strSql = strSql & "T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "T.T_EVENT_DATE, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND T_EVENT_DATE > '" & datetostr(DateValue(strForumTimeAdjust)) & "' " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " & _ "ORDER BY T.T_EVENT_DATE ASC" Set rs = Server.CreateObject("ADODB.Recordset") if strDBtype = "mysql" then rs.MaxRecords = intEventstoDisplay rs.open strSql, My_conn Response.Write "" rs.Close Set rs = nothing end sub '### WriteUpcomingEvents ### '####################################################### Sub WriteRecentEvents '## '####################################################### strSql = "SELECT " if strDBtype = "access" or strDBtype = "sqlserver" then strSql = strSql & "TOP " & intEventstoDisplay & " " strSql = strSql & "T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "T.T_EVENT_DATE, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND (T_EVENT_DATE < '" & datetostr(DateValue(strForumTimeAdjust)) & "') " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " & _ "ORDER BY T.T_EVENT_DATE DESC" Set rs = Server.CreateObject("ADODB.Recordset") if strDBtype = "mysql" then rs.MaxRecords = intEventstoDisplay rs.open strSql, My_conn Response.Write "" rs.Close Set rs = nothing end sub '### WriteRecentEvents ### '####################################################### sub AddEventForm(dateToAdd) '## '####################################################### if dateToAdd="" then dateToAdd=DateValue(strForumTimeAdjust) else dateToAdd=DateValue(CDate(dateToAdd)) end if if chkUserPermissions(intEventPermission) then Response.Write "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & fLang("strLangCla00110") & "" & vbNewLine & _ "
" & vbNewLine end if end sub '### AddEventForm ## '### Birthday Mod - Must Use Birthdate in Member Profile - Huntress Beta v2.2 ### '####################################################### sub PrepBdayTables '## '####################################################### todaysdate = now() strSql = " SELECT BT_TS FROM " & strTablePrefix & "BIRTHDAY_TS " set rs = my_Conn.Execute(strSql) if rs.EOF then 'do nothing - show no errors to user. If birthdays not showing, check here!!! else if rs("BT_TS") <> FormatDateTime(todaysdate,vbShortDate) then strSql = " UPDATE " & strTablePrefix & "BIRTHDAY_TS SET BT_TS = '" & FormatDateTime(todaysdate,vbShortDate) & "'" my_Conn.Execute (strSql) strSql = " DELETE FROM " & strMemberTablePrefix & "MEMBERS_BDATES " my_conn.execute (strSql) strSql = " INSERT INTO " & strMemberTablePrefix & "MEMBERS_BDATES(MEMBER_ID, M_NAME, DOB) " strSql = strSql & " SELECT MEMBER_ID, M_NAME, M_DOB " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_LASTPOSTDATE > '" & DateToStr(DateAdd("d",-31,todaysdate)) & "' AND M_DOB <> '' And M_DOB Is Not Null " my_conn.execute (strSql) if strDBType = "access" then strSql = " SELECT MB_ID, DOB FROM " & strMemberTablePrefix & "MEMBERS_BDATES " strSql = strSql & " ORDER BY MID(DOB,5,4) " set MBrs = my_Conn.Execute(strSql) else strSql = " SELECT MB_ID, DOB FROM " & strMemberTablePrefix & "MEMBERS_BDATES " strSql = strSql & " ORDER BY SUBSTRING(DOB,5,4) " set MBrs = my_Conn.Execute(strSql) end if YYYYMMDDpast = DateToStr(dateadd("d",-BdayDays,todaysdate)) CurYYYYpast = mid(YYYYMMDDpast,1,4) CurMMDDpast = mid(YYYYMMDDpast,5,4) YYYYMMDDfut = DateToStr(dateadd("d",BdayDays,todaysdate)) CurYYYYfut = mid(YYYYMMDDfut,1,4) CurMMDDfut = mid(YYYYMMDDfut,5,4) do while not MBrs.EOF 'deal with that damn leap year baby :) - February 29th birthdays changed to March 1st on non leap years if mid(MBrs("DOB"),5,4) = "0229" and mid(datetostr(todaysdate),1,4) mod 4 <> 0 then mbDOB = "0301" else mbDOB = mid(MBrs("DOB"),5,4) end if 'set the year for the next occurance of members birthday If Cint(CurYYYYpast)Cint(year(todaysdate)) Then If Cint(mbDOB)>=Cint("0101") AND Cint(mbDOB) cint(CurMMDDpast) AND cint(mbDOB) < cint(CurMMDDfut) then newdate = year(todaysdate) & mbDOB ElseIf Cint(mbDOB)" & vbnewline & _ "" & vbNewLine Response.Write " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ " " bTodayFound = False do while not(rs.EOF) if DateToStr(rs("DOB")&"235900") > DateToStr(todaysdate) and DateToStr(rs("DOB")&"000000") < DateToStr(todaysdate) then bTodayFound = true Response.Write "" Response.Write "" end if ' EmailBirthdays rs.Movenext loop if bTodayFound = False then Response.Write "" Response.Write "" Response.Write "" end if Response.Write "" Response.Write "
" & vbNewLine & _ " " & fLang("strLangCla00480") & "
" & vbNewLine Response.Write "
" Response.Write "
" Response.Write "" Response.Write "" Response.Write "" & rs("M_NAME") & "" Response.Write "" Response.Write "" & ChkDate(rs("DOB"),"",false) & " " Response.Write "
" Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
  • " & fLang("strLangCla00470") & "
  • " & vbNewLine Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "
    " & vbNewLine & _ "" & vbNewLine rs.movefirst 'upcoming birthdays Response.Write "" & vbnewline & _ "
    " & vbNewLine Response.Write " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ " " bUpcomingFound = False do while not(rs.EOF) if DateToStr(rs("DOB")&" 000000") > DateToStr(todaysdate) and DateToStr(rs("DOB")&"000000") < DateToStr(DateAdd("d",BdayDays,todaysdate)) then bUpcomingFound = true Response.Write "" Response.Write "" end if rs.Movenext loop if bUpcomingFound = False then Response.Write "" Response.Write "" end if Response.Write "" Response.Write "
    " & vbNewLine & _ " " & fLang("strLangCla00490") & "
    " & vbNewLine Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "" Response.Write "" & rs("M_NAME") & "" Response.Write "" Response.Write "" & ChkDate(rs("DOB"),"",false) & " " Response.Write "
    " Response.Write "
    " Response.Write "
  • " & fLang("strLangCla00500") & "
  • " & vbNewLine Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "
    " & vbNewLine & _ "
    " & vbNewLine rs.movefirst 'recent birthdays Response.Write "" & vbnewline & _ "
    " & vbNewLine Response.Write " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ " " bRecentFound = False rs.Close strSql = " SELECT * FROM " & strMemberTablePrefix & "MEMBERS_BDATES ORDER BY DOB DESC" set rs = my_Conn.Execute(strSql) do while not(rs.EOF) if DateToStr(rs("DOB")&"235900") < DateToStr(todaysdate) and DateToStr(rs("DOB")&"000000") > DateToStr(DateAdd("d",-BdayDays,todaysdate)) then bRecentFound = true Response.Write "" Response.Write "" Response.Write "" end if rs.Movenext loop if bRecentFound = False then Response.Write "" Response.Write "" Response.Write "" end if Response.Write "" Response.Write "
    " & vbNewLine & _ " " & fLang("strLangCla00510") & "
    " & vbNewLine Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "" Response.Write "" & rs("M_NAME") & "" Response.Write "" Response.Write "" & ChkDate(mid(datetostr(todaysdate),1,4) & mid(rs("DOB"),5,4),"",false) & " " Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "
    " Response.Write "
  • " & fLang("strLangCla00520") & "
  • " & vbNewLine Response.Write "
    " Response.Write "
    " Response.Write "" Response.Write "
    " & vbNewLine & _ "
    " & vbNewLine end if rs.close set rs = nothing End sub '### WriteBirthdays ### sub EmailBirthdays '## '####################################################### strSql = " SELECT * FROM " & strMemberTablePrefix & "MEMBERS_BDATES ORDER BY DOB " set rs = my_Conn.Execute(strSql) if rs.EOF then 'no birthdays at all :D else 'bTodayFound = False rs.movefirst do while not(rs.EOF) idmembro = rs("MEMBER_ID") sentmail = rs("M_SENTEMAIL") If sentmail = 0 then if DateToStr(rs("DOB")&"235900") > DateToStr(todaysdate) and DateToStr(rs("DOB")&"000000") < DateToStr(todaysdate) then ' bTodayFound = true strSQL1 = " SELECT M_NAME, M_EMAIL, M_RECEIVE_EMAIL FROM " & strMemberTablePrefix & "MEMBERS " strSQL1 = strSQL1 & " WHERE MEMBER_ID = " & idmembro set rsmail= my_Conn.Execute(strSQL1) mricevimail = rsmail("M_RECEIVE_EMAIL") strFromName = strForumTitle strRecipientsName = rsMail("M_NAME") strRecipients = rsMail("M_EMAIL") strSender = strSender strSubject = "Buon Compleanno!!" strMessage = "Ciao " & strRecipientsName & vbNewline & vbNewline strMessage = strMessage & "Tanti Auguri di buon Compleanno da tutti noi!!" & vbNewline & vbNewline strMessage = strMessage & "Da: " & strForumURL & vbNewline & vbNewline htmlflag = 0 if mricevimail = "1" then %><% end if strMessage ="" rsmail.close set rsmail = nothing strSql = " UPDATE " & strMemberTablePrefix & "MEMBERS_BDATES SET M_SENTEMAIL = 1 WHERE MEMBER_ID = " & idmembro my_Conn.Execute (strSql) end if end if rs.Movenext loop ' rs.movefirst end if rs.close set rs = nothing End sub '### EmailBirthdays ### '### Birthday Mod - Must Use Birthdate in Member Profile - Huntress Beta v2.2 ### %>