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

📄 search_result_name.asp

📁 一个修改过的ASP学籍管理系统,用javascript+ado写的
💻 ASP
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="verifyTeacher.asp"-->
<%
var StudentName;
var StudentRs;
var i;
var j;
var start;
var end;
var flag;
StudentName=Request("StuName");
Session("flag")=20;
Session("StudentRs")=Server.CreateObject("ADODB.Recordset");
Session("StudentRs").ActiveConnection=Conn;
Session("StudentRs").Source="SELECT studentNo,name,collegeId,professionId FROM student WHERE name='"+StudentName+"'";
Session("StudentRs").CursorLocation=3;
Session("StudentRs").Open();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查找结果显示</title>
<!--#include file="link.asp"-->
	<style type="text/css">
		body{
		text-align:center;
		}
	</style>
</head>
<body>
<!--#include file="top.asp"-->
<%
if(!Session("StudentRs").EOF)
  {
   Response.Write("<table border='1' width='760' cellPadding=0 cellSpacing=0 bgcolor='#FFCCFF' borderColor='#111111' borderColorDark=#0072b3 borderColorLight=#0072b3 style='BORDER-COLLAPSE: collapse'>");
   Response.Write("<tr>");
   Response.Write("<td width='50' height='20'><div align=center><font size='2' color='#ff0000'>序号</font></div></td>");
   Response.Write("<td width='50' height='20'><div align=center><font size='2' color='#ff0000'> 学号</font></div></td>");
   Response.Write("<td width='50' height='20'><div align=center><font size='2' color='#ff0000'>姓名</font></div></td>");
   Response.Write("<td width='50' height='20'><div align=center><font size='2' color='#ff0000'>学院</font></div></td>");
   Response.Write("<td width='50' height='20'><div align=center><font size='2' color='#ff0000'>专业</font></div></td>");
   Response.Write("<td width='110' height='20'>"+"<div align=center><font size='2' color='#ff0000'>操作</font></div>"+"</td>");
   Response.Write("</tr>");
   Session("start")=Session("StudentRs").AbsolutePosition;
   for(j=0;j<=Session("flag")-1;j++)
       {
	        Response.Write("<tr bgcolor='#ffffff'>");
			Response.Write("<td width='50' height='20'><div align=center><font size='2'>"+Session("StudentRs").AbsolutePosition+"</font></div></td>");
			Session("end")=Session("StudentRs").AbsolutePosition;
			for(i=0;i<=Session("StudentRs").Fields.Count-1;i++)
			    {
				    Response.Write("<td width='150' height='20'><div align=center><font size='2'>"+Session("StudentRs")(i).Value+"</font></div></td>");
				}
            Response.Write("<td width='110' height='20'><div align=center><a target='_blank' href='showStudent.asp?studentNo="+Session("StudentRs")(0).Value+"'><font size='2'>详情</font></a><font size='2'>||</font><a target='_blank' href='search_score_result.asp?studentNo="+Session("StudentRs")(0).Value+"'><font size='2'>成绩</font></a></div></td>");
			Response.Write("</tr>");
			Session("StudentRs").MoveNext;
			if(Session("StudentRs").EOF)
			   {
			       Session("StudentRs").MovePrevious;
				   break;
			   }
		}
   Response.Write("<tr>");
   Response.Write("<td width='760' colspan='6' height='20'>");
   Response.Write("</td>");
   Response.Write("</tr>");
   Response.Write("</table>");
   Session("StudentRs").MoveFirst;
   %>
   <!--#include file="turn_pages.asp"-->
   <%
   }
else
   {
	   Response.Write("<div align=center><font size=6 color='#ff0000'>对不起!数据库中没找到您所需要的数据!</font></div>");
	   Session("StudentRs").Close();
	   Conn.Close();
	   Session("StudentRs")=null;
	   Conn=null;
   }
%>
</body>
</html>

⌨️ 快捷键说明

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