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

📄 fly_city.asp

📁 机票预定系统 各个模块的设计-ticket reservation systems detailed design system modules of the design
💻 ASP
字号:
<!--#include file="include/conn.asp"-->
<!--#include file="CheckSystem.asp"-->
<%
checkmanager(session("ManagerName"))'调用函数,验证管理员是正常登陆
if trim(request("action"))="delete" then
k=request("deleteid")
'response.write k
'response.end
deleteid=split(request("deleteid"))
for i=0 to ubound(deleteid)
deleteid(i)=replace(deleteid(i),",","")
sql="delete from city where CityCode = '"&deleteid(i)&"'"
conn.execute(sql)
next
action=""
msg_ok="群组删除成功!id共"&i&"个,分别是"&k
end if
'-----------------以上是册除代码
%>
<%
SearchFiled=request("SearchFiled")
SearchKey1=request("SearchKey1")
'----------------以上是搜索代码
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理机票系统</title>
<link href="include/css.css" rel="stylesheet" type="text/css">
</head>
<script>
function call(){
//添加记录或修改记录时所跳转的页面
window.location.href="Fly_city_mod.asp";
return false;
}
function dele(){
//删除记录所用的函数
if(!confirm('已经确认需要删除选中的信息吗?')) return false;
ZXLform.submit();
}
function sltall(){
var nn=self.document.all.item("deleteid");
for(j=0;j<nn.length;j++){
self.document.all.item("deleteid",j).checked=true;
  }
}
function escall(){
var nn=self.document.all.item("deleteid");
for(j=0;j<nn.length;j++){
self.document.all.item("deleteid",j).checked=false;
  }
}
function CheckSearchForm()
{
//检索记录所用的验证函数
if(FrmSearch.SearchFiled.value=="CityCode" || FrmSearch.SearchFiled.value=="City"){
				if(FrmSearch.SearchKey1.value==""){
				alert('对不起,搜索内容不能为空,请重新填写');
				return false;
				}
			}
		}
</script>
<body>
<TABLE width="100%" cellPadding=0 cellSpacing=1 class="attbg">
<form name="FrmSearch" action="Fly_city.asp" method="post">
  <TR align="left">
    <td height="30" bgcolor="#C3E7F9" > &nbsp;&nbsp;&nbsp;&nbsp;检索:&nbsp; 
	<select name="SearchFiled">
		<option value="CityCode">按城市代号</option>
        <option value="City">按城市名称</option>
     </select>&nbsp;&nbsp;
     <input type="text"  name="SearchKey1" value='<%=SearchKey1%>'> &nbsp;&nbsp;
	 <input name="Submit" type="submit" value=" 搜  索 "></td>
    </TR>
</form>
</TABLE>
<TABLE width="100%" cellPadding=0 cellSpacing=1 bgcolor="#CCCCCC">
	  <form name="ZXLform" action="Fly_city.asp" method="post">
          <TR>
            <TD height="30" bgcolor="#EEEEEE" class="tdtitle"><strong>城市代号</strong></TD>
            <TD width="13%" bgcolor="#EEEEEE" class="tdtitle"><strong> 国家名称 </strong></TD>
            <TD bgcolor="#EEEEEE" class="tdtitle"><strong>城市名称</strong></TD>
            <TD width="18%" bgcolor="#EEEEEE" class="tdtitle"><strong>机场名称</strong></TD>
            <TD width="14%" bgcolor="#EEEEEE" class="tdtitle"><strong>航线</strong></TD>
            <TD width="21%" bgcolor="#EEEEEE" class="tdtitle"><strong>航线说明</strong></TD>
            <TD width="7%" bgcolor="#EEEEEE" class="tdtitle"><strong>操作</strong></TD>
          </TR>
	<%
	dim szSQL
    set oRst=Server.CreateObject("AdoDb.recordset")
	szSQL="select * from city order by  CityCode desc"
	if SearchFiled="CityCode" and SearchKey1<>"" then
	szSQL="select * from city where CityCode like '%"&SearchKey1&"%' order by  CityCode desc"
	end if
	if SearchFiled="City" and SearchKey1<>"" then
	szSQL="select * from city where  CityName like '%"&SearchKey1&"%' order by  CityCode desc"
	end if
	'----------------以上是搜索代码
	oRst.Open szSQL,conn,1,1
		'--------------------分页
		if oRst.eof then
			response.write("当前没有记录,请单击<a href='Fly_city_mod.asp'>[添加]</a>")
			response.end
		else
		if request.QueryString("pageno")="" then
			pageno=1
		else
			pageno=cint(request.QueryString("pageno"))
		end if
		recordcounts=oRst.recordcount
		pagesiz=15
		oRst.pagesize=15
		pagecounts=oRst.pagecount
		if pageno<1 then
 			pageno=1
 		end if
 		if pageno>pagecounts-1 then
			pageno=pagecounts
 		end if
		oRst.absolutepage=pageno
            i=0
			while not oRst.eof  and pagesiz>0			
                i=i+1
                bc="bgcolor='#eff3f7'"
                if i mod 2=0 then bc="bgcolor='#FFFFFF'"
				CityCode=oRst("CityCode")
                CityName=oRst("CityName")
				EnglishName=oRst("EnglishName")
				Country=oRst("Country")
				Province=oRst("Province")
				AirPortName=oRst("AirPortName")
				EngAirPortName=oRst("EngAirPortName")
				AirPortText=oRst("AirPortText")
				AirPortRoute=oRst("AirPortRoute")
				updatetime=oRst("updatetime")
				
		  %>
          <TR <%=bc%> >
            <TD width="9%" height="25" align=center><a href="Fly_city_mod.asp?CityCode=<%=CityCode%>"><%=CityCode%> </a> </TD>
            <TD height="25" title="<%=EnglishName%>"><%=Province%></TD>
            <TD width="18%" title="<%=Country%>"><%=CityName%></TD>
            <TD title="<%=EngAirPortName%>"><%=AirPortName%></TD>     
            <TD align="center"><%=left(AirPortRoute,6)%></TD>
            <TD><%=left(AirPortText,9)%></TD>
            <TD align="center" ><input name="deleteid" type="checkbox" id="deleteid" value="<%=CityCode%>">            </TD>
          </TR>
          <%
			oRst.MoveNext
			pagesiz=pagesiz-1
			wend
		end if
		%>
        <TR bgColor=#EEEEEE>
          <td height="30" colspan="8">
             <input type="button" name="AddnewBunk" onClick="javascript:call();" value="添加城市">
             <input type="hidden" name="action" value="delete">
             <input name="button" type="button" onClick="return dele()" value="删除">
    <a href onClick="sltall()" onMouseDown="sltall()">全选</a><a href onClick="escall()" onMouseDown="escall()">/全不选</a>&nbsp;&nbsp;共有<span style="color:red;"><%=recordcounts%></span>条;每页显示<font style="color:red;">15</font>条;转到第
                  <select name="select" id="pa" onChange="window.location.href='Fly_city.asp?SearchFiled=<%=SearchFiled%>&SearchKey1=<%=SearchKey1%>&pageno='+document.all.pa.value;">
                    <% for i=1 to pagecounts 
		  if i=pageno then
		  response.write("<option value="&i&" selected>"&i&"</option>")
		  else
		  response.write("<option value="&i&">"&i&"</option>")
		  end if
		 next
		%>
         </select>
                  页</td>
        </TR>
      </form>
</TABLE>
</body>
</html>

⌨️ 快捷键说明

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