⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myclassinfo.asp

📁 功能非常完整的校友录
💻 ASP
字号:
<%response.expires=0%>
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="const.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<!--#INCLUDE FILE="checkuser.asp" -->
<!--#INCLUDE FILE="theme.asp" -->
<html><head>
<title><%=SchoolmateName%>——班级首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="txl.css" type="text/css" rel="stylesheet">
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 leftmargin=0  bgColor="<%=bodycolor%>">

<%

on error resume next
call isjoinclass(1)

if request("action")="visitcount" then
	call visitclass()
else
	call main()
end if

call endconnection()

if err then response.write err.description

sub main()

dim rs
set rs=conn.Execute("Select * from class where classid="&clsid)
classname=rs("classname")
regdate=rs("regdate")
homepage=rs("homepage")
visitcount=rs("visitcount")
enyear=rs("enyear")
creatorid=rs("creator")
adminid=rs("admin")
studcount=rs("studcount")
pronouncement=rs("pronouncement")


if adminid<>"" then 
admin=getrealname(adminid)
else 
admin="空缺"
end if

creator=getrealname(creatorid)


set rs=conn.Execute("Select realname,isadmin,point from student where userid='"&membername&"'")
username=rs(0)
isadmin=rs(1)
point=rs(2)
%>

<!--#INCLUDE FILE="script/popup.inc" -->

<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0><TBODY>
  <TR>
    <TD vAlign=top align=middle width=100%><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY><TR vAlign=top><TD width=160><IMG height=29 
            src="images/welcome.gif" width=148> </TD>
           <td width=30></td>
<TD valign=middle>
<%=htmlencode(username)&"("&htmlencode(membername)&")"%>,欢迎你! 
</TD></TR>
        <TR>
          <TD  vAlign=middle colSpan=3 height=30>您是&nbsp;<font color=#cc0000><%=htmlencode(classname)%></font>&nbsp;的第<font color=#cc0000><b><%=visitcount%></b></font>位访问者,您目前的积分是<font color=#cc0000><b><%=point%></b></font>分。 
            </TD></TR> 
        <TR> 
          <TD  vAlign=top width=153 height=24 colspan=3>身份:<%
if isadmin=0 then 
response.write "班级成员" 
elseif isadmin=1 then
response.write "班级管理员"
elseif isadmin=3 then
response.write "系统管理员"
end if
%></TD> 

</TR> 
</TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY>
        <TR>
          <TD vAlign=top height=40><IMG height=40 
            src="images/class_notice.gif" 
      width=510></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY><tr><td align=center>:::::::欢迎大家在<%=schoolmatename%>落户!::::::::<br><br></td></tr>
        <TR>
          <TD class=mp 
            vAlign=top>我们的家园靠我们自己建设,各位同学一定要常来做客,让我们来共同建设好我们的网上新家园!<br>希望大家在同学会玩得开心!如果您在使用上有什么不清楚的地方,请您参看<A 
            target=_blank 
            href="help.asp">帮助文件</A>,或者向我们<a href=mailto:<%=systememail%>>询问</a>!<BR><%call remindbirthday()%><br><img src=images/pronouncement.gif>&nbsp;&nbsp;
			<%if pronouncement<>"" then 
			response.write pronouncement 
			else response.write "教我们青春的从前,漂流在四方的痴心少年,让我们心碎的时间,看我们万水千山走遍! "
			end if%></TD></TR></TBODY></TABLE><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY>
        <TR>
          <TD vAlign=top height=40><IMG height=40 
            src="images/class_info.gif" 
width=510></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY>
        <TR> 
          <TD vAlign=bottom width="50%" height=22>班级名称:<%=htmlencode(classname)%></TD> 
          <TD vAlign=bottom width="50%" colSpan=2 height=18>入学年份:<%=htmlencode(enyear)%></TD></TR> 
        <TR> 
          <TD vAlign=bottom width="50%" height=18>注册日期:<%=regdate%></TD> 
          <TD vAlign=bottom width="50%" colSpan=2 height=18>班级创始人:<a target=_blank href="profile.asp?name=<%=htmlencode(creatorid)%>&action=showdetail"><%=htmlencode(creator)%></a></TD></TR> 

        <TR>
          <TD vAlign=bottom width="50%" height=18>班级成员:<FONT 
            color=#cc0000><B><%=studcount%></B></FONT> [<A class=6  
            href="classmate.asp">查看</A>]</TD> 
          <TD vAlign=bottom width="50%" height=18 colspan=2>本校教师:<FONT  
            color=#cc0000><B><%=teachercount%></B></FONT> [<A class=6  
            href="TeacherList.asp">查看/添加</A>]</TD> 
          </TR> 
        <TR> 
          <TD vAlign=bottom width="50%" height=18>现任管理员:<%if admin<>"空缺" then%><a target=_blank href="profile.asp?name=<%=htmlencode(adminid)%>&action=showdetail"><%=htmlencode(admin)%></a><%end if%></TD> 
          <TD vAlign=bottom width="50%" colSpan=2 height=18>附加通信录:<FONT  
            color=#cc0000><B><%=appendcount%></B></FONT> [<A class=6  
            href="AppendList.asp">查看/添加</A>]</TD></TR> 
        <TR> 
          <TD vAlign=bottom width="50%" height=18>本班最新加入成员:<a target=_blank href="profile.asp?name=<%=htmlencode(newstud)%>&action=showdetail"><%=getrealname(htmlencode(newstud))%></a> </TD><td colspan=2>班级主页:<a href="<%=htmlencode(homepage)%>"><%=htmlencode(homepage)%></td></TR> 
        <TR> 
          <TD vAlign=bottom colSpan=3 height=18>当前在线成员:</TD></TR>
<%call waitpassmember()%>	  
	  </TBODY></TABLE><BR> 
	   
<%call top5list()%>	  
</TD></TR></TBODY></TABLE> <br>
</BODY></HTML> 

<%
set rs=nothing

end sub

sub remindbirthday()

	set tmprs=conn.Execute("select userid,realname,bir_year from [student] where  isadmin<>3 and bir_month='"&cstr(month(date))&"' and bir_day='"&cstr(day(date))&"' and status=false and classid="&clsid)
	if tmprs.eof then exit sub

	blist=""
	age=cint(year(date))-cint(tmprs("bir_year"))
	do until tmprs.eof
			blist=blist&"<a href=profile.asp?action=showdetail&name="&tmprs("userid")&" target=_blank  onmouseout=kill() onmouseover=popup('祝"&age&"岁生日快乐!','"&tablebodycolor2&"')>"&tmprs("realname")&"</a>&nbsp;&nbsp;"
		tmprs.movenext
	loop
	response.write "<br>今天本班过生日的同学:<font color=#cc0000>"&blist&"</font><br>"
end sub

sub waitpassmember()
dim wlist,tmprs
on error resume next
set tmprs=conn.execute("select realname,userid from [student] where status=true and classid="&clsid)
if tmprs.eof then exit sub

wlist=""
do until tmprs.eof
wlist=wlist&"<a href=profile.asp?action=showdetail&name="&htmlencode(tmprs("userid"))&" target=_blank  onmouseout=kill() onmouseover=popup('查看"&htmlencode(tmprs("realname"))&"的个人信息!','"&tablebodycolor2&"')>"&htmlencode(tmprs("realname"))&"</a>&nbsp;&nbsp;"
tmprs.movenext
loop

 

response.write "<tr><TD vAlign=bottom colspan=3 height=18>未通过审核成员:"&wlist&"</td></TR>"

end sub




function teachercount()
	set rs=conn.Execute("select count(id) from [teacher]")
	teachercount=rs(0)
end function

function appendcount()
	set rs=conn.Execute("select count(id) from [append] where classid="&clsid)
	appendcount=rs(0)
end function

function newstud()
	set rs=conn.Execute("select top 1 userid from [student] where isadmin<>3 and  classid="&clsid&" and status=false order by studid desc")
if not rs.eof then
	newstud=rs(0)
else
	newstud=""
end if

end function

sub top5list()
%>
<TABLE cellSpacing=0 cellPadding=0 width=510 border=0><TBODY> 
<TR> 
	<TD vAlign=top height=40><IMG height=40 src="images/paihang.gif" width=510></TD>
</TR>
</TBODY></TABLE> 
<TABLE cellSpacing=0 cellPadding=0 width=510 border=0><TBODY> 
<TR height=22> 
	<TD width=130>成员TOP5</TD> 
	<TD width=100>| 访问次数</TD> 
	<TD width=100>| 注册身份</TD> 
	<TD width=180>| 最后一次访问时间</TD>
</TR> 
<TR> 
	<TD bgColor=#b4c7d4 colSpan=4 height=1></TD>
</TR>
</TBODY></TABLE> 
<%
sql="select top 5 realname,visitcount,isadmin,lastlogin from [student] where isadmin<>3 and status=false and classid="&clsid
set rs=conn.Execute(sql)

do until rs.eof
	%>
	<TABLE cellSpacing=0 cellPadding=0 width=510 border=0> 
	<TBODY> 
	<TR vAlign=bottom> 
	<TD width=130 height=18><%=htmlencode(rs("realname"))%></TD> 
	<TD align=left width=100>&nbsp;&nbsp;<%=rs("visitcount")%></TD> 
	<TD align=left width=100>&nbsp;&nbsp;<%if rs("isadmin")=0 then%>成员<%else%>管理员<%end if%></TD> 
	<TD width=180>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -