?? chengjisearch.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> </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> </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"> 學員</font></strong><font face="宋體" style="FONT-SIZE: larger" color="navy"><strong>成績信息如下:
共有</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"> <input TYPE="button" style="color:MidnightBlue" onclick="location.href="deletechengji.asp?id=<%=Res2("sId")%>"" value="刪除" id="BUTTON1" name="BUTTON2"> </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>
<p><a href="chengjichaxun.asp">返回</a></TD>
</TR>
</TABLE>
</td>
</tr>
</table>
<% end if %>
<p> </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 + -