<%
Response. write (server. htmlencode (fiximg (" screen. width-461) window. open ('qq/20082181405371.jpg '); "" alt = "border =" "0" "src =" "QQ/20082181405371.jpg""/> ")))
%>
<%
'Function: Change the img Code Format to .
Function fiximg (sstring)
Dim sreallydo, RegEx, ireallydo
Dim omatches, cmatch
Dim tstarttime, tendtime
If isnull (sstring) then
Fiximg = ""
Exit Function
End if
Sreallydo = sstring
On Error resume next
Sreallydo = Replace (sreallydo, vbcr ,"")
Sreallydo = Replace (sreallydo, vblf ,"")
Sreallydo = Replace (sreallydo, vbtab ,"")
Sreallydo = Replace (sreallydo, "Sreallydo = Replace (sreallydo, "/>", "/>", 1,-1, 1)
Sreallydo = replaceall (sreallydo, "=", "=", true)
Sreallydo = replaceall (sreallydo, ">", ">", true)
Sreallydo = Replace (sreallydo, "> <", ">" & vbcrlf & "<")
Sreallydo = trim (sreallydo)
On Error goto 0
Set RegEx = new Regexp
RegEx. ignorecase = true
RegEx. Global = true
'// Remove the onclick, onload, and other scripts
RegEx. pattern = "\ s [on]. +? = ([\ "" | \ ']) (. *?) \ 1"
Sreallydo = RegEx. Replace (sreallydo ,"")
'// Enclose the image address of SRC without quotation marks with quotation marks
RegEx. pattern = "] *). *?> "
Sreallydo = RegEx. Replace (sreallydo, " ")
'// The SRC address of the matching image
RegEx. pattern = " "
Sreallydo = RegEx. Replace (sreallydo, " ")
Fiximg = sreallydo
End Function
%>
<%
'Function: return a string, in which a specified number of substrings are replaced with another substring.
'Source: http://jorkin.reallydo.com/article.asp? Id = 406
'Need bint function: http://jorkin.reallydo.com/article.asp? Id = 395
Function replaceall (sexpression, Sfind, sreplacewith, ball)
If isnull (sexpression) Then replaceall = "": Exit Function
If (strcomp (ball, "true", 1) = 0) or (cbool (bint (ball) = true) then
Do While instr (1, sexpression, Sfind, 1)> 0
Sexpression = Replace (sexpression, Sfind, sreplacewith, 1,-1, 1)
If instr (1, sreplacewith, Sfind, 1)> 0 Then exit do
Loop
Else
Do While instr (sexpression, Sfind)> 0
Sexpression = Replace (sexpression, Sfind, sreplacewith)
If instr (sreplacewith, Sfind)> 0 Then exit do
Loop
End if
Replaceall = sexpression
End Function
%>
<%
'Function: only numbers are allowed.
'Source: http://jorkin.reallydo.com/article.asp? Id = 395
function bint (STR)
STR = trim (STR)
If STR = "" Or isnull (STR) or not isnumeric (STR) then STR = "0"
bint = round (STR, 0)
end function
%>