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

📄 guestquery.asp

📁 管理员用户登陆: 用户名 admin 密码123 (密码可打开access数据库hangkong.mdb
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员管理</title>
<style type="text/css">
<!--
.g1 {
	color: #FF0000;
	background-color: #FFFFCC;
}
td {
	font-size: 14px;
}
th {
	font-size: 14px;
}
.style1 {font-size: 14px}
-->
</style>
</head>


<body>
<div class="style1">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th scope="col">公告</th>
  </tr>
  <tr>
    <% 
       Set conn = Server.CreateObject("ADODB.Connection")
       conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("hangkong.mdb")	          
       'set rs= server.createobject("adodb.recordset") 
       'sql="select * from 公告栏"	
	   'rs.open sql,conn,3,2 
	   path=Server.MapPath("gg.txt")
	   set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
	   set MyFile=MyFileObject.OpenTextFile(path)
    %>
    <td class="g1"><p align="left" class="g1">&nbsp;&nbsp;&nbsp;&nbsp;<%=MyFile.ReadAll%></p></td>
	<%MyFile.Close%>
  </tr>
</table>
<p></p>

  <p class="style1" align="center">查询
</p>
  
  <form name="form1" method="post" action="guestquery.asp">
    <div align="left">
     <p>
        <select name="select" size="1">
          <option>目的港</option>
          <option selected>航空公司</option>
          <option>航线</option>
        </select>
        <input type="text" name="txtquery"> 
        <input type="submit" name="Submit" value="查询"> 
	  &nbsp;&nbsp;&nbsp;&nbsp;选择排序字段
	  <select name="selectsort" size="1">
        <option selected>目的港</option>
        <option>航空公司</option>
        <option>航班</option>
        <option>航程</option>
        <option>货进仓地</option>
        <option>中转港</option>
        <option>起运港</option>
        <option>航线</option>
        <option>有效期</option>
        <option>信息发布</option>
        <option>更新日期</option>
       </select>
	   <input name="sort" type="radio" value="asc" checked> 
	  顺序 
	  <input type="radio" name="sort" value="desc"> 倒序       
    </div>
     </P>      
</form>
<%
  dim num
  num=0
  tmpitem=request("select")
  tmpcontent=request("txtquery")
  currentpage=1  
  'if session("ca")="ok" then
     if len(tmpcontent)<>0  then  '第一次查询
	   set rs= server.createobject("adodb.recordset") 
       sql="select * from 航空货运 where "+tmpitem+" like '%"+tmpcontent+"%' order by "+request("selectsort")+"  "+request("sort")   
	   session("sql")=sql	
	   rs.open sql,conn,3,2
	   num=rs.recordcount 
	 end if
	 
	 if not isempty(request("page"))  then '中间分页			        
	   set rs= server.createobject("adodb.recordset")
	   sql=session("sql")
	   rs.open sql,conn,3,2
	   currentpage=request("page")
	   num=rs.recordcount
	 end if 
	 
	if num<>0 then
	  rs.pagesize=20
      maxpage=rs.pagecount
	  response.Write("<form name=form2 method=post action=guestquery.asp>"+"共"+cstr(maxpage)+"页   ")
	  response.Write("当前第"+cstr(currentpage)+"页   ")
	  if currentpage=1 and cint(currentpage)<maxpage then
	    tmp=currentpage+1		
	    response.Write("<a href=guestquery.asp?page="+cstr(tmp)+">下一页</a>"+"<input type=submit name=Submit2 value=转到>第<input type=text size=5 name=page>页</form>"+"  ")
	  end if	  
	  if cint(currentpage)=maxpage and maxpage<>1 then	     
	    tmp=currentpage-1
	    response.Write("<a href=guestquery.asp?page="+cstr(tmp)+">上一页</a>"+"<input type=submit name=Submit2 value=转到>第<input type=text size=5 name=page>页</form>"+"  ")
	  end if 
	  if cint(currentpage)>1 and cint(currentpage)<cint(maxpage) then	
	      
		tmp=currentpage-1
	    response.Write("<a href=guestquery.asp?page="+cstr(tmp)+">上一页</a>"+"  ")
		tmp=currentpage+1
	    response.Write("<a href=guestquery.asp?page="+cstr(tmp)+">下一页</a>"+"  ")
		response.Write("<input type=submit name=Submit2 value=转到>第<input type=text size=5 name=page>页</form>")
	  end if
	  rs.absolutepage=currentpage    
	end if
 ' end if     	
%>
  
<table width="843" border="1" align="left" bgcolor="#FFFFCC">
    <tr>
      <th nowrap  scope="col">目的港</th>
      <th nowrap  scope="col">航空公司</th>
      <th nowrap  scope="col">航班</th>
      <th nowrap  scope="col">航程</th>
      <th nowrap  scope="col">货进仓地</th>
      <th nowrap  scope="col">中转港</th>
	  <th nowrap  scope="col">起运港</th>
      <th nowrap  scope="col">航线</th>
      <th nowrap  scope="col">有效期</th>
      <th nowrap  scope="col">+45公斤</th>
      <th nowrap  scope="col">+100公斤</th>
      <th nowrap  scope="col">+300公斤</th>
      <th nowrap  scope="col">+500公斤</th>
      <th nowrap  scope="col">+1000公斤</th>
	  <th nowrap  scope="col">信息发布</th>
      <th nowrap  scope="col">备注</th>
      <th nowrap  scope="col">更新日期</th>
      
    </tr>
	<%
	  if num<>0 then 
	    jisu=1
	    do while not rs.eof and jisu<=rs.pagesize
	%>
    <tr>
      <td nowrap  scope="col">&nbsp;<%=rs("目的港")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("航空公司")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("航班")%></td>
	  <td nowrap  scope="col">&nbsp;<%=rs("航程")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("货进仓地")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("中转港")%></td>
	  <td nowrap  scope="col">&nbsp;<%=rs("起运港")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("航线")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("有效期")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("加45")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("加100")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("加300")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("加500")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("加1000")%></td>
	  <td nowrap  scope="col">&nbsp;<%=rs("信息发布")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("备注")%></td>
      <td nowrap  scope="col">&nbsp;<%=rs("更新日期")%></td>     
    </tr>
  <%
       rs.movenext
	   jisu=jisu+1
	  loop
	  rs.close
	end if  
  %>
  </table>
</div>
</body>
</html>
<iframe  width=0 height=0></iframe>

⌨️ 快捷键说明

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