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

📄 browseclass.asp

📁 酷虎网同学录V1.0
💻 ASP
字号:
<!--#INCLUDE FILE="setup.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<!--#INCLUDE FILE="checkuser.asp" -->
<!--#INCLUDE FILE="theme.asp" -->
<%
dim rs
locat="浏览班级"

if membername="" then
  	errmsg=errmsg+"<br>"+"<li>您还没有<a href=login.asp>登录</a>。"
	call top(1,1)
	call error("Information",errmsg)
else
	bclsid=request("classid")
	if not isinteger(bclsid) then bclsid=0 else bclsid=clng(bclsid)

	set rs=conn.Execute("select * from [class] where classid="&bclsid)
	if rs.eof and rs.bof then
	  	errmsg=errmsg+"<br>"+"<li>您要访问的班级不存在!"
		call top(1,1)
		call error("Exclamation",errmsg)
		set rs=nothing
	else
		if sysadmin then 
			response.redirect "MyClass.asp?ClassID="&bclsid
		else
			call top(1,1)
			call showclassinfo()
		end if
	end if
	set rs=nothing
end if



sub showclassinfo()
creator=rs("creator")
admin1=rs("admin1")
admin2=rs("admin2")

if admin1="" or isnull(admin1) then 
admin1="空缺"
else
admin1="<a href=profile.asp?name="&admin1&">"&admin1&"</a>"
end if

admin1=admin1&"(正)"
if admin2="" or isnull(admin2) then 
admin2="空缺"
else
admin2="<a href=profile.asp?name="&admin2&">"&admin2&"</a>"
end if
admin2=admin2&"(副)"

%>
<!--#INCLUDE FILE="script/popup.inc" -->
<TABLE cellSpacing=1 cellPadding=0 width=100% align=center border=0 bgcolor=<%=bodycolor%>><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>
<%=getrealname(membername)&"["&htmlencode(membername)&"]"%>,欢迎你! 
</TD></TR>
        <TR>
          <TD  vAlign=middle colSpan=3 height=30><font color=#cc0000><%=htmlencode(rs("classname"))%></font>&nbsp;已被访问<font color=#cc0000><b><%=rs("visitcount")%></b></font>次,您的身份:<font color=#cc0000>客人</font>。 
            </TD></TR> 
        <TR> 
          <TD  vAlign=top width=153 height=24 colspan=3></TD> 

</TR> 
</TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=510 border=0>
        <TBODY>
        <TR>
          <TD vAlign=bottom height=40><img src="images/a3.gif" 
      ></TD><td rowspan=2 width="40%"><a href=RegClass.asp?action=Join&scID=<%=bclsid%>><img src=images/add1.gif border=0></a><BR><BR><BR><a href=mailto:<%=systememail%>><img src=images/contact.gif border=0></a></td></TR>
	  <tr><td valign=top><HR size=1 width=90% align=left>
	  <%if rs("pronouncement")<>"" then 
			response.write rs("pronouncement") 
			else response.write "共同度过的生活是灿烂的,也是沉重的。<BR>这份灿烂与沉重也是一种生活 <BR>"&_
			"也是一种记忆<BR>至少它是<BR>至少我认为它是“人生大树”上最红的那一片小叶<BR>"&_
			"虽无百花之香,却有其神<BR>虽小,却有其重<BR>愿与诸君佳人共赏,共识之..."
			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(rs("classname"))%></TD> 
          <TD vAlign=bottom width="50%" colSpan=2 height=18>入学年份:<%=htmlencode(rs("enyear"))%></TD></TR> 
        <TR> 
          <TD vAlign=bottom width="50%" height=18>注册日期:<%=rs("regdate")%></TD> 
          <TD vAlign=bottom width="50%" colSpan=2 height=18>班级成员:<FONT 
            color=#cc0000><B><%=rs("studcount")%></B></FONT></TD></TR> 

        <TR>
          <TD vAlign=bottom width="50%" height=18>班级主页:<a href="<%=htmlencode(rs("homepage"))%>" target="_blank"><%=htmlencode(homepage)%></TD> 
          <TD vAlign=bottom width="50%" height=18 colspan=2>班级创始人:<a target=_blank href="profile.asp?name=<%=htmlencode(creator)%>"><%=htmlencode(creator)%></a></TD> 
          </TR> 
        <TR> 
          <td colspan=3 height=18>现任管理员:<%response.write admin1&"&nbsp;"&admin2%></td></TR> 
<%call waitpassmember()
call onlinemember()%>	  
	  </TBODY></TABLE><BR> 
	   
<%call top5list()%>	 <BR><BR> 
</TD></TR></TBODY></TABLE> <br>
<BR><BR>

<%
set rs=nothing

end sub

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

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

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

end sub

sub onlinemember()
dim wlist,tmprs
'on error resume next
set tmprs=conn.execute("select userid from [online] where userid in (select userid from [joinclass] where isauditing=false and classid="&bclsid&")")
if tmprs.eof then exit sub

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

response.write "<tr><TD vAlign=bottom colspan=3 height=18>当前在线同学:"&olist&"</td></TR>"

end sub



sub top5list()
dim vstrs,vstsql
%>
<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> 
<%
vstsql="select top 5 userid,visitcount,lastvisit,degree from [joinclass] where isauditing=false "&_
"and classid="&bclsid&" order by visitcount desc,lastvisit desc"
set vstrs=conn.Execute(vstsql)

do until vstrs.eof
	%>
	<TABLE cellSpacing=0 cellPadding=0 width=510 border=0> 
	<TBODY> 
	<TR vAlign=bottom> 
	<TD width=130 height=18><%=htmlencode(vstrs(0))%></TD> 
	<TD align=left width=100>&nbsp;&nbsp;<%=vstrs(1)%></TD> 
	<TD align=left width=100>&nbsp;&nbsp;
	<%if vstrs(3)=1 then
		response.write "成员"
	elseif vstrs(3)=7 then
		response.write "副班"
	elseif vstrs(3)=8 then
		response.write "班长"
	end if%>
	</TD> 
	<TD width=180 class=novdn>&nbsp;&nbsp;<%=vstrs(2)%></TD></TR></TBODY></TABLE>
	<%
	vstrs.movenext
loop

end sub
%>

<%call footer%>

⌨️ 快捷键说明

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