📄 misc.asp
字号:
<!--#INCLUDE FILE="setup.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<!--#INCLUDE FILE="checkuser.asp" -->
<!--#INCLUDE FILE="theme.asp" -->
<%
dim locat
select case request("action")
case "Birthday"
locat="班级生日榜"
case "VisitCount"
locat="班级访问统计"
end select
if membername="" then
errmsg=errmsg+"<br>"+"<li>您还没有<a href=login.asp>登录</a>。"
call top(1,1)
call error("Information",errmsg)
else
joinstatus=chkjoinclass(clsid)
if joinstatus<>"" then
call top(1,1)
call error("Exclamation",errmsg)
else
select case request("action")
case "Birthday"
call top(2,1)
call birthdaylist()
case "VisitCount"
call top(2,1)
call visitclass()
end select
end if
end if
sub birthdaylist()
sql="select userid,realname,birthday,wish from student where userid in (select "&_
"userid from joinclass where isauditing=false and classid="&clsid&") order by realname"
set rs=conn.execute(sql)
%><!--#INCLUDE FILE="script/popup.inc" --><%
response.write "<br><br>"&_
"<table border=0 cellpadding=4 cellspacing=1 width=75% bgcolor="&tablebordercolor&" align=center>"&_
"<TR bgcolor="&tabletitlecolor&"><TD width=100% valign=middle align=center colspan=4><IMG SRC=IMAGES/birthday.gif WIDTH=134 HEIGHT=31 BORDER=0></TD></TR>"&_
"<TR bgcolor="&tablebodycolor1&"><Th width=38% align=center nowrap>姓 名</Th>"&_
"<Th width=22% align=center nowrap>出生日期</Th>"&_
"<Th width=40% align=center nowrap>距离生日天数</Th>"&_
"<Th align=center nowrap>生日愿望</Th></TR>"
do until rs.eof
bmonth=month(rs("birthday"))
bday=day(rs("birthday"))
if dateserial(year(date),bmonth,bday)<date then
nbirthday =dateserial(year(date)+1,bmonth,bday)
else
nbirthday =dateserial(year(date),bmonth,bday)
end if
nbinterval=datediff("d",date,nbirthday)
response.write "<TR bgcolor="&tablebodycolor2&"><TD align=middle><FONT color=#004080>"&htmlencode(rs(1))&"</FONT></TD>"&_
"<TD align=middle class=novdn><FONT color=#004080>"&rs("birthday")&"</FONT></TD><TD align=middle nowrap>"
if nbinterval=0 then
response.write "<img src=images/cake.gif alt=祝"&datediff("yyyy",rs("birthday"),date)&"岁生日快乐!>"
elseif cint(bmonth)=cint(month(date)) and cint(bday)>cint(day(date)) then
response.write "<font color=brown>"&nbinterval&"</font>"
else
response.write "<font color=#004080>"&nbinterval&"</font>"
end if
response.write "</TD><td>"
if rs("wish")<>"" and not isnull(rs("wish")) then
response.write "<img src=images/wish.gif height=18 onmouseover=""popup('"&htmlencode(rs("wish"))&"','"&tablebodycolor2&"')"" onmouseout=kill()>"
end if
if rs(0)=membername then response.write "<a href=javascript:openScript('mymodify.asp?action=MakeWish',400,300)><IMG SRC=IMAGES/edit2.gif BORDER=0 alt=修改生日愿望></a>"
response.write "</td></TR>"
rs.movenext
loop
set rs=nothing
response.write "</TBODY></TABLE></CENTER></td></tr></table>"
end sub
sub visitclass()
sql="select userid,visitcount,lastvisit,degree,jointime from joinclass where isauditing=false "&_
"and classid="&clsid&" order by visitcount desc"
set rs=conn.execute(sql)
%>
<br><br>
<table border="0" cellpadding="4" cellspacing="1" width="75%" bgcolor="<%=tablebordercolor%>" align="center">
<TR bgcolor=<%=tabletitlecolor%>>
<Td width="100%" valign="middle" align="center" colspan=4>
本班访问情况统计表</Td>
</TR>
<TR bgcolor=<%=tablebodycolor1%>>
<Th width="38%" align=center nowrap>姓 名</Th>
<Th width="22%" align=center nowrap>加入日期</Th>
<Th width="22%" align=center nowrap>访问本班次数</Th>
<Th width="40%" align=center nowrap>最近访问时间</Th>
</TR>
<%
do until rs.eof
%>
<TR bgcolor=<%=tablebodycolor2%>>
<TD align=middle><FONT
color=#004080><%=getrealname(rs(0))%></FONT></TD>
<TD align=middle class=novdn nowrap><FONT
color=#004080><%=datevalue(rs("jointime"))%></FONT></TD>
<TD align=middle><FONT
color=#004080><%=rs("visitcount")%></FONT></TD>
<TD align=middle class=novdn nowrap><FONT
color=#004080><%=rs("lastvisit")%></FONT></TD>
</TR>
<%
rs.movenext
loop
set rs=nothing
%>
</TBODY></TABLE></CENTER>
</td>
</tr>
</table>
<%
end sub
%>
<%call footer%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -