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

📄 extratax_add.asp

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

<!--#include file="function/conn.asp"-->
<!--#include file="../function.asp"-->
<script language='Javascript' src='js/inland.js'></script>
<%
    if len(session("login_name"))=0 then
%>
<script language="javascript">
    alert("您没有权限访问,请登陆!")
    window.location="index.asp"
</script>

<%response.end 
    end if
  
'response.write
 'response.write "<script language=javascript>alert('"& Request.ServerVariables("HTTP_REFERER")&"');</script>"

	 auto=request("auto")
myActionStr="添加"
'ifActiveStr="checked"
'Num="9"
if auto<>"" then
	 dim szSQL
     set oRst=Server.CreateObject("AdoDb.recordset")
	 szSQL="select * from Taprice where auto="&auto
    oRst.Open szSQL,conn,3,1

	if not(oRst.eof or oRst.bof) then
				flyCode=oRst("航段")
				FcityCode=left(flyCode,3)
				Fcity=Recity(FcityCode)
				ScityCode=right(flyCode,3)
                Scity=Recity(ScityCode)
				price=oRst("tax1")
				'Auto=oRst("Auto")
	end if
myActionStr="更新"
oRst.close
set oRst=nothing
end if
'if num="" then num="9"
'if flyDate="" then flyDate="1"
'if endDatetime="" then endDatetime="1"
'if rebate="" then rebate="特价舱"

%>
<HTML>
<HEAD>
<TITLE>添加燃油附加费</TITLE>
<link href="RLimages\user.css" rel="stylesheet" type="text/css">
<!-- powered By ZhouXiaolong -->
<SCRIPT language=javascript>
function checkinput()
{
    if (form1.price.value=="")
	{
	  alert("燃油附加费价格不能为空!");
	form1.price.focus();
	  return false; 
        }
	
	    if (form1.FCity.value==form1.SCity.value)
	{
	alert("城市1和城市2相同,请重新添加!");
	form1.FCity.focus();
	  return false; 
        }
}   		
</SCRIPT>
<script language="javascript" src="/newjs/calendar.js"></script>
</head>
<body leftmargin="0" topmargin="0">
 <table width="580" border="0" cellspacing="0" cellpadding="0">
<form action="extraTax_add.asp" method="post" name="form1" onsubmit="return checkinput();">
   <tr valign="bottom">
     <td height="70" colspan="3" bgcolor="#EEEEEF"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#0099FF"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
           <tr>
             <td width="31%" height="30" bgcolor="#FFFFFF"><div align="center"></div>               <div align="center">城市1</div></td>
             <td width="34%" bgcolor="#FFFFFF"><div align="center">城市2</div></td>
             <td width="35%" bgcolor="#FFFFFF"><div align="center"></div>               
               <div align="center">燃油附加费</div>               <div align="center"></div></td>
             </tr>
           <tr>

             <td height="30" bgcolor="#FFFFFF"><div align="center">
    <SELECT id=FCity name=FCity size=1 style="width:80;height:19">
	<%if auto<>"" then%>
           <option value="<%=FcityCode%>"><%=Fcity%></option>
		   <%end if%>
		   <script> document.write(citystr);</script>
		   
             </div>               </td>
             <td height="30" bgcolor="#FFFFFF"><div align="center">
    <SELECT id=SCity name=SCity size=1 style="width:80;height:19">
		<%if auto<>"" then%>
		<option value="<%=ScityCode%>"><%=Scity%></option>
		   <%end if%>
           <script> document.write(citystr);</script>
             </div></td>
             <td height="30" bgcolor="#FFFFFF"><div align="center">
             </div>               <div align="center">
                 <input type="text" style="width:80px" name="price" value="<%=price%>">
               </div>             <div align="center">
             </div></td>
             </tr>
         </table></td>
       </tr>
     </table></td>
   </tr>
   <tr>
     <td width="375" height="30" bgcolor="#EEEEEF"><div align="right"><a href="manageExtraTax.asp">&nbsp;&nbsp;返回到前一页&nbsp;&nbsp;</a></div>   </td>
     <td width="193" bgcolor="#EEEEEF"><div align="right">

       <input type="hidden" value="<%=auto%>" name="auto">
       <input type="submit" value="确认" name="addRow">
       <input type="button" value="取消" name="CancelRow"  onClick="javascript:window.close();">
     </div></td>
     <td width="12" bgcolor="#EEEEEF">&nbsp;</td>
   </tr>
   </form>
 </table>
</BODY>
</HTML>
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then

	 FcityCode=trim(data_pro(request.form("FCity")))
	 ScityCode=trim(data_pro(request.form("SCity")))
     if FcityCode=ScityCode then
		response.write "<script language='Javascript'>alert('"&Recity(FcityCode)&"和"&Recity(ScityCode)&"相同!\n不能添加相同城市之间的燃油附加费记录,此次添加失败!');window.history.back(-1);</script>"
		response.end
	 end if
     price=trim(data_pro(request.form("price")))
	 set qrs=server.CreateObject("adodb.recordset")
	 qsql="select * from Taprice where ([航段]='"&Ucase(FcityCode&ScityCode)&"' or [航段]='"&Ucase(ScityCode&FcityCode)&"') and tax1="&price
	 	 qrs.open qsql,conn,1,3
     if not (qrs.eof or qrs.bof) then
		response.write "<script language='Javascript'>alert('"&Recity(FcityCode)&"和"&Recity(ScityCode)&"之间燃油附加费已经存在!\n不能添加重复记录,此次添加失败!');window.history.back(-1);</script>"
		response.end
	 end if
	 if  auto<>"" then
	 qsql=szSQL
	 qrs.close
	 qrs.open qsql,conn,1,3
	 end if

	 if auto="" then
	 qrs.addnew
	 end if
	 'qrs("ID")=Clng(trim(request.form("AtxtID")))
	 qrs("航段")=Ucase(FcityCode&ScityCode) 
	' qrs("ScityCode")=ScityCode
     qrs("Tax1")=price
	 qrs("distance")=distance
	' qrs("Scity")=Scity
	 qrs.update
	 response.write "<script language=javascript>alert('记录已经"&myActionStr&"成功!\n点击确定,继续添加');window.location.href='extraTax_add.asp';</script>"
  	 qrs.close
set qrs=nothing
end if

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 city 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
closeDataBase
%>

⌨️ 快捷键说明

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