📄 manageextratax.asp
字号:
<!--#include file="function/conn.asp"-->
<%login_grade=session("login_grade")
admin_Remark_bak=session("Adm_Remark")
if len(session("login_name"))=0 then
%>
<script language="javascript">
alert("您没有权限访问,请登陆!");
window.location.href="index.asp";
</script>
<%response.end
elseif instr(login_grade,"5")=0 and admin_Remark_bak<>"super" then
%>
<script language="javascript">
alert("您的权限不够,不能访问该页面,请登陆!")
//window.location="index.asp"
window.history.back(-1);
</script>
<%response.end
end if
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
'strSql=" and "
if SearchFiled="Tax1" then
'response.write SearchKey1
strSql=" where tax1 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 Request.QueryString("Page") = 0 then
Page = 1
Else
Page = CINT(Request.QueryString("Page"))
End If
szSQL="select * from Taprice "&strSql&" "
oRst.Open szSQL,conn,1,3
if oRst.recordcount>0 then
oRst.pagesize=20
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=="Tax1") {
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=txtPage.value;
if(isNaN(iPage))
{
iPage=1;
}
var theUrl;
theUrl="manageExtraTax.asp?SearchKey1=<%=SearchKey1%>&page=<%=iPage%>&SearchFiled=<%=SearchFiled%>&SearchKey2=<%=SearchKey2%>";
if(theUrl=="default.asp?page=")
{
theUrl="manageExtraTax.asp?SearchKey1=<%=SearchKey1%>&page=1&SearchFiled=<%=SearchFiled%>&SearchKey2=<%=SearchKey2%>";
}
window.location.href=theUrl;
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="right" valign="top"><table width="621" border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td height="25" style="font-size:9pt"><br><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="30" 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="Tax1">按价格查询</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>
</tbody></table>
<TABLE width=621 border=0 cellPadding=0 cellSpacing=1 bgcolor="#999999" id=TABLE1 style="FONT-SIZE: 9pt"><tbody>
<form name="ZXLform" action="manageExtraTax.asp" method="post">
<TBODY>
<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")
''Auto=oRst("Auto")
%>
<TR <%=bc%>>
<TD width="59" height="25" align=center>
<a href="#" onClick="javascript:call('ExtraTax_add.asp?auto=<%=Auto%>');">
<strong><%=i%></strong></a>
</TD>
<TD width="132" height="25" align=center><a href="#" onClick="javascript:call('ExtraTax_add.asp?auto=<%=Auto%>');"><%=Fcity&"("&FcityCode&")"%></a></TD>
<TD width="187"><div align="center"><a href="#" onClick="javascript:call('ExtraTax_add.asp?auto=<%=Auto%>');"><%=Scity&"("&ScityCode&")"%></a></div></TD>
<TD width="75" height="25"><div align="center"><%=price%></div></TD>
<TD width="35" align="center"><input type="checkbox" name="<%=Auto%>" 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="5"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody>
<tr>
<td width="97%" height="30"><div align="right">
<input type="button" name="AddnewBunk" onClick="javascript:call('ExtraTax_add.asp');" value="添加">
<input type="submit" name="Submit" onClick="javascript:ZXLform.Myaction.value='delete'" value="删除">
</div></td>
<td width="3%"> </td>
</tr>
</tbody></table></TH>
</TR>
</TBODY></form>
</tbody></table>
<div align="center">
<%
strHref="<a href=manageExtraTax.asp?SearchFiled="&SearchFiled&"&SearchKey1="&SearchKey1&"&SearchKey2="&SearchKey2&"&page="
'response.write "<B><a href='publish.asp?category=" & cate & "'>发布新信息</a></B> "
'response.write strHref & page & "><B>刷 新</B></a> "
if page=1 then response.write "<B>首 页</B> | "
if page>1 then
response.write strHref & "1><B>首 页</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>末 页</B>"
else
response.write strHref & maxPageCount & "><B>末 页</B></a>"
end if
response.write " "
response.write "当前:" & Page & " / " & maxPageCount & " 页"
response.write "<INPUT TYPE='text' NAME='txtPage' size='3' maxlength='3'>"
response.write "<INPUT TYPE='button' value='页' onclick='goUrl()'>"
response.write " "
%>
<BR>
</div></td>
</tr>
</tbody></table>
</body>
</html>
<%
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("Auto")))
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 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
call conn_close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -