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

📄 find().asp

📁 原代码学生信息管理系统(原代码)不够的的话我给原程序 QQ3810091
💻 ASP
字号:
<%@ language=vbscript %>
<!--#include file="conn.asp"-->
<%
response.buffer=true
%>
<%


myjl=request("myjl")

key = request.form("key")
topic=request.form("topic")
if  key="" then
response.write"<script language='javascript'>" 
		 response.write"alert('您没有输入查询关键词!');" 
		 response.write"history.go(-1);"
		 response.write"</script>" 
		 response.end
end if

if topic="0"then
sql="SELECT * from cxb where xh like '%"&key&"%' or xm like '%"&key&"%' or jtdz like '%"&key&"%'or s like '%"&key&"%'or zybj like '%"&key&"%'" 
end if
if topic="1" then
sql="SELECT * from cxb where xh like '%"&key&"%'" 
end if
if topic="2" then
sql="SELECT * from cxb where xm like '%"&key&"%'" 
end if
if topic="3" then
sql="SELECT * from cxb where jtdz like '%"&key&"%'" 
end if
if topic="4" then
sql="SELECT * from cxb where s like '%"&key&"%' " 
end if
if topic="5" then
sql="SELECT * from cxb where zybj like '%"&key&"%' "
end if

set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,3
if rs.eof then	
		response.write"<script language='javascript'>" 
		 response.write"alert('对不起,没有找到你输入的内容!');" 
		 response.write"history.go(-1);"
		 response.write"</script>" 
		 response.end
end if
	
total=rs.recordcount

%>
<html>
<head>
<title>找到<%=total%>条记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="config.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="bg01.gif" topmargin="0">
<div id="Layer1" style="position:absolute; width:780px; height:35px; z-index:1; left: 11px; top: 8px">
  <script language=JavaScript>
var mylocation="main.htm"
var winheight=100
var winsize=100
var x=5
function go(){
win2=window.open("","","scrollbars")
win2.location=mylocation
if (!document.layers&&!document.all){
win2.location=mylocation
return}
win2.resizeTo(100,100)
win2.moveTo(0,0)
go2()}
function go2(){
if (winheight>=screen.availHeight-3)
x=0
win2.resizeBy(5,x)
winheight+=5
winsize+=5
if (winsize>=screen.width-5){
win2.location=mylocation
winheight=100
winsize=100
x=5
return}
setTimeout("go2()",50)
}
</script>
  <div align=left> 
    <table cellpadding=0 class=coolBar id=toolbar1 
style="LEFT: 0px; POSITION: relative; TOP: 0px; Z-INDEX: 99" width="100%">
      <tbody> 
      <tr> 
        <td class=coolButton onClick=javascript:history.back()><nobr><img 
      height=12 src="001a.gif" width=20>后退</nobr></td>
        <td></td>
        <td class=coolButton 
    onClick="window.open('gly.asp', '_self')"><nobr><img 
      height=16 src="c1.gif" width=16>系统管理员</nobr> </td>
        <td class=coolButton 
    onClick="window.open('gly1.asp', '_self')"><nobr><img 
      height=16 src="c1.gif" width=16>校级管理员</nobr> </td>
        <td class=coolButton 
    onClick="window.open('xgmm15.asp', '_self')"><nobr><img height=16 
      src="c1.gif" width=16>班级管理员</nobr> </td>
        <td class=coolButton 
    onClick="window.open('gwsckxs.asp', '_self')"><nobr><img height=16 
      src="002.gif" width=16>学生修改密码</nobr> </td>
        <td class=coolButton 
    onClick="window.open('gwsckxs1.asp', '_self')"><nobr><img height=16 
      src="c2.gif" width=16>学生留言</nobr></td>
        <td class=coolButton onClick=javascript:history.forward()>前进<nobr><img 
      height=12 src="001.gif" width=20></nobr></td>
      </tr>
      </tbody> 
    </table>
  </div>




</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="form1" method="post" action="find.asp">
  <font face="华文行楷" size="6" color="#FF0000"> 浏览查询窗口</font>
<p>
        <font color="#0066FF"><b>共找到<font color=red><%=total%></font>条符合您要求的记录</b> 
        </font>
</center>


<%
Response.Write("<center>")


	Response.Write("<table border=1 cellpadding=1 cellspacing=1>")
	Response.Write("<tr bgcolor=aaaaaa style='color:black;'>")
	Response.Write("<td align=center>编号</td>")
	Response.Write("<td align=center><a  href='index.asp?jlh=1&myjl="&myjl&"'>学号</a></td>")
	Response.Write("<td align=center><a  href='index.asp?jlh=2&myjl="&myjl&"'>姓名</a></td>")
	Response.Write("<td align=center>性别</td>")
	Response.Write("<td align=center><a  href='index.asp?jlh=3&myjl="&myjl&"'>部门或专业</a></td>")
	Response.Write("<td align=center><a  href='index.asp?jlh=4&myjl="&myjl&"'>班级名称</a></td>")
	Response.Write("<td align=center><a  href='index.asp?jlh=5&myjl="&myjl&"'>家庭住址</a></td>")
    Response.Write("<td align=center>查看详情</td></tr>")













do while not rs.eof
i=i+1
xh=rs("xh")
xm=rs("xm")
xb=rs("xb")
s=rs("s")
zybj=rs("zybj")
jtdz=rs("jtdz")
If sColor = "silver" Then
		sColor = "#cccccc"
	Else
		sColor = "silver"
	End If
   	Response.Write("<tr bgcolor='" & sColor & "'>")	 
%>
<td align=center><font color="red"><%=i%></font> </td>
    <td align=center><%=xh%> </td>
    <td align=center><%=xm%> </td>
 <%
    if xb="男" then
    	 %>
<td align=center><font color="red"><%=xb%></font></td>
	<%
else
	 %>
    	<td align=center><font color="green"><%=xb%></font></td>
<%
end if
 %>

    <td align=center><%=s%> </td>
    <td align=center><%=zybj%> </td>
    <td align=center><%=jtdz%> </td>
    	    <td align=center>
    <a href="#" onClick="window.open('gwslyckxs.asp?xh=<%=xh%>&zybj=<%=zybj%>', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,height=650,left=0,top=0')">
    <font color="blue">查看详情</font></a></td></tr>
   

    
    
 
<%
rs.movenext
loop
Response.Write("</table><br>") 
Response.Write("</center>")
%>


  <!--#include file="nnz.asp"-->







<table width="100%" border="0" align="center">
    <tr>
      <td> 
        <div align="center">
          <select name="topic">
            <option value="1">按学号搜</option>
            <option value="2">按姓名搜</option>
            <option value="3">按家庭住址搜</option>
            <option value="4">按部门或专业搜</option>
            <option value="5">按班级名称搜</option>
               <option value="0" selected>智能搜索</option>
            
          </select>
          关键词: 
          <input type="text" name="key" size="20">
          <input type="submit" name="Submit2" value="搜索">
        </div>
      </td>
    </tr>
  </table>
</form>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
    

   </BODY>
</HTML>

⌨️ 快捷键说明

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