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

📄 jsquery1.asp

📁 实训的小作品 关于后台SQL知识的 简单制作!
💻 ASP
字号:
<!--#include file="../data/const.asp"-->
<%
que=request.querystring("que")
if que="1" then
  str1=session("jsstr")
else
  xsmchk=trim(request.form("xsmchk"))
  zcchk=trim(request.form("zcchk"))
  xlchk=trim(request.form("xlchk"))
  xbchk=trim(request.form("xbchk"))
  nlchk=trim(request.form("nlchk"))
  xdxsh=trim(request.form("xdxsm"))
  zc=trim(request.form("zc"))
  xl=trim(request.form("xl"))
  xb=trim(request.form("xb"))
  nl1=trim(request.form("nl1"))
  nl2=trim(request.form("nl2"))
  str1=""
  if xsmchk="on" then
    str1=str1&" 系部编号='"&xdxsh&"' and" 
  end if
  if zcchk="on" then
    str1=str1&" 职称='"&zc&"' and" 
  end if  
  if xlchk="on" then
    str1=str1&" 学历='"&xl&"' and" 
  end if
  if nlchk="on" then
    if isnumeric(nl1) then
	  str1=str1&" 年龄>="&nl1&" and" 
	end if  
	if isnumeric(nl2) then
	  str1=str1&" 年龄<="&nl2&" and"
	end if  	
  end if
  if xbchk="on" then
     str1=str1&" 性别='"&xb&"' and" 
  end if
  str1=trim(str1)
  if str1<>"" then
    str1=left(str1,len(str1)-3)
  end if
  if str1="" then
    str1="select * from 教师信息表视图 order by 系部编号,编号"
  else
    str1="select * from 教师信息表视图 where "&str1&" order by 系部编号,编号 "
  end if		
end if  
session("jsstr")=str1

set rs=server.createobject("adodb.recordset")
rs.open str1,dbconn,1,1
if rs.eof or rs.bof then
%>
  <script language=vbscript>
    msgbox "没有找到教师信息"
	history.back
  </script>
<%
  response.end
end if 
rs.movefirst
rs.pagesize=20
if not Isempty(request("Topage")) then
  if not isnumeric(request("topage")) then 
%>
    <script language=vbscript>
      msgbox "输入了非法页号"
	  history.back
    </script>
<%
    response.end
  end if
  topage=CLng(request("topage"))
  if topage>rs.pagecount then
    rs.absolutepage=rs.pagecount
  else
    if topage<=0 then
      rs.absolutepage=1
    else
      rs.absolutepage=topage	  
    end if
  end if
end if  
intcurpage=rs.absolutepage   
%>

<!--#include virtual="../header.asp" -->
<br>
<table border="0" align="center" width="98%">
  <tr>
    <td>您当前的位置:教师->教师信息查询</td>
  </tr>
</table>  
<table cellspacing="0" bordercolor="#cccccc" bordercolordark="#FFFFFF" align="center" border="1" id="mytable">
<caption><strong>查询结果</strong><br><br>
<%
if intcurpage>1 then
%>	    
  <a href=jsquery1.asp?que=1&topage=<%=1%>>第一页</a>&nbsp;&nbsp;		
  <a href=jsquery1.asp?que=1&topage=<%=intcurpage-1%>>上一页</a>&nbsp;&nbsp;
<%
end if
if intcurpage<rs.pagecount then
 %>
   <a href=jsquery1.asp?que=1&topage=<%=intcurpage+1%>>下一页</a>&nbsp;&nbsp; 
   <a href=jsquery1.asp?que=1&topage=<%=rs.pagecount%>>最后一页</a>&nbsp;&nbsp; 
<%
end if
%>
第<font color=red><%=intcurpage%></font >页/共<font color=red><%=rs.pagecount%></font >页(共<%=rs.recordcount%>条记录)
</caption>
    <tr> 
      <th width="10%"><div align="center">学院</div></th>       
      <th width="12%"><div align="center">系部</div></th> 
      <th width="12%"><div align="center">编号</div></th> 
      <th width="10%"><div align="center">姓名</div></th> 
      <th width="6%"><div align="center">性别</div></th>  
      <th width="14%"><div align="center">出生日期</div></th> 
      <th width="12%"><div align="center">职称</div></th> 
      <th width="12%"><div align="center">学位</div></th> 
      <th width="12%"><div align="center">学历</div></th> 
    </tr>
<%
    for i=1 to rs.pagesize
	    if rs.eof then
		     exit for
      end if
%>
  <tr> 
	  <td div align="center"><%=rs("学院")%>&nbsp;</td>
    <td div align="center"><%=rs("系部")%>&nbsp;</td>
	  <td div align="center"><%=rs("编号")%>&nbsp;</td>
	  <td div align="center"><%=rs("姓名")%>&nbsp;</td>
    <td div align="center"><%=rs("性别")%>&nbsp;</td>
    <td div align="center"><%=rs("出生日期_")%>&nbsp;</td>
	  <td div align="center"><%=rs("职称")%>&nbsp;</td>
	  <td div align="center"><%=rs("学位")%>&nbsp;</td>
	  <td div align="center"><%=rs("学历")%>&nbsp;</td>
  </tr>        
<%    
     rs.movenext
  next
  rs.close
  set rs=nothing  
%>
</table>
<br>
<!--#include virtual="../footer.asp" -->

⌨️ 快捷键说明

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