if strAgeDOB > "" then
strSql="SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME='" & strDBNTUserName & "'"
set rsHB=my_Conn.Execute(strSql)
Member_DOB=rsHB("M_DOB")
rsHB.Close
set rsHB=Nothing
TDay=DoubleNum(Month(Date())) & DoubleNum(Day(Date()))
if mid(Member_DOB, 5, 4) = TDay then
Response.Write " <tr>" & vbNewLine & _
" <td align=""right"">Happy Birthday!</td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if
function isbday
if strAgeDOB = "1" and MemberID > 0 then
set rsbday = my_Conn.Execute ("SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & MemberID & " AND M_DOB <> ''")
if rsbday.EOF then
isbday = "no"
else
if day(StrToDate(rsbday("M_DOB") & "000000")) = day(strForumTimeAdjust) and month(StrToDate(rsbday("M_DOB") & "000000")) = month(strForumTimeAdjust) then
isbday = "yes"
else
isbday = "no"
end if
end if
set rsbday = nothing
else
isbday = "no"
end if
end function
function getGreeting()
if isbday = "yes" then
Response.Write "Happy Birthday!"
else
Response.Write "You are logged on as"
end if
end function" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>You are logged on as<br />"" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
call getGreeting()
Response.Write "<br />" & vbNewLineResponse.Write "Happy Birthday!"Response.Write "" & getCurrentIcon(strCalIconBDay,"Happy Birthday!","vAlign=""middle""") & " <b>Happy Birthday!</b>"Originally posted by RichardKinser
This is how it's implemented here ....
function isbday
if strAgeDOB = "1" and MemberID > 0 then
set rsbday = my_Conn.Execute ("SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & MemberID & " AND M_DOB <> ''")
if rsbday.EOF then
isbday = "no"
else
if day(StrToDate(rsbday("M_DOB") & "000000")) = day(strForumTimeAdjust) and month(StrToDate(rsbday("M_DOB") & "000000")) = month(strForumTimeAdjust) then
isbday = "yes"
else
isbday = "no"
end if
end if
set rsbday = nothing
else
isbday = "no"
end if
if isbday = "yes" then
Response.Write "Happy Birthday!"
else
Response.Write "You are logged on as"
end if
end function