{$SQLReplace({$Field(classdefinecontent,Text,0,...,0,)},||||,1,1000)}
Else
Exit For
End If
KS_RS_Obj.MoveNext
Next
加GetCirLabelContent=SQLReplace(GetCirLabelContent)
End Function
改
Str=Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(objAtr.Attributes.item(2).Text,"{$Field","{#Field"),"{$AutoID}","{#AutoID}"),"{$IF","{#IF"),"{$Param","{#Param"),"{$SQLReplace","{#SQLReplace"),"{$SQLReplaceHtml","{#SQLReplaceHtml"),"{$CreateImage","{#CreateImage"),"{$CurrClassPosition","{#CurrClassPosition"),"{$CurrInfoPosition","{#CurrInfoPosition"),"{$SQL_","##SQL_"),"$}","@@")
'避免Field字段被替换掉,先转为#
Str=Rcls.ReplaceGeneralLabelContent(Str)
Str=Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Str,"{#Field","{$Field"),"{#AutoID}","{$AutoID}"),"{#IF","{$IF"),"{#Param","{$Param"),"{#SQLReplace","{$SQLReplace"),"{#SQLReplaceHtml","{$SQLReplaceHtml"),"{#CreateImage","{$CreateImage"),"{#CurrClassPosition","{$CurrClassPosition"),"{#CurrInfoPosition","{$CurrInfoPosition")
加
Function SQLReplace(lpFieldValue)
Dim regEx, Matches, Match
if instr(lpFieldValue,"SQLReplace")<=0 then
SQLReplace=lpFieldValue
else
Dim FieldParam,FieldParamArr,mytempValue,mytempNum,mytarget,templpFieldValue
Set regEx = New RegExp
regEx.Pattern = "{\$SQLReplace\([^{\$}]*}"
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(lpFieldValue)
For Each Match In Matches
FieldParam = Replace(Replace(Match.Value,"{$SQLReplace(",""),")}","")
FieldParamArr = Split(FieldParam,",")
mytempValue=split(Replace(KS.LoseHtml(KS.HtmlCode(FieldParamArr(0)))," ",""),trim(FieldParamArr(1)))
if ubound(mytempValue)>=cint(FieldParamArr(2)) then lpFieldValue=Replace(lpFieldValue,Match.Value,KS.gotTopic(mytempValue(FieldParamArr(2)),FieldParamArr(3)))
Next
SQLReplace=lpFieldValue
end if
End Function