但是在服务器上没问题啊
[CODE]<!--#include File="Inc/Inc_Connection.asp"-->
<!--#include File="Inc/Inc_Function.asp"-->
<%
Call chkreferrer()
Call Power("1|2",Session("flag")) '检查用户权限
Dim citypair,carrier,seat,hbNo,fare,dlfare,explain,SDate,EDate,isGuoNei,isWangfan,PiaoShu
Dim uid,Page,Temp ,Author
If uid="" And Not IsNumeric(uid) Then
Response.Write("参数错误")
Response.End()
End If
uid = Request("ID")
Page = Request("Page")
Author = Request("Who")
Temp = Split(AllSeat,"|")
If Request("Action")="Save" Then Call Update_Policy()%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>特价信息修改</title>
<link href="Style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="inc/calendar.js"></script>
<script language="vbscript" type="text/vbscript">
private sub select_open1()
div1.style.left =(window.event.x - window.event.offsetX) -6
div1.style.top = (window.event.y - window.event.offsetY) +16 + document.body.scrollTop
div1.style.display=""
div2.style.display="none"
End sub
private sub select_open2()
div2.style.left =(window.event.x - window.event.offsetX) -6
div2.style.top = (window.event.y - window.event.offsetY) +16 + document.body.scrollTop
div2.style.display=""
div1.style.display="none"
End sub
sub s1()
tejia2.submit()
End sub
</script>
<script language="javascript">
function ChkModifyData()
{
if(document.form.citypair00.value=="")
{
alert('请选择出发城市!');
document.form.citypair00.focus();
return false;
}
if(document.form.citypair01.value=="")
{
alert('请选择目的城市2');
document.form.citypair01.focus();
return false;
}
if(document.form.carriertext.value=="")
{ alert('请选择航空公司!');
document.form.carriertext.focus();
return false;
}
if(document.form.seattext.value=="")
{ alert('请选择舱位!');
document.form.seattext.focus();
return false;
}
if(document.form.faretext.value=="")
{ alert('特价金额不能为空!');
document.form.faretext.focus();
return false;
}
if(document.form.dlfaretext.value=="")
{ alert('代理金额不能为空!');
document.form.dlfaretext.focus();
return false;
}
if(isNaN(document.form.faretext.value))
{ alert('特价金额不能为空,并且只能为数字!');
document.form.faretext.focus();
return false;
}
if(document.form.SDatetext.value=="")
{ alert('开始日期不能为空!');
document.form.SDatetext.focus();
return false;
}
if(document.form.EDatetext.value=="")
{ alert('结束日期不能为空!');
document.form.EDatetext.focus();
return false;
}
if(document.form.explaintext.value=="")
{ alert('签转说明不能为空!');
document.form.explaintext.focus();
return false;
}
if(document.form.seattext.value=="*" & document.form.PiaoShutext.value=="")
{
alert('舱位代码为所有舱位时,剩余票数需要填写');
document.form.PiaoShutext.focus();
return false;
}
if(document.form.seattext.value=="*" & isNaN(document.form.PiaoShutext.value))
{
alert('舱位代码为所有舱位时,票数不能为空,并且只能为数字!');
document.form.PiaoShutext.focus();
return false;
}
else
{return true;}
}
</script>
</head>
<%
Dim sql,rr
Set rr = Conn.Execute ("select Promulgator from tejia where Uid="&uid&"")
If Mid(rr("Promulgator"),1,5) <> Author Then
Response.Write("<script language=javascript>alert('对不起,您不能修改B2B的特价');history.go(-1);</script>")
Response.End()
Else
sql = "select * from tejia where uid="&uid
rec.open sql,conn,1,3
If rec.eof And rec.bof Then
Response.Write("没有记录")
Else
citypair = rec("citypair")
carrier = rec("carrier")
seat = rec("seat")
hbNo = rec("hbNo")
fare = rec("fare")
dlfare = rec("dlfare")
explain = rec("explain")
SDate = rec("SDate")
EDate = rec("EDate")
isGuoNei = rec("isGuoNei")
isWangfan = rec("isWangfan")
PiaoShu = rec("PiaoShu")
End If
rec.close
Set rec = Nothing
End If
Set rr = Nothing%>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form" method="post" action="tejiaedit.asp?Action=Save" onSubmit="return ChkModifyData()" id="tejia2">
<input type="hidden" name="Page" value="<%=Page%>" >
<tr>
<td width="100%" height="30" align="center" bgcolor="1a93d3"><font color="#FFFFFF"><b>特价信息修改</b></font></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="11%" height="30" align="right" bgcolor="#FFFFFF">特价城市对:</td>
<td width="37%" bgcolor="#FFFFFF">
<% If isGuoNei = False Then %>
<input name="citypair00" type="text" id="citypair00" size="10" maxlength="3" onClick ="vbscript:select_open1()" style="width:120px;" value="<%=Left(citypair,3)%>">
<% Else %>
<select name="citypair00" id="citypair00">
<option selected value="">请选择</option>
<%Dim rs_01
Set rs_01 = Conn.Execute("select * from city where country='中国'")
Do while not rs_01.eof
Response.Write("<option value="&Replace(rs_01("threecode"),",",""))
If Ucase(rs_01("threecode")) = Ucase(Left(citypair,3)) Then Response.Write(" Selected ")
Response.Write(">" & Left(rs_01("cityname"),1) & " - " & Split(rs_01("cityname")," ")(1) & "</option>")
rs_01.movenext
loop
Set rs_01 = Nothing%></select>
<% End If %>
至
<% If isGuoNei = False Then %>
<input name="citypair01" type="text" id="citypair01" size="10" maxlength="3" onClick ="vbscript:select_open2()" style="width:120px;" value="<%=Right(citypair,3)%>">
<% Else %>
<select name="citypair01" id="citypair01">
<option selected value="">请选择</option>
<%Set rs_01 = Conn.Execute("select * from city where country='中国'")
Do while not rs_01.eof
Response.Write("<option value="&Replace(rs_01("threecode"),",",""))
If Ucase(rs_01("threecode")) = Ucase(Right(citypair,3)) Then Response.Write(" Selected ")
Response.Write(">" & Left(rs_01("cityname"),1) & " - " & Split(rs_01("cityname")," ")(1) & "</option>")
rs_01.movenext
loop
Set rs_01 = Nothing%></select>
<% End If %></td>
<td width="10%" align="right" bgcolor="#FFFFFF">航空公司代码:</td>
<td width="42%" bgcolor="#FFFFFF"><select name="carriertext" style="WIDTH: 120px" id="carriertext">
<option selected value="">请选择</option>
<%If IsGuoNei = true Then
Set rs_01=Conn.Execute("select * from aircocode where Iscn='是'")
Else
Set rs_01=Conn.Execute("select * from aircocode where Iscn='否'")
End If
do while not rs_01.eof
Response.Write("<option value='"&rs_01("carrier")&"'")
If rs_01("carrier") = carrier Then Response.Write(" Selected ")
Response.Write(">"&rs_01("fullname")&"</option>"&vbCrlf)
rs_01.movenext
loop
Set rs_01=Nothing %></select>请直接选择</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">舱位代码:</td>
<td bgcolor="#FFFFFF"><select name="seattext" id="seattext" style="WIDTH: 120px">
<option value="*">全部</option>
<%Dim i
Temp = Split(AllSeat,"|")
for i=0 to Ubound(Temp)
Response.Write("<option value='"&Temp(i)&"'")
If Temp(i) = seat Then Response.Write(" Selected ")
Response.Write(">"&Temp(i)&"舱</option>")
next%></select>
请直接选择</td>
<td align="right" bgcolor="#FFFFFF">航班号:</td>
<td bgcolor="#FFFFFF"><input name="hbNotext" type="text" id="hbNotext" value="<%= hbNo %>" style="WIDTH: 120px">
如果是所有则不用输入,否则请真实填写</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">特价金额:</td>
<td bgcolor="#FFFFFF"><input name="faretext" type="text" id="faretext" style="WIDTH: 120px" onKeyUp="this.value=this.value.replace(/\D/g,'')" value="<%= fare %>" maxlength="5" onafterpaste="this.value=this.value.replace(/\D/g,'')">
如:1000</td>
<td align="right" bgcolor="#FFFFFF">代理金额:</td>
<td bgcolor="#FFFFFF"><input name="dlfaretext" type="text" style="WIDTH: 120px" onKeyUp="this.value=this.value.replace(/\D/g,'')" value="<%= dlfare %>" maxlength="5" onafterpaste="this.value=this.value.replace(/\D/g,'')">
如:1000</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">开始日期:</td>
<td bgcolor="#FFFFFF"><input name="SDatetext" type="text" id="SDatetext" onFocus="javascript:calendar(this)"; value="<%=SDate %>" style="WIDTH: 120px">
请直接选择</td>
<td align="right" bgcolor="#FFFFFF">结束日期:</td>
<td bgcolor="#FFFFFF"><input name="EDatetext" type="text" id="EDatetext" onFocus="javascript:calendar(this)"; value="<%= EDate %>" style="WIDTH: 120px">
请直接选择</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">是否国内特价:</td>
<td bgcolor="#FFFFFF"><select name="isGuoNei" id="isGuoNei">
<%If isGuoNei = True Then
Response.Write("<option value=true selected='selected'>国内特价</option>")
Response.Write("<option value=false>国际特价</option>")
Else
Response.Write("<option value=true>国内特价</option>")
Response.Write("<option value=false selected=selected>国际特价</option>")
End If %></select>
请直接选择</td>
<td align="right" bgcolor="#FFFFFF">是否有往返:</td>
<td bgcolor="#FFFFFF"><select name="isWangfan" id="isWangfan">
<%If isWangfan = True Then
Response.Write("<option value=true selected='selected'>往返特价</option>")
Response.Write("<option value=false>单程特价</option>")
Else
Response.Write("<option value=true>往返特价</option>")
Response.Write("<option value=false selected=selected>单程特价</option>")
End If %></select>
请直接选择</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">改签说明:</td>
<td colspan="3" bgcolor="#FFFFFF"><textarea name="explaintext" cols="60" rows="5" id="explaintext"><%=explain%></textarea>请不要输入特殊字符(如: , 。' " * ! ^ & 等)</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#FFFFFF">剩余票数:</td>
<td colspan="3" bgcolor="#FFFFFF"><input name="PiaoShutext" type="text" id="PiaoShutext" value="<%= PiaoShu %>" style="WIDTH: 120px"></td>
</tr>
<tr valign="middle">
<td height="30" align="right" bgcolor="#FFFFFF"> </td>
<td colspan="2" align="center" bgcolor="#FFFFFF"><input name="uid" type="hidden" value="<%=uid%>">
<input type="submit" name="Submit" value="保存修改">
<input type="button" name="Submit2" value="返 回" onClick="javascript:history.back(-1);"/></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<div id='div1' style='Z-INDEX: 999;POSITION: absolute;display:none'>
<IFRAME frameBorder='0' id='f_main' name='f_main' src='inc/scity.asp?CITY=from' scrolling='no' style='VISIBILITY: inherit; WIDTH: 248px; HEIGHT: 103px'></IFRAME>
</div>
<div id='div2' style='Z-INDEX: 999;POSITION: absolute;display:none'>
<IFRAME frameBorder='0' id='Iframe1' name='f_main' src='inc/scity.asp?CITY=to' scrolling='no' style='VISIBILITY: inherit; WIDTH: 248px; HEIGHT: 103px'></IFRAME>
</div>
</body>
</html>
<%Sub Update_Policy()
On Error Resume Next
Dim IsError,City1,City2
carrier = Trim(Request.Form("carriertext"))
seat = Trim(Request.Form("seattext"))
hbNo = Trim(Request.Form("hbNotext"))
fare = Trim(Request.Form("faretext"))
dlfare = Trim(Request.Form("dlfaretext"))
explain = Trim(Request.Form("explaintext"))
SDate = Trim(Request.Form("SDatetext"))
EDate = Trim(Request.Form("EDatetext"))
isGuoNei = Trim(Request.Form("isGuoNei"))
isWangfan = Trim(Request.Form("isWangfan"))
PiaoShu = Trim(Request.Form("PiaoShutext"))
City1 = Left(Trim(Request.Form("citypair00")),3)
City2 = Left(Trim(Request.Form("citypair01")),3)
IsError = False
If isGuoNei="true" Then
isGuoNei = True
Else
isGuoNei = False
End If
If isWangfan="true" Then
isWangfan = True
Else
isWangfan = False
End If
If seat = "*" Then
If PiaoShu = "" Or Not IsNumeric(PiaoShu) Then
Alert "错误","舱位是*号时,票数为必须填写项","history.back(-1)"
IsError = True
End If
Else
If PiaoShu = "" Or Not IsNumeric(PiaoShu) Then
PiaoShu = 0
End If
End IF
If City1="" Or City2="" Or carrier="choose" Or fare = "" Or dlfare = "" Or explain = "" Or SDate ="" Or EDate="" Then
Alert "错误","所填写的信息不完整","history.back(-1)"
IsError = True
End If
If IsError = False Then
rec.Open "select * from tejia where uid="&Cint(Request("uid")),Conn,1,3
rec("citypair") = Ucase(City1)&Ucase(City2)
rec("carrier") = carrier
rec("seat") = seat
rec("hbNo") = hbNo
rec("fare") = fare
rec("dlfare") = dlfare
rec("explain") = LeachStr(explain)'
rec("SDate") = SDate
rec("EDate") = EDate
rec("isGuoNei") = isGuoNei
rec("isWangfan")= isWangfan
rec("PiaoShu") = PiaoShu
rec("promulgator")= "admin"
rec.Update()
rec.Close()
Set rec = Nothing
If Err Then Response.Write(err.description)
Response.Write("<script>alert('修改成功');this.location.href='tejia.asp?Page="&Page&"';</script>")
End If
End Sub%>[/CODE]