📄 function.asp
字号:
<!-- Edited By ZhouXiaolong -->
<%
'滤掉注入符号,防止注入
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)
%>
<script language="javascript">
alert('<%=msg%>');
window.history.back();
</script>
<%
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)
%>
<script language="javascript">
alert('<%=msg%>');
window.location="../index.asp";
</script>
<%
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)<'"&t(1)&"'"
'response.write "<script>alert(ReSqlTime);</script>"2005-7-8
if t(0)>t(1) then
ReSqlTime=" and ((left(flymessage.timefrom,2)>='"&t(0)&"' and left(flymessage.timefrom,2)<'24') or (left(flymessage.timefrom,2)>='00' and left(flymessage.timefrom,2)<'"&t(1)&"'))"
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<"0" or strLast>"9" then flightnoTemp=left(strTemp,IntStrLen-1)
ReFlightno=flightnoTemp
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -