📄 siteutils.asp
字号:
<%
CRLF = Chr (13) & Chr (10)
Function Cipher (num, size)
dim cnt, i
Cipher = CStr(num)
cnt = Len (Cipher)
if (cnt < size) then
for i=cnt to size - 1
Cipher = "0" & Cipher
next
end if
End Function
Function iif(expression, truepart, falsepart)
if expression then
iif = truepart
else
iif = falsepart
end if
End Function
Function PageBack(msg)
Response.Write "<html><meta http-equiv='content-type' content='text/html; charset=gb2312'>"
Response.Write "<script language=javascript>" & CRLF
Response.Write "alert('" & msg & "');" & CRLF
Response.Write "history.back();" & CRLF
Response.Write "</script></html>" & CRLF
end Function
Function PageClose (msg)
Response.Write "<meta http-equiv='content-type' content='text/html; charset=gb2312'>"
Response.Write "<script language=javascript>" & CRLF
Response.Write "alert('" & msg & "');" & CRLF
Response.Write "window.close();" & CRLF
Response.Write "</script>" & CRLF
end Function
Function PageGo (page, msg)
Response.Write "<meta http-equiv='content-type' content='text/html; charset=gb2312'>"
Response.Write "<script language=javascript>" & CRLF
Response.Write "alert('" & msg & "');" & CRLF
Response.Write "window.open('" & page & "', '_self');" & CRLF
Response.Write "</script>" & CRLF
end Function
Function PageTo (page, msg, target)
Response.Write "<meta http-equiv='content-type' content='text/html; charset=gb2312'>"
Response.Write "<script language=javascript>" & CRLF
Response.Write "alert('" & msg & "');" & CRLF
Response.Write "window.open('" & page & "', '" & target & "');" & CRLF
Response.Write "</script>" & CRLF
end Function
Function ConvertChar(str)
Dim text
if (isNULL(str)) then str = ""
text = replace(str, "&", "&")
text = replace(text, "<", "<")
text = replace(text, ">", ">")
ConvertChar = text
End Function
Function ConvertDate(dstr)
Dim yy, mm, dd, h, mi
yy= year(dstr)
mm = right("0" & month(dstr), 2)
dd = right("0" & day(dstr), 2)
h = right("0" & hour(dstr), 2)
mi = right("0" & minute(dstr), 2)
ConvertDate = yy & "/" & mm & "/" & dd & " (" & h & ":" & mi & ")"
End Function
Function URLDecode(Expression)
Dim strSource, strTemp, strResult, strchr
Dim lngPos, AddNum, IFKor
strSource = Replace(Expression, "+", " ")
For lngPos = 1 To Len(strSource)
AddNum = 2
strTemp = Mid(strSource, lngPos, 1)
If strTemp = "%" Then
If lngPos + AddNum < Len(strSource) + 1 Then
strchr = CInt("&H" & Mid(strSource, lngPos + 1, AddNum))
If strchr > 130 Then
AddNum = 5
IFKor = Mid(strSource, lngPos + 1, AddNum)
IFKor = Replace(IFKor, "%", "")
strchr = CInt("&H" & IFKor )
End If
strResult = strResult & Chr(strchr)
lngPos = lngPos + AddNum
End If
Else
strResult = strResult & strTemp
End If
Next
URLDecode = strResult
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -