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

📄 search_userad.asp

📁 职业培训学校学生档案成绩费用管理系统V1.0免费版.rar
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" then
	response.write "您无此权限"
	response.end
end if

dim rQuery,sQuery,i,qName,rs,sql,query(26)
set rQuery=server.createobject("adodb.recordset")
sQuery="select top 1 * from st_info"
rQuery.open sQuery,conn,1,1 

sql="select * from st_info where "
for i=1 to 25
  qName=rQuery.fields(i).name
  query(i)=trim(request.form(qName))
  if query(i)<>""then
     sql=sql&qName&" = '"&query(i)&"' and "
  end if
next

rQuery.close
set rQuery=nothing

sql=left(sql,len(sql)-5)

if request("sql")<>empty then
   sql=request.form("sql")
end if

set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>高级查询结果</title>
<link rel="stylesheet" href="style.css">

<script language="JavaScript">
function turnpage(i) {
  document.frm.page.value=i;
  document.frm.submit();
}
</script>
</head>

<body>
<!--#include file="top.asp"-->
<p>
<form method="post" action="search_userad.asp" name="frm">
<input type="hidden" name="sql" value="<%=sql%>">
<input type="hidden" name="page">
<div align="center">
<%
if not(rs.bof and rs.eof) then
   NumRecord=rs.recordcount
   rs.pagesize=13
   NumPage=rs.Pagecount
   if request("page")=empty  then 
	  NoncePage=1
   else if Cint(request("page"))<1 then
	  NoncePage=1
   else
	  NoncePage=request("page")
   end if
   
   if Cint(Trim(request("page")))>Cint(NumPage) then 
	  NoncePage=NumPage
   end if
end if

%>
<table border="1" width="800" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
            <tr>
              <td width="100%" colspan="9">
                <p align="center">查看学生详细信息</td>
            </tr>
          <tr>
            <td width="71" bgcolor="#EBE9FE" align="center">学号</td>
            <td width="78" bgcolor="#EBE9FE" align="center">姓名</td>
            <td width="65" bgcolor="#EBE9FE" align="center">性别</td>
            <td width="78" bgcolor="#EBE9FE" align="center">班级</td>
			<td width="250" bgcolor="#EBE9FE" align="center">所报专业</td>
            <td width="110" bgcolor="#EBE9FE" align="center">毕业时间</td>
            <td width="110" bgcolor="#EBE9FE" align="center">家庭电话</td>
            <td width="50" bgcolor="#EBE9FE" align="center">删除</td>
          </tr>
<%
if Not(rs.bof and rs.eof) then
	rs.move (Cint(NoncePage)-1)*13,1
	for i=1 to rs.pagesize
%>

          <tr>
            <td width="71" align="center"><%=rs("user_number")%></td>
            <td width="78" align="center"><a href=query.asp?user_number=<%=rs("user_number")%>><%=rs("user_name")%></a></td>
            <td width="65" align="center"><%=rs("user_sex")%></td>
            <td width="78" align="center"><%=rs("user_class")%></td>
            <td width="250" align="center"><%=rs("user_major")%></td>
            <td width="110" align="center"><%if isnull(rs("out_time")) then%>未交费 <% else %> <%=rs("out_time")%> <%end if%></td>
            <td width="110" align="center"><%=rs("user_homephone")%></td>
            <td width="50" align="center"><a href=javascript:if(confirm('确实要删除吗?'))location='delete_info.asp?id=<%=rs("id")%>'>删除</td>
          </tr>

		                <%		
 rs.movenext
    if rs.eof then 
	    exit for
    end if
  next%>		  </table>
<% rs.close
set rs=nothing

if NoncePage>1 then
%>
|<input type="button" value="首 页" onclick=turnpage(1)>| |<input type="button" value="上一页" onclick=turnpage(<%=NoncePage-1%>) >|&nbsp
<%else%>
|首 页| |上一页|&nbsp
<%
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
%>
|<input type="button" value="下一页" onclick=turnpage(<%=NoncePage+1%>)>| |<input type="button" value="尾 页" onclick=turnpage(<%=NumPage%>) >|
<%else
%>	|下一页| |尾 页|
<%
end if				

%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font> 
共<font color="#0033CC"><%=NumRecord%></font>条记录 
    <%

end if
else
	%>
   <table border="1" width="500" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
   <tr>
      <td width="100%" colspan="5"><marquee>没有您所查找的学生</marquee></td>
    </tr>
	  </table>
<%
end if
%>
</div><p>
<!--#include file="down.asp"-->
</form>
</body>

</html>

⌨️ 快捷键说明

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