📄 classlist.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="function/userview.asp"-->
<!--#include file="function/messagecount.asp"-->
<%
Session("ProViewType")=""
Session("ProViewType")=Request("ProViewType")
IF Session("ProViewType")="" Then Session("ProViewType")=0
IF Session("ProViewType")=0 Then
ProViewTypeSQL="SELECT * FROM 班级设置"
Else
ProViewTypeSQL="SELECT * FROM 班级设置 WHERE 专业类型=" & Session("ProViewType") & " ORDER BY ID DESC"
End IF
%>
<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="66%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="66%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<form action="" method="get">
<tr>
<td height="10">
<p style="margin-top: 10; margin-bottom: 10">
<select size="1" onchange="submit()" name="ProViewType" 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>
<%
SQL="Select * From 专业设置"
Set ProRS=Server.CreateObject("ADODB.Recordset")
ProRS.Open SQL,Connstr,1,1
DO While Not ProRS.EOF
%>
<option value="<%=ProRS("ID")%>">查看<%=ProRS("专业名称")%>的班级</option>
<%
ProRS.MoveNext
Loop
%>
</select></p>
</td>
</tr>
</form>
<%
Set ClassRS=Server.CreateObject("ADODB.Recordset")
ClassRS.Open ProViewTypeSQL,Connstr,1,1
%>
<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"> <font color="#545454">您现在浏览的是</font><font color="#FF0000"><%=ProView(Session("ProViewType"))%>专业</font><font color="#545454">下的班级信息:</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="10"> 班级名称:</td>
</tr>
<tr>
<td height="10">
<hr align="center" width="90%" color="#EDEDED" size="1">
</td>
</tr>
<%
dim currentpage '定义当前页的变量
dim totalput,n '定义变量
CurrentPage=0
Totalput=0:N=0
IF Not ClassRS.EOF Then
'const maxperpage=20 '定义每一页显示的数据记录的常量
ClassRS.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > ClassRS.pagecount then
currentpage=ClassRS.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
totalput=ClassRS.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
ClassRS.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not ClassRS.eof
%>
<tr>
<td height="10">
<p style="line-height: 200%; margin-left: 20">
·<a href="classinfo.asp?id=<%=ClassRS("ID")%>"><%=ClassRS("班级名称")%>
</a> <%=ProView(ClassRS("专业类型"))%>
专业 人数:<font color="#FF0000"><%=ClassUserS(ClassRS("ID"))%>
</font> 班主任:<%=ClassRS("班主任")%>
</td>
</tr>
<tr>
<td height="10">
<hr align="center" width="90%" color="#EDEDED" size="1">
</td>
</tr>
<%
ClassRS.MoveNext
I=I+1
Loop
End IF
%>
<tr>
<td height="10"></td>
</tr>
<tr>
<td height="10"> <p align="right"> <%k=currentpage
if k<>1 then%><a href="classlist.asp?ProViewType=<%=Request("ProViewType")%>&pageid=1<%IF Request("active")="myself" Then%>&active=myself<%End IF%>">第一页</a><font color="#990000">|</font><a href="classlist.asp?ProViewType=<%=Request("ProViewType")%>&pageid=<%=k-1%><%IF Request("active")="myself" Then%>&active=myself<%End IF%>">上一页</a><%else%>第一页<font color="#990000">|</font>上一页<%end if%><font color="#990000">|</font><%if k<>n then%><a href="classlist.asp?ProViewType=<%=Request("ProViewType")%>&pageid=<%=k+1%><%IF Request("active")="myself" Then%>&active=myself<%End IF%>">下一页</a><font color="#990000">|</font><a href="classlist.asp?ProViewType=<%=Request("ProViewType")%>&pageid=<%=n%><%IF Request("active")="myself" Then%>&active=myself<%End IF%>">尾 页</a><%else%>下一页<font color="#990000">|</font>尾 页<%End IF%> </td>
</tr>
</table>
<p>
</td>
<td width="34%" style="border-left: 1 solid #000000" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" >
<%IF Session("User")<>"" Then%>
<%
SQL="SELECT * FROM 注册信息 WHERE 姓名='"& Session("User") &"'"
Set UserRS=Server.CreateObject("ADODB.Recordset")
UserRS.Open SQL,Conn,1,1
If UserRS.Eof Then
Response.Redirect "error.asp"
End IF
%>
<tr>
<td height="205" valign="middle"><!--#include file="function/personal.asp"--></td>
</tr>
<%Else%>
<tr>
<td height="90"><!--#include file="function/info1.asp"--></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="12%">
<p align="right"><img border="0" src="images/den.gif"></td>
<td width="86%" valign="bottom"> <font color="#FF0000"><b>登录校友录首页</b></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="95">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<form action="logon.asp" method="post">
<tr>
<td width="32%" align="right" valign="bottom">
<p style="margin-top: 5">姓名:</p>
</td>
<td width="68%">
<p style="margin-top: 5"><input type=text name="Name" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 106; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></p>
</td>
</tr>
<tr>
<td width="32%" align="right" valign="bottom">密码:</td>
<td width="68%"><input type=password name="Password" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 106; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center" style="margin-top: 3; margin-bottom: 3"><INPUT type=submit value=' 登 录 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 69; border: 1px groove #000000; background-position: 0% 50%">
<INPUT type=reset value=' 取 消 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 69; border: 1px groove #000000; background-position: 0% 50%"></td>
</tr>
</form>
<tr>
<td width="100%" colspan="2">
<p align="center" style="margin-top: 3; margin-bottom: 3"><a href="forgetpassword.asp">忘记密码了怎么办?</a></td>
</tr>
</table>
</td>
</tr>
<%End IF%>
<tr>
<td bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" valign="middle">
<p align="right"><img border="0" src="images/top.gif"></td>
<td width="88%" valign="bottom"> <font color="#545454">最新信息发布
TOP4</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="74">
<p style="line-height: 150%; margin-left: 5; margin-top: 2; margin-bottom: 2"><!--#include file="function/infotop4.asp"--></td>
</tr>
<tr>
<td width="100%" bgcolor="#EDEDED" height="25" style="border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="12%">
<p align="right"><img border="0" src="images/top.gif"></td>
<td width="88%"> <font color="#545454">最新真情祝福
TOP4</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="74">
<p style="line-height: 150%; margin-left: 5; margin-top: 2; margin-bottom: 2"><!--#include file="function/wishtop4.asp"--></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="middle" colspan="2" style="border-top: 1 solid #000000;" bgcolor="#EDEDED" height="27">
<p style="margin-top: 5" align="center">
<%
dim userip,userip2
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
userip2 = Request.ServerVariables("REMOTE_ADDR")
if userip = "" then
response.write "您的真实IP 是:"&userip2&","
else
response.write "您的真实IP 是:"&userip&","
end if
response.write usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),2)&","&usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),1)
%>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -