📄 info.asp
字号:
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
MM_paramList = Split(MM_keepMove, "&")
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then
MM_keepMove = MM_keepMove & "&"
End If
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>学生信息查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link rel="stylesheet" href="home.css" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function check1()
{
if(document.form1.StudentNum.value=="")
{
alert("你还没有填学号");
document.form1.StudentNum.focus();
return false;
}
}
function check2()
{
if(document.form2.Name.value=="")
{
alert("你还没有填姓名");
document.form2.Name.focus();
return false;
}
}
</script>
<script language="JavaScript" type="text/JavaScript">
function ChangeClass()
{
var i;
for(i=document.form3.ClassSelect.options.length-1;i>=0;i--)
{
document.form3.ClassSelect.options[i]=null;
}
switch(document.form3.Grade.selectedIndex)
{
case 0:
for(i=0;i<document.Classes.Grade1.options.length;i++)
{
document.form3.ClassSelect.options[i]=new Option(document.Classes.Grade1.options[i].text,document.Classes.Grade1.options[i].value);
}
break;
case 1:
for(i=0;i<document.Classes.Grade2.options.length;i++)
{
document.form3.ClassSelect.options[i]=new Option(document.Classes.Grade2.options[i].text,document.Classes.Grade2.options[i].value);
}
break;
case 2:
for(i=0;i<document.Classes.Grade3.options.length;i++)
{
document.form3.ClassSelect.options[i]=new Option(document.Classes.Grade3.options[i].text,document.Classes.Grade3.options[i].value);
}
break;
}
}
</script>
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<div id="Layer1" style="position:absolute; left:445px; top:220px; width:188px; height:64px; z-index:1; visibility: hidden;">
<form name="Classes" method="post" action="">
<select name="Grade1" id="select">
<option value="All">全级</option>
<%
While (NOT rsGrade1.EOF)
%>
<option value="<%=(rsGrade1.Fields.Item("ClassID").Value)%>"><%=(rsGrade1.Fields.Item("ClassName").Value)%></option>
<%
rsGrade1.MoveNext()
Wend
If (rsGrade1.CursorType > 0) Then
rsGrade1.MoveFirst
Else
rsGrade1.Requery
End If
%>
</select>
<select name="Grade2" id="select2">
<option value="All">全级</option>
<%
While (NOT rsGrade2.EOF)
%>
<option value="<%=(rsGrade2.Fields.Item("ClassID").Value)%>"><%=(rsGrade2.Fields.Item("ClassName").Value)%></option>
<%
rsGrade2.MoveNext()
Wend
If (rsGrade2.CursorType > 0) Then
rsGrade2.MoveFirst
Else
rsGrade2.Requery
End If
%>
</select>
<select name="Grade3" id="Grade3">
<option value="All">全级</option>
<%
While (NOT rsGrade3.EOF)
%>
<option value="<%=(rsGrade3.Fields.Item("ClassID").Value)%>"><%=(rsGrade3.Fields.Item("ClassName").Value)%></option>
<%
rsGrade3.MoveNext()
Wend
If (rsGrade3.CursorType > 0) Then
rsGrade3.MoveFirst
Else
rsGrade3.Requery
End If
%>
</select>
</form>
</div>
<!--#include file="Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD bgcolor="#F2FBF2"><img src="images/InfoQurey_Title.GIF"><br>
<% If Recordset1.EOF And Recordset1.BOF Then %>
<br>
<BR>
<BR>
<BR>
<font color="#FF3399">抱歉!找不到您所寻找的学生记录!</font><BR>
<BR>
<BR>
<BR>
<% End If ' end Recordset1.EOF And Recordset1.BOF %> <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> 查询条件:
<%
if Request("StudentNum")<>"" then
response.write "学号中含有“" & strStudentNum & "”"
elseif strName<>"" then
response.write "姓名中含有“" & strName & "”"
else
if strClass<>"" then strClass=strClass & "班"
response.write "高" & strGrade+1 & "级" & strClass
end if
%>
</td>
<td height="20" valign="middle">共找到 <font color="#FF0000"><%=(Recordset1_total)%></font> 条记录,100条记录/页 </td>
<td height="20" align="right"> <% If MM_offset <> 0 Then %>
<A HREF="<%=MM_moveFirst%>"><img src="images/First.gif" width="43" height="15" alt="首页" border="0" align="absbottom"></A>
<A HREF="<%=MM_movePrev%>"><img src="images/Prev.gif" width="56" height="15" alt="前一页" border="0" align="absbottom"></A>
<% else %>
<img src="images/First.gif" width="43" height="15" alt="首页" align="absbottom" border="0">
<img src="images/Prev.gif" width="56" height="15" alt="上一页" align="absbottom" border="0">
<% End If ' end MM_offset <> 0 %>
<% If Not MM_atTotal Then %>
<A HREF="<%=MM_moveNext%>"><img src="images/Next.gif" width="56" height="15" alt="下一页" border="0" align="absbottom"></A>
<A HREF="<%=MM_moveLast%>"><img src="images/Last.gif" width="43" height="15" alt="尾页" align="absbottom" border="0"></A>
<% else %>
<img src="images/next.gif" width="56" height="15" alt="下一页" align="absbottom" border="0">
<img src="images/Last.gif" width="43" height="15" align="absbottom" border="0" alt="尾页">
<% End If ' end Not MM_atTotal %> </td>
</tr>
</table>
<table cellspacing=0 width="100%" border=1 cellpadding="1" bordercolor="#FFCC00" align="center">
<tr valign="middle">
<td height="25" align="center" nowrap><strong><font color="#000000">
学 号</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
姓名</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
性别</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
民族</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
籍贯</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
政治面貌</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
出生日期</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
入学时间</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
家长姓名</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
联系电话</font></strong></td>
<td height="25" align="center" nowrap><strong><font color="#000000">
家庭住址</font></strong></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<%
txtStudentNum=Recordset1.Fields.Item("StudentNum").Value & ""
txtName=replace(Recordset1.Fields.Item("Name").Value & ""," "," ")
if txtName="" then txtName=" "
txtSex=replace(Recordset1.Fields.Item("Sex").Value & ""," "," ")
if txtSex="" then txtSex=" "
txtFolk=replace(Recordset1.Fields.Item("Folk").Value & ""," "," ")
if txtFolk="" then txtFolk=" "
txtplace=replace(Recordset1.Fields.Item("place").Value & ""," "," ")
if txtplace="" then txtplace=" "
txtPolitics=replace(Recordset1.Fields.Item("politics").Value & ""," "," ")
if txtPolitics="" then txtPolitics=" "
txtBirth=replace(Recordset1.Fields.Item("Birthday").Value & ""," "," ")
if txtBirth="" then txtBirth=" "
txtEnrollment=replace(Recordset1.Fields.Item("enrollment").Value & ""," "," ")
if txtEnrollment="" then txtEnrollment=" "
txtHousemaster=replace(Recordset1.Fields.Item("housemaster").Value & ""," "," ")
if txtHousemaster="" then txtHousemaster=" "
txtTelnum=replace(Recordset1.Fields.Item("TelNum").Value & ""," "," ")
if txtTelnum="" then txtTelnum=" "
txtHouseAddress=replace(Recordset1.Fields.Item("HouseAddress").Value & ""," "," ")
if txtHouseAddress="" then txtHouseAddress=" "
%>
<tr valign="middle">
<td height="20" align="center" nowrap><%=txtStudentNum%></td>
<td height="20" align="center" nowrap><%=txtName%></td>
<td height="20" align="center" nowrap><%=txtSex%></td>
<td height="20" align="center" nowrap><%=txtFolk%></td>
<td height="20" align="center"><%=txtplace%></td>
<td height="20" align="center" nowrap><%=txtPolitics%></td>
<td height="20" align="left" nowrap><%=txtBirth%></td>
<td height="20" align="center" nowrap><%=txtEnrollment%></td>
<td height="20" align="center" nowrap><%=txtHousemaster%></td>
<td height="20" align="center" nowrap><%=txtTelnum%></td>
<td height="20" align="left"><%=txtHouseAddress%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table><br>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
<TABLE width="100%" border=1 cellPadding=5 cellSpacing=0 bordercolor="#FFCCFF">
<TBODY>
<TR>
<TD vAlign=top> <b>继续查询其他学生信息</b> <table width="300" border="0" cellspacing="0" cellpadding="5">
<form Name="form1" onSubmit="return check1()" action="Info.asp" method="post">
<tr>
<td width="80" align="right" nowrap>按学号查询:</td>
<td width="150"> <input name="StudentNum" type="text" id="StudentNum" size="18" maxlength="8"></td>
<td> <input type="submit" name="Submit1" value="查询"></td>
</tr>
</form>
<form Name="form2" onSubmit="return check2()" action="info.asp" method="post">
<tr>
<td width="80" align="right" nowrap>按姓名查询:</td>
<td width="150"> <input type="text" name="Name" maxlength="8" size="18"></td>
<td> <input type="submit" name="Submit2" value="查询"></td>
</tr>
</form>
<form Name="form3" action="info.asp" method="post">
<tr>
<td width="80" align="right" nowrap>按班级查询:</td>
<td width="150" nowrap> <select name="Grade" onChange="ChangeClass()">
<option value="0" selected>2004</option>
<option value="1">2005</option>
<option value="2">2006</option>
</select>
<select name="ClassSelect">
<option value="All" selected>全级</option>
<%
While (NOT rsGrade1.EOF)
%>
<option value="<%=(rsGrade1.Fields.Item("ClassID").Value)%>"><%=(rsGrade1.Fields.Item("ClassName").Value)%></option>
<%
rsGrade1.MoveNext()
Wend
If (rsGrade1.CursorType > 0) Then
rsGrade1.MoveFirst
Else
rsGrade1.Requery
End If
%>
</select></td>
<td> <input type="submit" name="Submit3" value="查询"></td>
</tr>
</form>
</table></TD>
<TD><b>注:</b> <br>
1、可从学号、姓名或班级三种查询方法任选其一进行查询。<br> <font color="#FF0000">2、支持模糊查询!</font><br>
例如:<br> 在学号查询框中输入2004,则查询结果为学号中包含“2004”的学生<br>
在姓名中输入“陈”,则查询结果为姓名中包含有“陈”的学生 </TD>
</TR>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="footer.asp"-->
</BODY>
</HTML>
<%
Recordset1.Close()
%>
<%
rsGrade1.Close()
Set rsGrade1 = Nothing
%>
<%
rsGrade2.Close()
Set rsGrade2 = Nothing
%>
<%
rsGrade3.Close()
Set rsGrade3 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -