开启/关闭“今日生日栏”功能(修改方法)


修改con_forum_main.asp

找到id=forum_online_var>打开在线列表</a></span></td>

下面加入
<td width=30 align=center><img src='<%response.write joekoe_cms.web_dir_skin%>small/new_f.gif' border=0></td>
<td>
<%
if action="birthday" then
response.write"<a href=forum.asp>关闭今日生日栏</a>"
else
response.write"<a href=?action=birthday>打开今日生日栏</a>"
end if
%>
</td>

然后把sub user_birthday()的内容换成下面的

sub user_birthday()
dim temp1,nnum,username,power,ta
temp1=""
nnum=0
ta="'"
sql="select username,sex,power,tim,last_tim from user_data where hidden=1 and month(birthday)="&month(joekoe_cms.now_time)&" and day(birthday)="&day(joekoe_cms.now_time)&" order by id"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
do while not rs.eof
temp1=temp1&"<tr>"
for i=1 to 5
if rs.eof then exit for
username=rs(0)
power=rs(2)
temp1=temp1&"<td>"&user_view_sex(rs(1),rs(4))&" <a href='user_view.asp?username="&server.urlencode(username)&"' alt='用户类型:"&format_power(power,1)&"<br>注册时间:"&joekoe_cms.time_type(rs(3),1)&"' target=_blank>"&username&"</a></td>"
rs.movenext
nnum=nnum+1
next
temp1=temp1&"</tr>"
loop
rs.close
if action="birthday" then
response.write vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
vbcrlf&"<tr><td class=td> "&img_skin(web_img_m)&" 今天过生日的用户(共 <font class=red>"&nnum&"</font> 人)</td></tr>" & _
vbcrlf&"<tr><td class=bg_td align=center>" & _
vbcrlf&" <table border=0 width='98%' cellspacing=0 cellpadding=2>" & _
vbcrlf&" <tr><td width='20%' height=5></td><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td></tr>"
if temp1="" then
response.write vbcrlf&"<tr><td colspan=5 class=gray>   今天没有过生日的用户</td></tr>"
else
response.write vbcrlf&temp1
end if
response.write vbcrlf&" <tr><td height=5></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"</table>"&ukong
else
end if
call web_branch(0)
end sub
http://www.joekoe.com/forum_view.asp?forum_id=7&view_id=51559

文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 8 | 引用: 0 | 查看次数: 590
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭