<% chn.setChannel("common") chn.doInit() skin.setChannel("common") sub doSkinPage() call toSkinDispose() end sub call doWebHead() call doSkinParse("skin","") call doWebEnd() dim TableSkin,TreeSkin sub doPageLoad() set TableSkin=ops.getConfigTable("common.config/data/skin") end sub sub doPageParse() dim tmpSkin:tmpSkin =ops.request.getQuery("skin") if len(tmpSkin)>0 then ops.client.setCookiesAge(ops.client.getCookies("cookies.age")) if tmpSkin="_clear" then call ops.client.delCookies("app.skin") else TableSkin.doItemBegin() dim tt for tt=1 to TableSkin.getRow() if TableSkin.getItemValue("skin")=tmpSkin then call ops.client.setCookies("app.skin",tmpSkin) end if TableSkin.doItemMove() next end if dim tmpURL:tmpURL=ops.request.getBrowseReferer() go tmpURL call doClear() end if end sub sub toSkinDispose() if not isTable(TableSkin) then call doPageLoad() dim re:re=skin.getOutput() dim tmpTree,tt dim rPattern,rMatch,rMatches,rFlags,rFlag,rFlagValue,rItems '#################### rPattern=""®EX_PATTERN_LABEL_TEMPLATE&"<\/loop:end>" set rMatches=opsRegex.toParseMatches(re,rPattern) For Each rMatch In rMatches rFlags=rMatch.value rFlagValue="" TableSkin.doItemBegin() for tt=1 to TableSkin.getRow() set tmpTree=TableSkin.getItemTree() tmpTree.doFilter("v_") 'debug opsTest.toTreeString(tmpTree,"tmpTree") rFlagValue=rFlagValue&(tpl.toParseItem(rMatch.SubMatches(0),tmpTree)) TableSkin.doItemMove() next re=replace(re,rFlags,rFlagValue) Next '#################### Set rMatch=Nothing:Set rMatches=Nothing skin.setOutput(re) end sub %>