Class cls_fun
private x,y,ii
' ==============================
' function name: Alertinfo
with: Error display function
' parameter Number: Error prompt content infostr, turn page gourl
' = = ========================
public Function alertinfo (infostr,gourl)
if gourl= "1" Then
response.write "<script>alert ('" & Infostr & "); location.href= ' javascript: History.go ( -1) ';</script> '
else
response.write ' <script>alert (' "& Infostr &"); location.href= ' & Gourl & ' ';</script> '
end If
Response.End ()
end function
' ==============================
' function Name: HTMLEncode
' for : Character conversion function
' parameter number: text to convert fstring
' = = ===========================
'==============================
' Function name: alertnum
' function: To determine whether a number (validation characters, not a number of prompts)
' Parameters: Text CHECKSTR to be judged, error hint ERRSTR
'==============================
Public Function Alertnum (CHECKSTR,ERRSTR)
If not IsNumeric (CHECKSTR) or checkstr= "" Then
Call Alertinfo (Errstr, "1")
End If
End Function
'==============================
' Function name: alertstring
' function: Judge string length
Parameters
' The text that needs to be judged CHECKSTR
' Limited shortest Shortlen
' Limit the longest longlen
' Authentication type Checktype (2-head limit, 1 minimum limit, 2 maximum limit)
' Too Short hint longstr
' Too long hint longstr,
'==============================
Public Function alertstring (checkstr,shortlen,longlen,checktype,shorterr,longerr)
If (checktype=0 Or checktype=1) and Stringlength (CHECKSTR) <shortlen Then
Call Alertinfo (Shortstr, "1")
End If
If (checktype=0 Or checktype=2) and Stringlength (CHECKSTR) >longlen Then
Call Alertinfo (Longstr, "1")
End If
End Function
'==============================
' Function name: alertnum
' function: To determine whether a number (validation characters, not a number of prompts)
' Parameters: Text CHECKSTR to be judged, error hint ERRSTR
'==============================
Public Function Shownum (CHECKSTR,ERRSTR)
If not IsNumeric (CHECKSTR) or checkstr= "" Then
Response.Write (errstr& "| | | | |")
Pageerr=1
End If
End Function
'==============================
' Function name: showstring
' function: Judge string length
Parameters
' The text that needs to be judged CHECKSTR
' Limited shortest Shortlen
' Limit the longest longlen
' Authentication type Checktype (2-head limit, 1 minimum limit, 2 maximum limit)
' Too Short hint longstr
' Too long hint longstr,
'==============================
Public Function showstring (checkstr,shortlen,longlen,checktype,shorterr,longerr)
If (checktype=0 Or checktype=1) and Stringlength (CHECKSTR) <shortlen Then
Response.Write (shorterr& "| | | | |")
Pageerr=1
End If
If (checktype=0 Or checktype=2) and Stringlength (CHECKSTR) >longlen Then
Response.Write (longerr& "| | | | |")
Pageerr=1
End If
End Function
A
'==============================
' Function name: Beselect
' Function: Judge Select option selected
' Parameter: Select1,select2
'==============================
Public Function Beselect (SELECT1,SELECT2)
If Select1=select2 Then
Beselect= "selected= ' selected '"
End If
End Function
'==============================
' Function name: Becheck
' Function: Judge Check option selected
' Parameter: Check1,check2
'==============================
Public Function Becheck (CHECK1,CHECK2)
If Check1=check2 Then
becheck= "checked= ' checked '"
End If
End Function