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

📄 chengjisearch.asp

📁 设计学校管理系统的成绩模块
💻 ASP
字号:
<%@ Language=VBScript %>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<script language="javascript">

</script>
</head>
<body background=images/netbkgnd.gif>
 <!-- #include virtual="./admin/include/title.html"-->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">
<%
Sub School()

dim conn, sql,Res

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../dbf/school.mdb")

sql="select * from school"
set Res=server.createobject("adodb.recordset")

Res.open sql,conn,1,3
 
	response.write "<option value=" & Res("sFenxiao") & ">" & Res("sName") & "</option>" 
 
Res.close
conn.close
   
End Sub

%>

      
</table> 
<table align=center width="90%" border="0" cellpadding="0" cellspacing="0">        
  <tr>        
    <td></td>        
  </tr>  
   <tr>        
    <td></td>        
  </tr>       
  <tr >        
    <hr width="100%" color="royalblue" size="4">
  </tr>       
</table>       

<%
dim seaUserName
dim seaPassWord
dim sIn
dim sClass
dim sban
dim sFenxiao
Dim TempStr 
seaUserName=Request.Form("seaUserName")
seaPassWord=Request.Form("seaPassWord")
sIn=Request.Form("sIn")
sClass=Request.Form("sClass")+Request.Form("sban")
sFenxiao=Request.Form("sFenxiao")
dim conn2,connstr2
Set conn2 = Server.CreateObject("ADODB.Connection")
connstr2="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../dbf/成绩.mdb")
conn2.Open connstr2

dim sql2,Res2
sql2="select * from chengji where "
If seaUserName<> "" Then
   sql2 = sql2 & " sName='"&seaUserName&"'"
    TempStr = " and "
End If
If seaPassWord <> "" Then
    sql2 = sql2& TempStr & "sId='"&seaPassWord&"'"
    TempStr = " and "
End If
If  sIn <> "" Then
    sql2 = sql2 & TempStr & "sIn='"&sIn&"'"
    TempStr = " and "
End If
If  sClass  <> "" Then
    sql2= sql2 & TempStr & "sClass='"&sClass&"'"
    TempStr = " and "
End If
If sFenxiao <> "" Then
    sql2 = sql2 & TempStr & "sFenxiao='"&sFenxiao&"'"
    TempStr = " and "
End If 
If seaUserName="" and seaPassWord="" and sIn="" and sClass="" and sFenxiao="" Then
response.write"请输入查询条件"
response.end
End If
set Res2=server.createobject("adodb.recordset")
Res2.open sql2,conn2,1,1
If  Res2.eof Then
%>	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
	<table align="center" BORDER="0" cellSpacing="1" cellPadding="1" width="95%">
<tr>
<td>
<TABLE align="center" WIDTH=90% BORDER=0 CELLSPACING=1 CELLPADDING=1>
<TR>
<td>
<font face="宋体" style="FONT-SIZE: larger" color="navy"><strong>
   目前数据库里没有您需要的信息</strong></font>
    </td>
    </tr>
    </table>
</td>
</tr>
<tr>
<td>
<TABLE align="center" WIDTH=90% BORDER=0 CELLSPACING=1 CELLPADDING=1>
<TR>
	<TD><a href="chengjichaxun.asp">返回</a></TD>
</TR>
</TABLE>

</td>
</tr>
</table>
	<%
	else 
%>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<table align="center" BORDER="0" cellSpacing="1" cellPadding="1" width="95%">
<tr>
<td>
<TABLE align="center" WIDTH=90% BORDER=0 CELLSPACING=1 CELLPADDING=1>
<TR>
<td>
<strong><font face="宋体" style="font-size: larger" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;学员</font></strong><font face="宋体" style="FONT-SIZE: larger" color="navy"><strong>成绩信息如下:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
共有</strong></font> 
<input type="text" name="T1" size="5"value='<% =Res2.RecordCount%>'><font face="宋体" style="FONT-SIZE: larger" color="navy"><strong>条记录</strong></font></td>
    </tr>
    </table>
</td>
</tr>
<tr>
<td>
  <div align="center">
  <table BORDER="1" cellSpacing="1" width="70%" bordercolor="#0066FF">
	<tr>
	<td width="160" align="left" height="28"><font size="2" color="DarkRed">学员学号</font></td>
	<td width="160" align="left" height="28"><font size="2" color="DarkRed">学员姓名</font></td>
	<td width="121" align="left" height="28"><font size="2" color="DarkRed">所在班级</font></td>
	<td width="400" height="28"><font size="2" color="#8B0000">所在分校</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩1</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩2</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩3</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩4</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩5</font></td>
	<td width="80" align="left" height="28"><font size="2" color="DarkRed">成绩6</font></td>
	
	<td width="56" height="28"><font color="DarkRed" size="2">管理</font></td>
	</tr>
	<% for i=1 to Res2.RecordCount %>	
	<tr>
	<td width="160" height="30" align="left"><font size="2" color="DarkRed"><%=Res2("sId")%></font></td>
	<td width="160" align="left"><font size="2" color="DarkRed"><%=Res2("sName")%></font></td>
	<td width="121" align="left"><font size="2" color="DarkRed"><%=Res2("sClass")%></font></td>
	<td width="400"><font size="2" color="#8B0000"><%=SchoolName(Res2("sFenxiao"))%></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark1")%>"></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark2")%>"></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark3")%>"></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark4")%>"></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark5")%>"></font></td>
	<td width="80" align="left"><font size="2" color="DarkRed"><input id=text1 style="WIDTH: 35; HEIGHT: 25" size=18 name=eName value="<%=Res2("sRemark6")%>"></font></td>
			
			<td width="56" align="justify" height="26">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input TYPE="button" style="color:MidnightBlue" onclick="location.href=&quot;deletechengji.asp?id=<%=Res2("sId")%>&quot;" value="删除" id="BUTTON1" name="BUTTON2">&nbsp; </td>
	</tr>
		<% Res2.MoveNext()
		next%>
		
</table>
	</div>
</td>
</tr>
<tr>
<td height="25">
<TABLE align="center" WIDTH=90% BORDER=0 CELLSPACING=1 CELLPADDING=1>
<TR>
	<TD>&nbsp;&nbsp;
	<p><a href="chengjichaxun.asp">返回</a></TD>
</TR>
</TABLE>

</td>
</tr>
</table>
<% end if %>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<%
Sub School()

dim conn, sql,Res

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../dbf/school.mdb")

sql="select sName from school where sId='" & Res2("sFenxiao") & "'"

set Res=server.createobject("adodb.recordset")

Res.open sql,conn,1,3

	response.write "" & Res("sName") & "" 

Res.close
conn.close
   
End Sub

%>


</body>
</html>

⌨️ 快捷键说明

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