'滤掉注入符号,防止注入
function data_pro(text)
text=replace(replace(replace(text,"'",""),"","")
data_pro=text
end function
function testdb(object) '替换< > '
object=replace(object," object=replace(object,"'","")
object=replace(object,">","")
testdb=trim(object)
end function
function msg_error(msg)
%>
alert('');
window.history.back();
end function
function rand()
randomize
num=int(rnd()*4)+6
pass=""
for i=1 to num
flag=rnd()
if flag>0.7 then
k=int(rnd()*10)+48
else
k=int(rnd()*26)+97
end if
pass=pass&chr(k)
next
rand=pass
end function
function msg_success(msg)
%>
alert('');
window.location="../index.asp";
end function
Function ReTime(a)
ReTime=left(a,2)+"时"+right(a,2)+"分"
end function
function ReSqlTime(TimeTemp)
if len(TimeTemp)=4 then
ReSqlTime=" and flymessage.timeFrom like '"&Left(retime(TimeTemp),2)&"%'"
else
dim t
t=split(timeTemp,"-")
ReSqlTime=" and left(flymessage.timefrom,2)>='"&t(0)&"' and left(flymessage.timefrom,2) 'response.write "alert(ReSqlTime);"2005-7-8
if t(0)>t(1) then
ReSqlTime=" and ((left(flymessage.timefrom,2)>='"&t(0)&"' and left(flymessage.timefrom,2)='00' and left(flymessage.timefrom,2) end if
end if
end function
function ReFlyType(strTemp)
ReFlyType=strTemp
if trim(strTemp)="JET" then ReFlyType="待定"
end function
'''''
'过滤最后一位的隐含字符
function ReFlightno(strTemp)
dim StrLast,IntStrLen,flightnoTemp
flightnoTemp=strTemp
IntStrLen=len(strTemp)
if IntStrLen>6 then flightnoTemp=left(strTemp,6)
strLast=right(strTemp,1)
if strLast"9" then flightnoTemp=left(strTemp,IntStrLen-1)
ReFlightno=flightnoTemp
end function
%>