response.write "<br>wsetup(3)=" & wsetup(3)
response.end
if cint(wsetup(3))=1 then
myCache.name="userbirthday"
if myCache.valid then
response.write myCache.value
'mycache.makeEmpty
。。。。。。。。。。。。
'=========生日显示开始================
if cint(wsetup(3))=1 then
myCache.name="userbirthday"
if myCache.valid then
response.write myCache.value
'mycache.makeEmpty
else
dim age
dim birthuser
dim foundbirth
dim showbirthday
dim birthNum,birthday
foundbirth=false
birthNum=0
on error resume next
sql="select birthuser from config where active=1"
set rs=conn.execute(sql)
if not isnull(rs(0)) or rs(0)<>"" then
birthuser=split(rs(0),"$")
if ubound(birthuser)<3 then
foundbirth=false
elseif cint(birthuser(1))<>0 then
foundbirth=true
elseif datediff("d",birthuser(2),Now())>0 then
foundbirth=false
else
foundbirth=true
end if
else
foundbirth=false
end if
if not foundbirth then
set rs=conn.execute("select username,birthday from [user] where birthday<>'' order by userid")
do while not rs.eof
if isdate(rs(1)) then
if month(rs(1))=month(Now()) and day(rs(1))=day(Now()) then
age=datediff("yyyy",rs(1),Now())
birthday=birthday & "<a href=dispuser.asp?name="&rs(0)&" title=祝"&age&"岁生日快乐! target=_blank>〖祝 "&rs(0)&" 生日快乐<img src=pic/birthday00.gif align=absmiddle border=0>〗 </a> ,"
birthNum=birthNum+1
end if
end if
rs.movenext
loop
rs.close
set rs=nothing
if birthday="" then birthday="今天没有朋友过生日..."
conn.execute("update config set birthuser='" & birthday & "$" & birthNum & "$" & Now() & "' where active=1")
else
birthday=birthuser(0)
birthNum=birthuser(1)
end if
showbirthday="<BR><table cellpadding=3 cellspacing=1 align=center class=tableborder1><TR ><Th align=left >≡ 今天过生日的用户(共 "&birthNum&" 人)≡</Th></TR><TR><TD width=100% vAlign=middle class=tablebody1 >"&birthday&"</TD></TR></table>"
myCache.add showbirthday,date+1
end if
end if
'=========生日显示结束================