| CarefreeAdvanced Member
 
      
 
                Philippines4224 Posts
 | 
                    
                      |  Posted - 10 February 2015 :  14:43:55   
 |  
                      | Try this.  It let's you modify settings from the admin panel in the future. 
 1.  Save these three files in forum, then run dbs file from admin console.
 
 "dbs.birthdays.asp"
 
 
 
 "admin_birthdays.asp"
 
 
 
 "inc_birthdays.asp"
 
 
 
<%
'###############################################################################
'##
'##                Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 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
'##
'###############################################################################
Sub DisplayBirthdays(intB_Range,intB_Age)
	Call DoHideCategory("Birthdays")
	HideForumCat = strUniqueID & "HideCatBirthdays"
	If Request.Cookies <> "Y" Then
		strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
		strBDRecentDay = Mid(DateToStr(DateAdd("d",-intB_Range,strToDate(strBDToday))),5,4)
		strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intB_Range,strToDate(strBDToday))),5,4)
		strBDToday = Mid(strBDToday,5,4)
		strsql = "SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB<>'' AND M_STATUS=1 ORDER BY mid(M_DOB,5,2) DESC, mid(m_dob,7,2) ASC"
		Set rsBirthday = my_conn.Execute(strsql)
		bolRecentBD = False
		bolTodaysBD = False
		bolUpcomingBD = False
		If intB_Range = 1 Then
			strRecentBD = "Yesterday: "
			strUpcomingBD = "Tomorrow: "
		Else
			strRecentBD = "<b>Recent:</b> "
			strUpcomingBD = "<b>Upcoming:</b> "
		End If
		strTodaysBD = ""
		If NOT rsBirthday.EOF Then
			arrBD = rsBirthday.GetRows()
			bolBDFound = True
			rsBirthday.Close
		Else
			bolBDFound = False
		End If
		Set rsBirthday = Nothing
		If bolBDFound Then
			For iBD = 0 to ubound(arrBD, 2)
				intBDID = arrBD(0, iBD)
				strBDName = chkString(arrBD(1, iBD),"display")
				intTPPostcount = arrBD(2, iBD)
				strDOB = Right(arrBD(2, iBD),4)
				strBirthdate = strToDate(arrBD(2, iBD) & "000000")
				If strDOB = strBDToday Then
					If bolTodaysBD = True Then
						strTodaysBD = strTodaysBD & ", "
					End If
					strTodaysBD = strTodaysBD & profileLink(strBDName,intBDID) & " ("
					If intB_Age = 1 Then
						strTodaysBD = strTodaysBD & DisplayUsersAge(strBirthdate) & " on "
					End If
					strTodaysBD = strTodaysBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"
					bolTodaysBD = True
				End If
				If strBDRecentDay > strBDToday Then
					If (strDOB > strBDRecentDay AND strDOB < "1231") OR (strDOB > "0101" AND strDOB < strBDToday) Then
						If bolRecentBD = True Then
							strRecentBD = strRecentBD & ", "
						End If
						strRecentBD = strRecentBD & profileLink(strBDName,intBDID) & " ("
						If intB_Age = 1 Then
							strRecentBD = strRecentBD & DisplayUsersAge(strBirthdate) & " on "
						End If
						strRecentBD = strRecentBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"
						bolRecentBD = True
					End If
				Else
					If strDOB < strBDToday AND strDOB >= strBDRecentDay Then
						If bolRecentBD = True Then
							strRecentBD = strRecentBD & ", "
						End If
						strRecentBD = strRecentBD & profileLink(strBDName,intBDID) & " ("
						If intB_Age = 1 Then
							strRecentBD = strRecentBD & DisplayUsersAge(strBirthdate) & " on "
						End If
						strRecentBD = strRecentBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"
						bolRecentBD = True
					End If
				End If
				If strBDUpcomingDay < strBDToday Then
					If (strDOB =< strBDUpcomingDay AND strDOB >= "0101") OR (strDOB =< "1231" AND strDOB > strBDToday) Then
						If bolUpcomingBD = True Then
							strUpcomingBD = strUpcomingBD & ", "
						End If
						strUpcomingBD = strUpcomingBD & profileLink(strBDName,intBDID) & " ("
						If intB_Age = 1 Then
							strUpcomingBD = strUpcomingBD & DisplayUsersAge(strBirthdate)+1 & " on "
						End If
						strUpcomingBD = strUpcomingBD & monthName(Datepart("m",strBirthDate), true) & " " & day(strBirthDate) & ")"
						bolUpcomingBD = True
					End If
				Else
					If strDOB > strBDToday AND strDOB <= strBDUpcomingDay Then
						If bolUpcomingBD = True Then
							strUpcomingBD = strUpcomingBD & ", "
						End If
						strUpcomingBD = strUpcomingBD & profileLink(strBDName,intBDID) & " ("
						If intB_Age = 1 Then
							strUpcomingBD = strUpcomingBD & DisplayUsersAge(strBirthdate)+1 & " on "
						End If
						strUpcomingBD = strUpcomingBD & monthName(Datepart("m",strBirthDate), true) & " " & day(strBirthDate) & ")"
						bolUpcomingBD = True
					End If
				End If
			Next
		End If
		intBDRowSpan = 1
		If bolRecentBD Then
			intBDRowSpan = intBDRowSpan + 1
			strRecentBD = strRecentBD & "."
		End If
		If bolTodaysBD Then
			strTodaysBD = strTodaysBD & "."
		Else
			strTodaysBD = "None today."
		End If
		If bolUpcomingBD Then
			intBDRowSpan = intBDRowSpan + 1
			strUpcomingBD = strUpcomingBD & "."
		End If
				End If
	If Request.Cookies(HideForumCat) = "Y" Then
		Response.Write  "                <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""" & ScriptName & "?" & HideForumCat & "=N"">" & getCurrentIcon(strIconPlus,"Expand This Category","") & "</a> <b>Birthdays</b></font></td>" & vbNewLine
	Else
		Response.Write  "                <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""" & ScriptName & "?" & HideForumCat & "=Y"">" & getCurrentIcon(strIconMinus,"Collapse This Category","") & "</a> <b>Birthdays</b></font></td>" & vbNewLine
	End If
	Response.Write  "              </tr>" & vbNewLine
	If Request.Cookies(HideForumCat) <> "Y" Then
		Response.write  "              <tr>" & vbNewLine & _
				"                <td align=""center"" bgcolor=""" & strForumCellColor & """ colspan=""1"" rowspan=""" & intBDRowSpan & """ valign=""middle"">" & getCurrentIcon(strIconBirthdays,"","") & vbNewLine & _
				"              </td>" & vbNewLine
		If (NOT bolTodaysBD) AND (NOT bolUpcomingBD) AND (NOT bolRecentBD) Then
			Response.Write  "                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
					"                <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>None today." & vbNewLine
		Else
			Response.Write  "                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
					"                  <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>Today: </b>" & strTodaysBD & "</font>" & vbNewLine & _
					"		      </td></tr>" & vbNewLine
			Response.Write  "                <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>Upcoming: </b>" & vbNewLine
			If bolUpcomingBD Then
				strSqlC="SELECT COUNT(MEMBER_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND MID(M_DOB,5,4)>'" & STRBDTODAY & "' AND MID(M_DOB,5,4) < '" & strBDUpcomingDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " <12)"
				Set rsC=my_conn.Execute(strSqlC)
				intCnt=0
				If not rsC.EOF Then
					intCnt=rsC("Cnt")
					strSql1="SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND MID(M_DOB,5,4)>'" & strBDToday & "' AND MID(M_DOB,5,4) < '" & strBDUpcomingDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " <12) ORDER BY MID(M_DOB,5,2) ASC, MID(M_DOB,7,2) ASC"
					Set rsUp=my_Conn.Execute(strSql1)
					If not rsUp.EOF Then
						rsUp.MoveFirst
						Do while not rsUp.EOF
							strBD=strToDate(rsUp("M_DOB") & "000000")
							Response.Write	profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD)
							If intB_Age = 1 Then
								strAges=left(rsUp("M_DOB"),4)&"/"&mid(rsUp("M_DOB"),5,2)&"/"&mid(rsUp("M_DOB"),7,2)
								intYY=DateDiff("yyyy",strAges,now())
								Response.Write	", " & intYY
							End If
							Response.Write	")"
							intCnt=intCnt-1
							If intCnt>0 Then Response.Write	", "
							rsUp.MoveNext
						Loop
						rsUp.Close
					End If
					Set rsUp=Nothing
					rsC.Close
					iCount=1
				End If
				Set rsC=Nothing
				strSqlC="SELECT COUNT(MEMBER_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND MID(M_DOB,5,4)>'" & STRBDTODAY & "' AND MID(M_DOB,5,4) < '" & strBDUpcomingDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " >12)"
				Set rsC=my_conn.Execute(strSqlC)
				intCnt=0
				If not rsC.EOF Then
					intCnt=rsC("Cnt")
					strSql1="SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND MID(M_DOB,5,4)>'" & strBDToday & "' AND MID(M_DOB,5,4) < '" & strBDUpcomingDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " >12) ORDER BY MID(M_DOB,5,2) ASC, MID(M_DOB,7,2) ASC"
					Set rsUp=my_Conn.Execute(strSql1)
					If not rsUp.EOF Then
						rsUp.MoveFirst
						If iCount=1 Then Response.Write	", "
						Do while not rsUp.EOF
							strBD=strToDate(rsUp("M_DOB") & "000000")
							Response.Write	profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD)
							If intB_Age = 1 Then
								strAges=left(rsUp("M_DOB"),4)&"/"&mid(rsUp("M_DOB"),5,2)&"/"&mid(rsUp("M_DOB"),7,2)
								intYY=DateDiff("yyyy",strAges,now())
								Response.Write	", " & intYY
							End If
							Response.Write	")"
							intCnt=intCnt-1
							If intCnt>0 Then Response.Write	", "
							rsUp.MoveNext
						Loop
						rsUp.Close
					End If
					Set rsUp=Nothing
					rsC.Close
				End If
				Set rsC=Nothing
				Response.Write	"</font></td></tr>"
			Else
				Response.Write	"None.</font></td></tr>"
			End If
			Response.Write  "                <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b>Recent: </b>" & vbNewLine
			If bolRecentBD Then
				strSqlC="SELECT COUNT(MEMBER_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND M_DOB>'' AND MID(M_DOB,5,4)<'" & strBDRecentDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " <12)"
				Set rsC=my_conn.Execute(strSqlC)
				intCnt=0
				If not rsC.EOF Then
					intCnt=rsC("Cnt")
					rsC.Close
					strSql1="SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND M_DOB>'' AND MID(M_DOB,5,4)<'" & strBDRecentDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " <12) ORDER BY MID(M_DOB,5,2) DESC, MID(M_DOB,7,2) DESC"
					Set rsUp=my_Conn.Execute(strSql1)
					If not rsUp.EOF Then
						rsUp.MoveFirst
						If iCount = 1 Then Response.Write	", "
						Do while not rsUp.EOF
							strBD=strToDate(rsUp("M_DOB") & "000000")
							Response.Write	profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD)
							If intB_Age = 1 Then
								strAges=left(rsUp("M_DOB"),4)&"/"&mid(rsUp("M_DOB"),5,2)&"/"&mid(rsUp("M_DOB"),7,2)
								intYY=DateDiff("yyyy",strAges,now())
								Response.Write	", " & intYY
							End If
							Response.Write	")"
							intCnt=intCnt-1
							If intCnt>0 Then Response.Write	", "
							rsUp.MoveNext
						Loop
						rsUp.Close
						iCount = 1
					End If
					Set rsUp=Nothing
				End If
				Set rsC = Nothing
				strSqlC="SELECT COUNT(MEMBER_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND M_DOB>'' AND MID(M_DOB,5,4)<'" & strBDRecentDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " >12)"
				Set rsC=my_conn.Execute(strSqlC)
				intCnt=0
				If not rsC.EOF Then
					intCnt=rsC("Cnt")
					rsC.Close
					strSql1="SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND M_DOB>'' AND MID(M_DOB,5,4)<'" & strBDRecentDay & "' AND " & cInt(mid(strBDUpcomingDay,1,2))+cInt(mid(strBDToday,1,2)) & " >12) ORDER BY MID(M_DOB,5,2) DESC, MID(M_DOB,7,2) DESC"
					Set rsUp=my_Conn.Execute(strSql1)
					If not rsUp.EOF Then
						rsUp.MoveFirst
						Do while not rsUp.EOF
							strBD=strToDate(rsUp("M_DOB") & "000000")
							Response.Write	profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD)
							If intB_Age = 1 Then
								strAges=left(rsUp("M_DOB"),4)&"/"&mid(rsUp("M_DOB"),5,2)&"/"&mid(rsUp("M_DOB"),7,2)
								intYY=DateDiff("yyyy",strAges,now())
								Response.Write	", " & intYY
							End If
							Response.Write	")"
							intCnt=intCnt-1
							If intCnt>0 Then Response.Write	", "
							rsUp.MoveNext
						Loop
						rsUp.Close
					End If
					Set rsUp=Nothing
				End If
				Set rsC=Nothing
				Response.Write	"</font></td></tr>"
			Else
				Response.Write	"None.</font></td></tr>"
			End If
		End If
		Response.Write  "		</tr>" & vbNewLine
	End If
End Sub
%>
 2.  Edit these three files accordingly:
 
 "config.asp"
 
 
 
 "admin_home.asp"
 
 
 
 "default.asp"
 
 
 
 
 |  
                      | Edited by - Carefree on 07 April 2015  17:22:13
 |  
                      |  |  |