账号通
    

账号  

密码  

3522

查看

6

回复
主题:[建议]希望增加自设内容SQL标签解析和SQL标签动态参数调用 [收藏主题] 转到:  
linksy 当前离线

188

主题

0

广播

1

粉丝
添加关注
级别:一年级

用户积分:2516 分
登录次数:158 次
注册时间:2007/6/14
最后登录:2015/12/16
linksy 发表于:2010/9/25 11:55:00   | 显示全部帖子 查看该作者主题 楼主 
科汛在线网校系统

{$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))),"&nbsp;",""),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


 
以广为赞誉的服务态度、显著的***效果,从而赢得了广大客户的一致好评.飞翔网络4年专业网站建设经验(http://www.aqwzjs.com)
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
linksy 当前离线

188

主题

0

广播

1

粉丝
添加关注
级别:一年级

用户积分:2516 分
登录次数:158 次
注册时间:2007/6/14
最后登录:2015/12/16
linksy 发表于:2010/9/25 11:57:00   | 显示全部帖子 查看该作者主题 沙发 
 
以广为赞誉的服务态度、显著的***效果,从而赢得了广大客户的一致好评.飞翔网络4年专业网站建设经验(http://www.aqwzjs.com)
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.07813秒 powered by KesionCMS 9.0