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

📄 manageextratax.asp

📁 机票预定系统 各个模块的设计-ticket reservation systems detailed design system modules of the design
💻 ASP
字号:

<!--#include file="include/conn.asp"-->
<%
	dim szSQL
    set oRst=Server.CreateObject("AdoDb.recordset")
    SearchFiled=request("SearchFiled")
    SearchKey1=trim(request("SearchKey1"))
    SearchKey2=trim(request("SearchKey2"))
	op="1" 'INetOrderForm
	dim strSql,page
	if SearchFiled<>"" and (SearchKey1<>"" or searchKey2<>"") then 
	   if SearchFiled="constracteTax" then
		 strSql=" where constracteTax like "&trim(SearchKey1)
	   elseif SearchFiled="city" then
		 code1=ReCityCode(SearchKey1)
		 code2=ReCityCode(SearchKey2)
		 if code1="未知" and code2="未知" then 
		 response.write "<script language='Javascript'>alert('找不到"&SearchKey1&SearchKey2&"的编号,该燃油附加费将默认为40元。');window.history.back(-1);</script>"
		 response.end
		 end if
		 if code1="未知" or code2="未知" then 
         strSql=" where [航段] like '%"&code1&"%' or [航段] like '%"&code2&"%'"
		 else
         strSql=" where [航段]='"&code1&code2&"' or [航段]='"&code2&code1&"'"
		 end if
	   else
		 code1=SearchKey1
		 code2=searchKey2
         
		strSql=" where [航段] like '%"&Ucase(code1&code2)&"%' or [航段] like '%"&Ucase(code2&code1)&"%'"

	   end if
	 end if
	 '--------------------------------------------

If Request.QueryString("Page") = "" or isnull(Request.QueryString("Page")) then
   Page = 1
Else
   Page = CINT(Request.QueryString("Page"))
End If
szSQL="select * from Taprice "&strSql&" order by updatetime desc"
    oRst.Open szSQL,conn,1,3
if oRst.recordcount>0 then
	 oRst.pagesize=15
	 maxPageCount=oRst.pageCount
     oRst.AbsolutePage=page
     if page>maxPageCount then page=maxPageCount
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理机票系统</title>
<link href="RLimages\user.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
	/////Edited by zhouxiaolong

function CheckShow(){
if (FrmSearch.SearchFiled.value=="constracteTax") {
	document.getElementById("mySearchKey1").innerHTML="价格<input type='text' name='SearchKey1'>";
	document.getElementById("mySearchKey2").style.display="none";
	}
else
	{document.getElementById("mySearchKey1").innerHTML="城市1<input type='text' name='SearchKey1'>";
	 document.getElementById("mySearchKey2").style.display="";
	}
}
function call(htmlurl){
window.location.href=htmlurl;
return false;
}
function goUrl()
	{
		var iPage;
		iPage=document.ZXLform.txtPage.value;

		if(isNaN(iPage))
		{
			iPage=1;
		}
		var theUrl;
		theUrl="manageExtraTax.asp?SearchKey1=<%=SearchKey1%>&page="+iPage+"&SearchFiled=<%=SearchFiled%>&SearchKey2=<%=SearchKey2%>";
		if(theUrl=="manageExtraTax.asp?page=")
		{
theUrl="manageExtraTax.asp?SearchKey1=<%=SearchKey1%>&page=1&SearchFiled=<%=SearchFiled%>&SearchKey2=<%=SearchKey2%>";
		}
		window.location.href=theUrl;
	}
//-->
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<!--include file="index_top.asp"-->
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top" bgcolor="E8F4FF" style="border-left:1px solid #3290F0;border-right:1px solid #3290F0;border-bottom:1px solid #DDDDDD">
	<!--#include file="left.htm" --></td>
    <td width="633" align="right" valign="top">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!-- <tr> 
    <td height="25" style="font-size:9pt"><strong>燃油附加费管理</strong><hr size="1"></td>
    </tr>-->
		<script language="javascript">
		function CheckSearchForm()
		{
			if(FrmSearch.SearchFiled.value=="CityCode" || FrmSearch.SearchFiled.value=="city"){
				if(FrmSearch.SearchKey1.value=="" && FrmSearch.SearchKey2.value==""){
				alert('城市1或城市2为空,请重新填写');
				return false;
				}
			}
		
		}
		</script>
		<form name="FrmSearch" action="manageExtraTax.asp" method="post" onsubmit="return CheckSearchForm()">
        <tr> 
          <td height="34" align="center" bgcolor="#3592F1" class="b-14"> <strong><span class="back-12">检索:</span></strong> 
            <select name="SearchFiled" onChange="javascript:CheckShow();">
              <option selected value="">类别选择</option>
              <option value="CityCode">按城市三字代码查询</option>
              <option value="city">按城市名称查询</option>
              <option value="constracteTax">按价格查询</option>
            </select>
            <!--  <input type="text" name="SearchKey">  -->
            <span id="mySearchKey1">城市1
            <input type="text" style="width:100px" name="SearchKey1"></span>
			<span id="mySearchKey2">城市2
			<input type="text" name="SearchKey2" style="width:100px"></span>
			<input name="Submit" type="submit" class="w-14" value=" GO "> 
          </td>
        </tr>
		</form>
</table>
      <TABLE width=621 border=0 cellPadding=0 cellSpacing=1 bgcolor="#999999" id=TABLE1 style="FONT-SIZE: 9pt">
	  <form name="ZXLform" action="manageExtraTax.asp" method="post">
        
          <TR bgColor=#C3E7F9>
            <TH height="30">序号</TH>
            <TH height="30"> 城市1</TH>
            <TH> 城市2</TH>
            <TH>燃油附加费</TH>
            <TH>更新时间</TH>
            <TH height="30">操作</TH>
          </TR>
		  <%
            i=0
			do while not oRst.eof 			
                i=i+1
                bc="bgcolor='#eff3f7'"
                if i mod 2=0 then bc="bgcolor='#FFFFFF'"
				'if oRst("ifActive")="1" then ifActiveStr="checked"
				flyCode=oRst("航段")
				FcityCode=left(flyCode,3)
				Fcity=Recity(FcityCode)
				ScityCode=right(flyCode,3)
                Scity=Recity(ScityCode)
				price=oRst("constracteTax")
				updatetime=oRst("updatetime")
		  %>
          <TR <%=bc%>> 
            <TD width="74" height="25" align=center>
			<%=i%>
			</TD>
            <TD width="147" height="25" align=center><a href="#" onclick="javascript:call('ExtraTax_add.asp?flyCode=<%=flyCode%>');"><%=Fcity&"("&FcityCode&")"%></a></TD>
            <TD width="155"><div align="center"><a href="#" onclick="javascript:call('ExtraTax_add.asp?flyCode=<%=flyCode%>');"><%=Scity&"("&ScityCode&")"%></a></div></TD>
            <TD width="96" height="25"><div align="center"><%=price%></div></TD>

            <TD width="96" height="25" align="center"><%=updatetime%></TD>
            <TD width="46" align="center"><input type="checkbox" name="<%=flyCode%>" value="OFF">
			</TD>
          </TR>
			<%
			oRst.MoveNext
			if i=oRst.pagesize then exit do
			loop
			%>
   <input type="hidden" name="Myaction" value="">
      
<TR bgColor=#EEEEEE>
            <TH height="30" colspan="6">
			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="38%" height="30">
				  &nbsp;&nbsp;
				  <input type="button" name="AddnewBunk" onclick="javascript:call('ExtraTax_add.asp');" value="添加燃油附加费">
                  <input type="submit" name="Submit" onclick="javascript:ZXLform.Myaction.value='delete'" value="删除">
               </td>
                <td width="62%">
				<div align="center">
        <%
		strHref="<a href=manageExtraTax.asp?SearchFiled="&SearchFiled&"&SearchKey1="&SearchKey1&"&SearchKey2="&SearchKey2&"&page="
		if page=1 then response.write "<B>首&nbsp;&nbsp;页</B>  |  "
		if page>1 then 
		   response.write strHref & "1><B>首&nbsp;&nbsp;页</B></a>  |  "
		   response.write strHref & page-1 & "><B>前一页</B></a>  |  "
        else
		   response.write "<B>前一页</B>  |  "
        end if
		if page<maxPageCount then
		   response.write strHref & page+1 & "><B>下一页</B></a>  | "
        else
		   response.write "<B>下一页</B>  |  "
        end if

		if page=maxPageCount then
		   response.write "<B>末&nbsp;&nbsp;页</B>"
        else
		   response.write strHref & maxPageCount & "><B>末&nbsp;&nbsp;页</B></a>"
        end if
		response.write "&nbsp;当前:<font color=red>"  & Page & "</font> / " & maxPageCount & " 页"
		%>
		<INPUT TYPE='text' NAME='txtPage' size='3' maxlength='3'>
		<INPUT TYPE='button' value='页' onclick='goUrl()'>

  </div>
				</td>
              </tr>
            </table></TH>
          </TR>
        </form>
      </table>
    </td>
  </tr>
</table>
<!--include file="bottom.asp"-->
</body>
</html>
<%'response.write request.form("Myaction")&"|"
if request.form("Myaction")="delete" then
	dim n
	if not (oRst.eof or oRst.bof) then	
	oRst.movefirst
	end if
	   do while not oRst.eof
	   n=trim(cstr(oRst("航段")))
	        if request.form(n)="OFF" then
	         oRst.delete
	         oRst.update
	      end if
	   oRst.movenext
	   loop
	   response.redirect "manageExtraTax.asp" 
end if

oRst.close
set oRst=nothing


function ReCity(TempCity)'获取城市名称函数
    set Temprs=server.CreateObject("adodb.recordset")
	sql="select CityName from city where CityCode='"&TempCity&"'"
	Temprs.open sql,conn,3,1
	if not (Temprs.eof or Temprs.bof) then
		ReCity=Temprs("CityName")
	else
	    Recity="未知"
	end if
	Temprs.close
end function

function ReCitycode(TempCity)'获取城市名称函数
    set Temprs=server.CreateObject("adodb.recordset")
	sql="select CityCode from city1 where CityName='"&TempCity&"'"
	Temprs.open sql,conn,3,1
	if not (Temprs.eof or Temprs.bof) then
		ReCitycode=Temprs("CityCode")
	else
	    ReCitycode="未知"
	end if
	Temprs.close
end function
call conn_close()
%>

⌨️ 快捷键说明

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