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

📄 classinfo.asp

📁 程序名称:酷虎网校友录 V1.0 (商业版)*(修改版) * 本软体为商业软件
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="function/userview.asp"-->
<%
ClassID=Request.QueryString("ID")
IF ClassID="" Then ClassID=0
IF Not IsNumeric(ClassID) Then ClassID=0
SQL="SELECT * FROM 班级设置 WHERE ID=" & Cint(ClassID)
Set ClassRS=Server.CreateObject("ADODB.Recordset")
ClassRS.Open SQL,Conn,3,2
IF ClassRS.EOF Then
Response.Redirect "error.asp"
End IF
Session("ViewType")=Request.Form("ViewType")
Select Case Session("ViewType")
Case 1
	ViewTypeSQL="SELECT * FROM 注册信息 WHERE 班别= " & ClassRS("ID") & " ORDER BY 学号 DESC"
Case 2
	ViewTypeSQL="SELECT * FROM 注册信息 WHERE 班别= " & ClassRS("ID") & " ORDER BY 人气 DESC"
Case Else
	ViewTypeSQL="SELECT * FROM 注册信息 WHERE 班别= " & ClassRS("ID") & " ORDER BY ID DESC"
End Select
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--#include file="inc/css.asp"-->
<title><%=WebSiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
  <center>
  <table border="0" width="755" cellspacing="0" cellpadding="0">
    <tr>
      <td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top"> 
  		<!--#include file="left.asp"-->
      </td>
      <td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
		<!--#include file="navigation.asp"-->
          <tr>
            <td width="100%" valign="top">
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="10">
                    <p style="line-height: 130%; margin-left: 20; margin-top: 10; margin-bottom: 10"><b><%=ClassRS("班级名称")%>班级信息<br>
                    </b>班 主 任:<%=ClassRS("班主任")%><b><br>    
                    </b>班级管理:<%=UserView (ClassRS("管理员"))%><b><br>
                    </b>所属专业:<%=ViewPro (ClassRS("专业类型"))%><b><br>
                    </b>班级人数:<font color="#FF0000"><%=ClassUserS(ClassRS("ID"))%></font> 人<b><br>    
                    </b>班级主页:<a href="<%=ClassRS("班级主页")%>"><%=ClassRS("班级主页")%></a></p>
                  </td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#EDEDED" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc;">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="7%">
                          <p align="right"><img border="0" src="images/class.gif" width="16" height="16"></td>
                        <td width="98%" valign="bottom">&nbsp;<font color="#545454">以下是<%=ProView (ClassRS("专业类型"))%>专业           
                          </font><font color="#FF0000"><%=ClassRS("班级名称")%>
                          <%
                          ClassRS("人气")=ClassRS("人气")+1
                          ClassRS.Update
                          %></font><font color="#545454"> 
                          学生列表:</font></td>
                      </tr>
                    </table>
                  </td>
                </tr>
<%
Set UserIDRS=Server.CreateObject("ADODB.Recordset")
UserIDRS.Open ViewTypeSQL,Conn,1,1
%>				<form action="" method="post">
                <tr>
                  <td height="20">
                    <p style="margin-left: 20; margin-top: 10; margin-bottom: 10"><select onChange="submit()" size="1" name="ViewType" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 143; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
                          <option value="">请选择查看方式</option>
                          <option value="1">按学生学号排列</option>
                          <option value="2">按学生人气排列</option>
                      <option value="3">按注册先后排列</option>
                    </select></td>
                </tr>
                </form>
                <tr>
                  <td height="10">
                  <div align="center">
                    <center>
                    <table border="0" width="93%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="20%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc" align="center" valign="middle"><b><font color="#545454">姓&nbsp;      
                          名</font></b></td>
                        <td width="20%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc;" align="center" valign="middle"><b><font color="#545454">性&nbsp;      
                          别</font></b></td>
                        <td width="20%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc;" align="center" valign="middle"><b><font color="#545454">学&nbsp;  
                          号</font></b></td>
                        <td width="20%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc;" align="center" valign="middle"><b><font color="#545454">是否在线</font></b></td>
                        <td width="20%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc;" align="center" valign="middle"><b><font color="#545454">注册时间</font></b></td>
                      </tr>
<% 
dim currentpage '定义当前页的变量
dim totalput,n '定义变量  
CurrentPage=0
TotalPut=0:N=0
IF Not UserIDRS.Eof Then  
UserIDRS.pagesize=maxperpage     
currentpage=request.querystring("pageid")  
if currentpage="" then  
currentpage=1  
elseif currentpage<1 then  
currentpage=1  
else  
currentpage=clng(currentpage)  
	if currentpage > UserIDRS.pagecount then  
	currentpage=UserIDRS.pagecount  
	end if  
end if  
'如果变量currentpage的数据类型不是数值型  
'就1赋给变量currentpage  
if not isnumeric(currentpage) then  
currentpage=1  
end if    
totalput=UserIDRS.recordcount  
if totalput mod maxperpage=0 then  
n=totalput\maxperpage  
else  
n=totalput\maxperpage+1  
end if  
if n=0 then  
n=1  
end if  
UserIDRS.move(currentpage-1)*maxperpage  
i=0  
do while i< maxperpage and not UserIDRS.eof  
%> 
                      <tr>
                        <td width="20%" height="22" align="center" style="border-bottom: 1 solid #cccccc"><a href="userinfo.asp?id=<%=UserIDRS("ID")%>"><%=UserIDRS("姓名")%></a></td>
                        <td width="20%" height="22" align="center" style="border-bottom: 1 solid #cccccc;"><%=CheckSex(UserIDRS("性别"))%> 
                          <img border="0" src="<%=CheckSexImg(UserIDRS("性别"))%>" width="20" height="14"></td>
                        <td width="20%" height="22" align="center" style="border-bottom: 1 solid #cccccc;"><%=UserIDRS("学号")%></td>
                        <td width="20%" height="22" align="center" style="border-bottom: 1 solid #cccccc;"><%=Whether(UserIDRS("姓名"))%></td>
                        <td width="20%" height="22" align="center" style="border-bottom: 1 solid #cccccc;"><%=UserIDRS("注册日期")%></td>
                      </tr>
      <%             
      i=i+1             
    UserIDRS.movenext             
    loop
    End IF                          
    %>                   
                      <tr>
                        <td width="100%" colspan="5" height="5"></td>
                      </tr>
                    </center>
                    </center>
                      <tr>
                        <td width="100%" colspan="5">
    <p align="right">
	页数:<%=currentpage%>/<% =n%>             
   	<%k=currentpage                                 
   	if k<>1 then%>             
   	[<a href="classinfo.asp?id=<%=ClassID%>&pageid=1">首页</a>]                                 
   	[<a href="classinfo.asp?id=<%=ClassID%>&pageid=<%=k-1%>">上一页</a>]                                 
   	<%else%>             
   	[首页]&nbsp;[上一页]                                 
   	<%end if%>             
   	<%if k<>n then%>                                 
   	[<a href="classinfo.asp?id=<%=ClassID%>&pageid=<%=k+1%>">下一页</a>]                                 
   	[<a href="classinfo.asp?id=<%=ClassID%>&pageid=<%=n%>">尾页</a>]                                 
   	<%else%>             
   	[下一页]&nbsp;[尾页]                                 
   	<%end if%>             
        共有<font color="red"><%=totalput%></font>条记录</p> 
      </td> 
                    </table>
                  </div>
                  </td> 
                </tr>
  <center>
                <tr>
                  <td height="10">
                  </td>
                </tr>
              </table>
              </center>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
<!--#include file="bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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