<%
dim language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
language_arr(
sub ConnOpen(DataBaseConnectStr
Set Conn_object = Server
if DataBaseConnectStr = "" then call ShowErr(language_arr(
if DBType =
Conn_object
elseif DBType =
Conn_object
else
call ShowErr(language_arr(
end if
err
end sub
Sub ConnClose(Conn_object)
Conn_object
set Conn_object = nothing
End sub
Function SafeRequest(paraName
dim paraValue
paraValue = Request(paraName)
select case paraType
case
paraValue = replace(paraValue
paraValue = replace(paraValue
case
if not IsNumeric(paraValue) then call ShowErr(language_arr(
case
if not IsNumeric(paraValue) then call ShowErr(language_arr(
if paraValue = "" then paraValue =
case else
if len(paraValue) > paraType then call ShowErr(language_arr(
paraValue = replace(paraValue
paraValue = replace(paraValue
end select
SafeRequest = paraValue
End function
Function DateFormat(dateStr
Dim dateString
if IsDate(dateStr) = False then
call ShowErr(language_arr(
end if
Select Case dateType
Case "
dateString = Year(dateStr)&"
Case "
dateString = Year(dateStr)&"
Case "
dateString = Year(dateStr)&"/"&Month(dateStr)&"/"&Day(dateStr)
Case "
dateString = Month(dateStr)&"/"&Day(dateStr)&"/"&Year(dateStr)
Case "
dateString = Day(dateStr)&"/"&Month(dateStr)&"/"&Year(dateStr)
Case "
dateString = Month(dateStr)&"
Case "
dateString = Month(dateStr)&"
Case "
dateString = Month(dateStr)&"
Case "
dateString = Month(dateStr)&"/"&Day(dateStr)
Case "
dateString = Month(dateStr)&"
Case "
dateString = Month(dateStr)&language_arr(
Case "
dateString = Day(dateStr)&language_arr(
case "
dateString = Day(dateStr)&language_arr(
Case "
dateString = Hour(dateStr)&language_arr(
Case "
dateString = Hour(dateStr)&":"&Minute(dateStr)
Case "
dateString = Year(dateStr)&language_arr(
Case Else
dateString = dateStr
End Select
DateFormat = dateString
End Function
sub ShowErr(errStr)
Response
Response
End sub
From:http://tw.wingwit.com/Article/program/net/201311/14091.html