Author |
Topic |
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 26 December 2014 : 17:22:57
|
Well, it works here.... OK, we'll take a different approach:
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 December 2014 : 18:19:06
|
That works PERFECT, Carefree! Thank you so much!
Hope this is a better day for you!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 December 2014 : 18:27:43
|
OOPS! I just now realized the dates are in reverse order, the last of the month to the first of the month. . .instead of first to last.
|
"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 26 December 2014 18:28:22 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 December 2014 : 00:43:55
|
Easy enough.
<%
'###############################################################################
'##
'## 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
'##
'###############################################################################
'## MOD: Birthdays v1.0 for Snitz Forums v3.4
'## Author: Michael Reisinger (OneWayMule)
'## File: inc_birthdays.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
Sub DisplayBirthdays(intRange,intAge)
Call DoHideCategory("Birthdays")
HideForumCat = strUniqueID & "HideCatBirthdays"
If Request.Cookies <> "Y" Then
strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
strBDRecentDay = Mid(DateToStr(DateAdd("d",-intRange,strToDate(strBDToday))),5,4)
strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intRange,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, right(m_dob,2) asc)"
Set rsBirthday = my_conn.Execute(strsql)
bolRecentBD = False
bolTodaysBD = False
bolUpcomingBD = False
If intRange = 1 Then
strRecentBD = "Yesterday: "
strUpcomingBD = "Tomorrow: "
Else
strRecentBD = "Recent: "
strUpcomingBD = "Upcoming: "
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 intAge = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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."
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=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strTodaysBD & "</font>" & vbNewLine & _
" </td></tr>" & vbNewLine
If bolUpcomingBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strUpcomingBD & "</font></td></tr>" & vbNewLine
End If
If bolRecentBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strRecentBD & "</font></td></tr>" & vbNewLine
End If
End If
Response.Write " </tr>" & vbNewLine
End If
End Sub
%>
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 27 December 2014 : 17:28:22
|
I'm receiving this error now, Carefree.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.5.28]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC, right(m_dob,2) asc)' at line 1
/fp/inc_birthdays.asp, line 57 |
"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 - 27 December 2014 : 21:28:45
|
MySQL doesn't like "RIGHT" - ok, use mid again.
<%
'###############################################################################
'##
'## 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
'##
'###############################################################################
'## MOD: Birthdays v1.0 for Snitz Forums v3.4
'## Author: Michael Reisinger (OneWayMule)
'## File: inc_birthdays.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
Sub DisplayBirthdays(intRange,intAge)
Call DoHideCategory("Birthdays")
HideForumCat = strUniqueID & "HideCatBirthdays"
If Request.Cookies <> "Y" Then
strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
strBDRecentDay = Mid(DateToStr(DateAdd("d",-intRange,strToDate(strBDToday))),5,4)
strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intRange,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 intRange = 1 Then
strRecentBD = "Yesterday: "
strUpcomingBD = "Tomorrow: "
Else
strRecentBD = "Recent: "
strUpcomingBD = "Upcoming: "
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 intAge = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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."
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=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strTodaysBD & "</font>" & vbNewLine & _
" </td></tr>" & vbNewLine
If bolUpcomingBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strUpcomingBD & "</font></td></tr>" & vbNewLine
End If
If bolRecentBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strRecentBD & "</font></td></tr>" & vbNewLine
End If
End If
Response.Write " </tr>" & vbNewLine
End If
End Sub
%>
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 27 December 2014 : 23:57:31
|
PERFECT!
You're the BEST, Carefree! Thank you so much!
|
"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 - 28 December 2014 : 16:22:14
|
You're welcome. |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 04 January 2015 : 14:41:15
|
I just now noticed something really odd with this. In the upcoming birthdays area, it is listing a member's birthday for February 1. It then continues and lists the January birthdays.
Any ideas?
|
"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 - 04 January 2015 : 15:49:11
|
Yeah, I know why it's doing it ... but the only solution is to rewrite the whole routine or it will screw up the recent birthdays.
Here, this works for me, should work on MySQL also.
<%
'###############################################################################
'##
'## 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
'##
'###############################################################################
'## MOD: Birthdays v1.0 for Snitz Forums v3.4
'## Author: Michael Reisinger (OneWayMule)
'## File: inc_birthdays.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
Sub DisplayBirthdays(intRange,intAge)
Call DoHideCategory("Birthdays")
HideForumCat = strUniqueID & "HideCatBirthdays"
If Request.Cookies <> "Y" Then
strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
strBDRecentDay = Mid(DateToStr(DateAdd("d",-intRange,strToDate(strBDToday))),5,4)
strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intRange,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 intRange = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strTodaysBD & "</font>" & vbNewLine & _
" </td></tr>" & vbNewLine
If bolUpcomingBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine
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 & "')"
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 & "') 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 " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD) & ")"
intCnt=intCnt-1
If intCnt>0 Then Response.Write ", "
Response.Write "</font>" & vbNewLine
rsUp.MoveNext
Loop
rsUp.Close
End If
Set rsUp=Nothing
rsC.Close
End If
Set rsC=Nothing
Response.Write "</td></tr>"
End If
If bolRecentBD Then
Response.Write " <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine
strSqlC="SELECT COUNT(MEMBER_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE (M_STATUS=1 AND MID(M_DOB,5,4)<'" & strBDToday & "')"
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 & "') ORDER BY MID(M_DOB,5,2) DESC, 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 " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD) & ")"
intCnt=intCnt-1
If intCnt>0 Then Response.Write ", "
Response.Write "</font>" & vbNewLine
rsUp.MoveNext
Loop
rsUp.Close
End If
Set rsUp=Nothing
rsC.Close
Response.Write ", "
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)>'" & strBDRecentDay & "')"
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)>'" & strBDRecentDay & "') ORDER BY MID(M_DOB,5,2) DESC, 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 " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & profileLink(rsUp("M_Name"), rsUp("Member_ID")) & " (" & monthName(Datepart("m",strBD, true)) & " " & day(strBD) & ")"
intCnt=intCnt-1
If intCnt>0 Then Response.Write ", "
Response.Write "</font>" & vbNewLine
rsUp.MoveNext
Loop
rsUp.Close
End If
Set rsUp=Nothing
rsC.Close
End If
Set rsC=Nothing
Response.Write "</td></tr>"
End If
End If
Response.Write " </tr>" & vbNewLine
End If
End Sub
%>
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 04 January 2015 : 16:11:12
|
Carefree, for the members who don't have a birthday listed (there's a bunch), it listed their birthday as today.
It doesn't list the categories: Recent, Upcoming, etc. as before.
|
"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 - 04 January 2015 : 23:03:58
|
I didn't notice how you had it set, but no problem.
<%
'###############################################################################
'##
'## 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
'##
'###############################################################################
'## MOD: Birthdays v1.0 for Snitz Forums v3.4
'## Author: Michael Reisinger (OneWayMule)
'## File: inc_birthdays.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
Sub DisplayBirthdays(intRange,intAge)
Call DoHideCategory("Birthdays")
HideForumCat = strUniqueID & "HideCatBirthdays"
If Request.Cookies <> "Y" Then
strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
strBDRecentDay = Mid(DateToStr(DateAdd("d",-intRange,strToDate(strBDToday))),5,4)
strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intRange,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 intRange = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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 intAge = 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 & "')"
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 & "') 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) & ")"
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 MID(M_DOB,5,4)<'" & strBDToday & "' AND M_DOB>'')"
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 M_DOB>'' AND MID(M_DOB,5,4)<'" & strBDToday & "') ORDER BY MID(M_DOB,5,2) DESC, 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) & ")"
intCnt=intCnt-1
If intCnt>0 Then Response.Write ", "
rsUp.MoveNext
Loop
rsUp.Close
End If
Set rsUp=Nothing
rsC.Close
Response.Write ", "
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 & "')"
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 M_DOB>'' AND MID(M_DOB,5,4)>'" & strBDRecentDay & "') ORDER BY MID(M_DOB,5,2) DESC, 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) & ")"
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
End If
Response.Write " </tr>" & vbNewLine
End If
End Sub
%>
|
Edited by - Carefree on 04 January 2015 23:43:19 |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 06 January 2015 : 00:21:13
|
Looks GREAT. . .even better than before!
Thank you so much, Carefree! Sure do appreciate you!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 06 January 2015 : 06:33:27
|
You're welcome. |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 31 January 2015 : 21:45:05
|
This is really odd; for recent birthdays, it's listing birthdays for the past entire year!
But until today, it was working perfect.
Any ideas?
|
"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 |
|
|
Topic |
|
|
|