<%
Class SK_Label_conversion
		Private SK_Lable_Dataearly,SK_Lable_Replacedata,SK_Dataconnection
		Private Sub Class_Initialize()
		End Sub
        Private Sub SK_list_Runtotheend()
		   If isobject(SK_Dataconnection) Then
		   SK_Dataconnection.Close:Set SK_Dataconnection=Nothing
		   End If
		End Sub
		Function SK_Doing_the_transformation(Content)
		Dim sklead_data, Numerical_comparison, Label_executive,lable_contrast,Santa_RosaE,Contrast_began,n
		Set sklead_data = New RegExp
		sklead_data.Pattern = "{skwebSQL_[^{]*\)}"
		sklead_data.IgnoreCase = True
		sklead_data.Global = True
		Set Numerical_comparison = sklead_data.Execute(Content)
		SK_Doing_the_transformation=Content
		For Each lable_contrast In Numerical_comparison
		Santa_RosaE=lable_contrast.value	
		Label_executive=lable_contrast.value
		SK_Doing_the_transformation=Replace(SK_Doing_the_transformation,Label_executive,SK_speciallabels(Label_executive,"label"))
		Next		
		End Function
		Function SK_Cycling_times(Content)
			 Dim sklead_data, Numerical_comparison, lable_contrast
			 Set sklead_data = New RegExp
			 sklead_data.Pattern="\[loop=\d*]"
			 sklead_data.IgnoreCase = True
			 sklead_data.Global = True
			 Set Numerical_comparison = sklead_data.Execute(Content)
			 If Numerical_comparison.count > 0 Then
			  SK_Cycling_times=Replace(Replace(Numerical_comparison.item(0),"[loop=",""),"]","")
			 Else
			  SK_Cycling_times=0
			 end if
		End Function
		Function SK_speciallabels(Label_executive,pagSQL)
		  Dim ResearchService,LabelName,adminNumericalLable,I,Page_jump,TotalPut,PageNum,J,SKLabellog,Ajax,SIFBSARR,Laredes,Labelsuperconversion,Labeloperation,Source_code,Style_code,ClassificationEngineering,PageStyle
		  LabelName    = Replace(Replace(Split(Label_executive,"(")(0),"""",""),"'","")
		  adminNumericalLable = Split(Replace(Replace(Replace(Replace(Label_executive,LabelName&"(",""),")}",""),"""",""),"'",""),",")  
		  Set ResearchService=skweboa.SK_axe("Select  top 1 LabelContent,description From Label_skweb Where LabelName='" & LabelName & "}'")
		  IF ResearchService.Eof And ResearchService.Bof Then
		     ResearchService.Close:Set ResearchService=Nothing:SK_speciallabels="":Exit Function
		  Else
		    Laredes = Split(ResearchService(0),"§")
			Source_code          = Replace(ResearchService(1),vbcrlf,"$skweb:Page$")
		  End If
		   ResearchService.Close
		  SK_Lable_Dataearly=Laredes(3)
		  SK_Lable_Replacedata=Laredes(4)
		  Labeloperation=Laredes(5)
 		  if SK_Lable_Dataearly=1 Or SK_Lable_Dataearly=5 Or SK_Lable_Dataearly=6 then	SK_Lable_Replacedata=skweboa.GetAbsolutePath(SK_Lable_Replacedata)
 		   Labeloperation=Replace(Labeloperation,"{$CurrClassID}",""&skweboa.SK_CID_temp(Application(SkcmsCookies & "ClassID"))&"")'当前栏目ID
		   Labeloperation=Replace(Labeloperation,"{$ThisClassID}","'"&Application(SkcmsCookies & "ClassID")&"'")'当前栏目ID
		   Labeloperation=Replace(Labeloperation,"{$CurrInfoID}",Application(SkcmsCookies & "ID"))'当前ID
 		   For I=0 To Ubound(adminNumericalLable)
		    Labeloperation  = Replace(Labeloperation,"{$Param("&I&")}",adminNumericalLable(I))
			Source_code = Replace(Source_code,"{$Param("&I&")}",adminNumericalLable(I))
		   Next
		   Style_code=Laredes(2)
		   If Not Isnumeric(Style_code) Then Style_code=0
			Style_code=Laredes(0)
			PageStyle=Laredes(2)
			ClassificationEngineering=Laredes(1)
  		   If OpenExSK_Dataconnection=false Then SK_speciallabels="数据无法连接!":Exit Function
           If SK_Lable_Dataearly=0 Then
			  ResearchService.Open Labeloperation,Conn,1,1
		   Else
			  ResearchService.Open Labeloperation,SK_Dataconnection,1,1
		   End If 
	  
  		   If Not ResearchService.Eof Then
			    Dim sklead_data, lable_contrast,LoopTimes,Numerical_comparison
				Set sklead_data = New RegExp
				sklead_data.Pattern = "\[loop=\d*].+?\[/loop]"
				sklead_data.IgnoreCase = True
				sklead_data.Global = True
				Set Numerical_comparison = sklead_data.Execute(Source_code)
				If Style_code=1  Then  '分页标签
				         Page_jump=0
				         For Each lable_contrast In Numerical_comparison
							Page_jump=Page_jump+SK_Cycling_times(lable_contrast.Value) '每页记录数
						 Next
                         If Page_jump=0 Then SK_speciallabels="自由标签的循环次数必须大于0":Exit Function
						 
				  		TotalPut = ResearchService.recordcount
						if (TotalPut mod Page_jump)=0 then
								PageNum = TotalPut \ Page_jump
						else
								PageNum = TotalPut \ Page_jump + 1
						end if
						Application(SkcmsCookies & "PageStyle") = PageStyle
						
						Dim Url,Intercepted_the_web_address,ClassID
						On Error Resume Next
						Url=Request.ServerVariables("QUERY_STRING")
						Intercepted_the_web_address=Split(Split(url,".")(0),"-")
					    ClassID = skweboa.C_SKCMSSQL(Intercepted_the_web_address(1))

						If  ClassID<>"" Then
							 If UBound(Intercepted_the_web_address)=2 Then skcmsdemopage=skweboa.Return_to_numerical(Intercepted_the_web_address(2))
						     Dim skcmsdemopage:skcmsdemopage=skweboa.Return_to_numerical(skcmsdemopage)
							 If skcmsdemopage<=0 Then skcmsdemopage=1
						     Application(SkcmsCookies & "PageNum")=PageNum
						     Application(SkcmsCookies & "TotalPut")=TotalPut
						     Application(SkcmsCookies & "skcmsdemopage")=skcmsdemopage
 							 TempCirContent    = Source_code
							 ResearchService.Move (skcmsdemopage - 1) * Page_jump
						     For Each lable_contrast In Numerical_comparison
								  LoopTimes=SK_Cycling_times(lable_contrast.Value)   '循环次数
								  Labelsuperconversion = Replace(Replace(lable_contrast.value,"[loop=" & LoopTimes&"]",""),"[/loop]","")
								   TempCirContent    = Replace(TempCirContent,"[loop="&LoopTimes&"]"&Labelsuperconversion&"[/loop]",SK_Replacement_project(Labelsuperconversion,ResearchService,LoopTimes),1,1)
								  If ResearchService.Eof Then Exit For
							 Next
 							  SKLabellog = TempCirContent & skweboa.SK_pagingL(PageStyle,ClassificationEngineering,PageNum,skcmsdemopage,TotalPut,Page_jump)
 							  SKLabellog=SKLabellog &"{$PageList}" '加上分页符
							  SK_speciallabels=Replace(SK_Delete_engineering(SKLabellog),"$skweb:Page$",vbcrlf)
						Else
						    dim TempCirContent
							For I = 1 To Cint(PageNum)
							     TempCirContent    = Source_code
								 For Each lable_contrast In Numerical_comparison
								  LoopTimes=SK_Cycling_times(lable_contrast.Value)  
								  Labelsuperconversion = Replace(Replace(lable_contrast.value,"[loop=" & LoopTimes&"]",""),"[/loop]","")
								   TempCirContent=Replace(TempCirContent,"[loop="&LoopTimes&"]"&Labelsuperconversion&"[/loop]",SK_Replacement_project(Labelsuperconversion,ResearchService,LoopTimes),1,1)
								  If ResearchService.Eof Then Exit For
								 Next
						      Application(SkcmsCookies & "pagecount")=TotalPut 
							  SKLabellog = SKLabellog & TempCirContent & skweboa.SK_pagingL(PageStyle,ClassificationEngineering,PageNum,I,TotalPut,Page_jump)
							  SKLabellog=SKLabellog & "{$PageList}" 
							Next
							Application(Cstr(SkcmsCookies & "PageList")) = Replace(SK_Delete_engineering(SKLabellog),"$skweb:Page$",vbcrlf)
							SK_speciallabels="{PageListStr}"
					 End If
				Else
					Do While Not ResearchService.Eof
						For Each lable_contrast In Numerical_comparison
						  LoopTimes=SK_Cycling_times(lable_contrast.Value)   
						  Labelsuperconversion = Replace(Replace(lable_contrast.value,"[loop=" & LoopTimes&"]",""),"[/loop]","")
						  Source_code    = Replace(Source_code,"[loop="&LoopTimes&"]"&Labelsuperconversion&"[/loop]",SK_Replacement_project(Labelsuperconversion,ResearchService,LoopTimes),1,1)
						  If ResearchService.Eof Then Exit For
						Next
						If ResearchService.Eof Then Exit Do
					Loop
					SK_speciallabels=Replace(SK_Delete_engineering(Source_code),"$skweb:Page$",vbcrlf)
				End If		 
		   Else
		     SK_speciallabels="":Exit Function
		   End if
		   ResearchService.Close:Set ResearchService=Nothing  
		End Function

		Function SK_Delete_engineering(Content)
				Dim sklead_data, Numerical_comparison, lable_contrast,LoopTimes
				Set sklead_data = New RegExp
					sklead_data.Pattern = "\[loop=\d*][^\[\]]*\[/loop]"
					sklead_data.IgnoreCase = True
					sklead_data.Global = True
					Set Numerical_comparison = sklead_data.Execute(Content)
					For Each lable_contrast In Numerical_comparison
				    Content=Replace(Content,lable_contrast.value,"")
					Next
					SK_Delete_engineering=Content
		End Function
		Function SK_Replacement_project(Labelsuperconversion,ByRef ResearchService,LoopTimes)
		Dim sklead_data, Numerical_comparison, lable_contrast, SKLabellog,Data_value,Operationdatavalue,Data_value_length,I,FieldPosition,N,functionConversion,FieldName,FieldType,The_resulting_value
			If Not IsNumeric(LoopTimes) Then LoopTimes=10
			For N=1 To LoopTimes
			  If Not ResearchService.Eof Then
					Set sklead_data = New RegExp
					sklead_data.Pattern = "{\$Field\([^{\$}]*}"
					sklead_data.IgnoreCase = True
					sklead_data.Global = True
					Set Numerical_comparison = sklead_data.Execute(Labelsuperconversion)
					SKLabellog=Replace(Labelsuperconversion,"{$AutoID}",N)
					For Each lable_contrast In Numerical_comparison
					  Data_value    = Replace(Replace(lable_contrast.Value,"{$Field(",""),")}","")
					  functionConversion = Split(Data_value,",")
					  Data_value_length=Ubound(functionConversion) 
 					  FieldName     = functionConversion(0)      
					  FieldType     = functionConversion(1)      
					  FieldPosition=0
					  For I=0 To ResearchService.Fields.count-1
					    IF lcase(FieldName)=lcase(ResearchService.Fields(I).name) Then FieldPosition=I:Exit For
					  Next
						  Operationdatavalue=ResearchService(FieldPosition)      
						  Select Case Lcase(FieldType)
						   Case "text"
							 The_resulting_value=Get_Text_Field(Operationdatavalue,functionConversion(2),functionConversion(3),functionConversion(4),functionConversion(5))
						   Case "num"
							 The_resulting_value=Get_Num_Field(Operationdatavalue,functionConversion(2),functionConversion(3))
						   Case "date"
							 The_resulting_value=Get_Date_Field(Operationdatavalue,functionConversion(2))
						   Case "SK_pageaddress"
							 The_resulting_value=Get_InfoUrl_Field(FieldName,Operationdatavalue,functionConversion(2),functionConversion(3))
						   Case "getclassurl"
							 The_resulting_value=Get_ClassUrl_Field(FieldName,Operationdatavalue,functionConversion(2),functionConversion(3))
						  End Select
					 
					  on error resume next
				      SKLabellog=Replace(SKLabellog,"{$Field(" &Data_value &")}",The_resulting_value)
					Next

					 SK_Replacement_project=SK_Replacement_project &SKLabellog
				Else
				  Exit For
				End If
				 ResearchService.MoveNext
			Next
		
		End Function
		Function Get_Text_Field(FieldValue,CutNum,EndTag,HtmlTag,DefaultChar)
		 Dim SKLabellog:SKLabellog=FieldValue
		 If FieldValue="" Or IsNull(FieldValue) Then SKLabellog=DefaultChar
		 If Not IsNumeric(HtmlTag) Or Not IsNumeric(CutNum) Then Exit Function
		 If HtmlTag=1 Then
		  SKLabellog=Server.HtmlEncode(SKLabellog)
		 ElseIF HtmlTag=2 Then
		  SKLabellog=skweboa.CloseHtml(SKLabellog)
		 End If
          If EndTag="0" Then EndTag=""
		  if skweboa.strLength(SKLabellog)>cint(CutNum) and CutNum<>0 then SKLabellog = skweboa.GetStrValue(SKLabellog, CutNum) & EndTag
		 Get_Text_Field=SKLabellog
		End Function
		Function Get_Num_Field(FieldValue,OutType,XSWS)
		 If Not IsNumeric(FieldValue) Then Get_Num_Field=FieldValue:Exit Function
		 If Not IsNumeric(OutType) Then OutType=0
		 If Not IsNumeric(XSWS) Then XSWS=0
         If OutType=1 Then
		   Get_Num_Field=FormatNumber(FieldValue,XSWS)
		 ElseIf OutType=2 Then
		   Get_Num_Field=FormatPercent(FieldValue)
		 Else
		   Get_Num_Field=FieldValue
		 End if  
		End Function
		Function Get_Date_Field(FieldValue,DateMB)
		  IF Not IsDate(FieldValue) Then Get_Date_Field=FieldValue:Exit Function
		  Get_Date_Field=Replace(DateMB,"YYYY",Year(FieldValue))
		  Get_Date_Field=Replace(Get_Date_Field,"YY",Right("0" & Year(FieldValue), 2))
		  Get_Date_Field=Replace(Get_Date_Field,"MM",Right("0" & Month(FieldValue), 2))
		  Get_Date_Field=Replace(Get_Date_Field,"DD",Right("0" & Day(FieldValue), 2))
		  Get_Date_Field=Replace(Get_Date_Field,"hh",Right("0" & hour(FieldValue), 2))
		  Get_Date_Field=Replace(Get_Date_Field,"mm",Right("0" & minute(FieldValue), 2))
		  Get_Date_Field=Replace(Get_Date_Field,"ss",Right("0" & second(FieldValue), 2))
		End Function
		Function Get_InfoUrl_Field(byval FieldName,byval FieldValue,ModeID,OutType)
		 If OutType=2  Then Get_InfoUrl_Field=FieldValue:Exit Function
		 Dim SqlStr
		 If Not Isnumeric(ModeID) Then Exit Function
		  SqlStr="Select ID,Classid,Title,UpdateTime,skweblink,FileName,skadminuserpurview,skReadthecontent From " & skweboa.SK_Mroot(ModeID,2) & " Where " & FieldName &"=" &FieldValue
		   Dim ResearchService:Set ResearchService=Server.CreateObject("ADODB.RECORDSET")
		   ResearchService.Open SqlStr,Conn,1,1
		  IF ResearchService.Eof Then
			   ResearchService.Close:Set ResearchService=Nothing:Exit Function
			  Else
					If OutType=0 Then
					 Get_InfoUrl_Field="<a href="""&skweboa.SK_pageaddress(ModeID,ResearchService(1),ResearchService(0),ResearchService(4),ResearchService(5),ResearchService(6),ResearchService(7))&""" target=""_blank"">" & FieldValue &"</a>"
					ElseIF OutType=1 Then
					 Get_InfoUrl_Field=skweboa.SK_pageaddress(ModeID,ResearchService(1),ResearchService(0),ResearchService(4),ResearchService(5),ResearchService(6),ResearchService(7))
					End If		
			  End if
			  ResearchService.Close:Set ResearchService=Nothing
		End Function
		
		Function Get_ClassUrl_Field(FieldName,FieldValue,ModeID,OutType)
		  If OutType=2 Then Get_ClassUrl_Field=FieldValue:Exit Function
		  Dim ClassID:ClassID=FieldValue
			 If FieldName="id" Then
				 Dim SqlStr:SqlStr="Select Classid,urlname From Class_skweb Where Classid='" & Conn.Execute("Select Classid From " & skweboa.SK_Mroot(ModeID,2) & " Where " & FieldName &"=" &FieldValue)(0)&"'"
				Dim ResearchService:Set ResearchService=Server.CreateObject("ADODB.RECORDSET")
				ResearchService.Open SqlStr,Conn,1,1
				IF ResearchService.Eof Then
				   ResearchService.Close:Set ResearchService=Nothing:Exit Function
				Else
				   ClassID  = ResearchService(1)
				End if
				ResearchService.Close:Set ResearchService=Nothing
			 End IF
		     If OutType=0 Then
				 Get_ClassUrl_Field="<a href="""&skweboa.SK_MYListname(ClassID)&""" target=""_blank"">" & skweboa.skCMSlist(classID,2) &"</a>"
			ElseIF OutType=1 Then
				 Get_ClassUrl_Field=skweboa.SK_MYListname(ClassID)
			 End If
		  
		End Function
		Function OpenExSK_Dataconnection()
		 If SK_Lable_Dataearly=0 Then
		   OpenExSK_Dataconnection=True
		 Else
			on error resume next
		    Set SK_Dataconnection = Server.CreateObject("ADODB.Connection")
			SK_Dataconnection.open SK_Lable_Replacedata
			If SK_Lable_Dataearly=7 Then
			 SK_Dataconnection.execute("set names 'utf-8'")
			End If
			If Err Then 
			  Err.Clear
			  Set SK_Dataconnection = Nothing
			   OpenExSK_Dataconnection=False
			Else 
			   OpenExSK_Dataconnection=true
			End If
		 End If
    	End Function
	End Class
Class skcmsProgramcore 
	Dim sklead_data
 	public Nodes
	Private SK_DataCMS_subject,SK_Data_analysis
	Private Sub Class_Initialize()
		SK_DataCMS_subject = skweboa.SK_Host_site
		SK_Data_analysis = MyDbPath
		Set sklead_data = New RegExp
		sklead_data.Ignorecase = True
		sklead_data.Global = True
		End Sub
        Private Sub SK_list_Runtotheend()
		End Sub
	      Public Function Replace_SKweb_labels(SKCMS_Template_output)
		  SKCMS_Template_output=SK_Embedded_documents(SKCMS_Template_output)	
 		  SKCMS_Template_output = LableFlag(SK_CMS_Alllabels(SKCMS_Template_output))
		  SKCMS_Template_output =ReplaceSK_CMS_Alllabels(SKCMS_Template_output)
		  SKCMS_Template_output = SK_Built_in_label(SKCMS_Template_output)  
		  if skweboa.WEBID()="false" then
		  SKCMS_Template_output = SKCMS_Template_output&"<script type=""text/javascript"">eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[01]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$.0({id:\'1\',content:\'url:http://www.elline.cn\'});$.0.list[\'1\'].hide();',[],2,'dialog|winelline'.split('|'),0,{}))</script>"
		  end if
		  Replace_SKweb_labels = SKCMS_Template_output
 	    End Function
		Public Function Replace_SKweb_labelshtml(SKCMS_Template_output)
 		  SKCMS_Template_output = LableFlag(SK_CMS_Alllabelshtml(SKCMS_Template_output))
		  SKCMS_Template_output =ReplaceSK_CMS_Alllabels(SKCMS_Template_output)
		  SKCMS_Template_output = SK_Built_in_label(SKCMS_Template_output)   
		  Replace_SKweb_labelshtml = SKCMS_Template_output
 	    End Function
		Function SK_GetNodehtml(NodeName)
		 Dim N
		 If IsObject(Nodes) Then
		  set N=nodes.SelectSingleNode("@" & NodeName)
		  If Not N is Nothing Then SK_GetNodehtml=N.text
		 End If
		End Function
		Function FSOSaveFile(Templetcontent,FileName)
			Templetcontent=skweboSK_function_execution(Templetcontent)
			on error resume next 
			Dim FileFSO,FileType
			 Set FileFSO = Server.CreateObject("ADODB.Stream")
				With FileFSO
				.Type = 2
				.Mode = 3
				.Open
				.Charset = "utf-8"
				.Position = FileFSO.Size
				.WriteText  Templetcontent&vbcrlf &vbCrLf
				.SaveToFile Server.MapPath(FileName),2
				If Err.Number<>0 Then 
					Err.Clear 
				  Call  skweboa.SK_log(server.MapPath(""&MyDbPath&"SKCMS/log/adminlog.cs"),""  & now() &"  - "&UserName&" 错误  <br><br>",true) 
					Exit Function 
				End If 
				.Close
				End With
			Set FileType = nothing
			Set FileFSO = nothing
		End Function
	Function  Loading_template_file(TempString) 
 		    on error resume next
			Dim  Str,asptempsql
			set asptempsql=server.CreateObject("adodb.Stream")
			asptempsql.Type=2:asptempsql.mode=3:asptempsql.charset="utf-8":asptempsql.open
			asptempsql.loadfromfile server.MapPath(TempString)
			If Err.Number<>0 Then Call skweboa.SK_window("没有找到 <font color=red>"&TempString&"</font> 这个模板！请管理员检查！","","4","3") :Exit Function
			Str=asptempsql.readtext
			asptempsql.Close
			Set  asptempsql=nothing
			Loading_template_file=Str
 	End  function
	
	Function skweboSK_function_execution(SKCMS_Template_output)
 		dim HtmlLabel,HtmlLabelArr,i,Param

 		 If InStr(SKCMS_Template_output, "{=SK_axe") > 0 Then
			 HtmlLabel = SelectLabelParameter(SKCMS_Template_output, "{=SK_axe")
 			 HtmlLabelArr=Split(HtmlLabel,"$$$")
			 For I=0 To Ubound(HtmlLabelArr)
				 Param = Split(FunctionLabelParam(HtmlLabelArr(I), "{=SK_axe"),",")
  				  SKCMS_Template_output = Replace(SKCMS_Template_output, HtmlLabelArr(I), skweboa.SK_function_execution(Ubound(Param),Param))
 
 			 Next
		 End If
 		 skweboSK_function_execution=SK_Code_running(SKCMS_Template_output)
	End Function 

	Public Function RegReplace(ByVal ReplaceContent, ByVal Pattern, ByVal ReplaceVal)
 		sklead_data.Pattern = Pattern
		RegReplace = sklead_data.Replace(ReplaceContent, ReplaceVal)
	End Function	
	
	Public Function SK_Embedded_documents(SKCMS_Template_output) 
  		 On Error Resume Next
		 SKCMS_Template_output=RegReplace(SKCMS_Template_output, "<" & "!--#include file=""(..//)*(.+?)""-->", "{file:$2}")
         If InStr(SKCMS_Template_output, "{file:") > 0 Then
            Dim Match, Matches, FileBody,FilePath
            sklead_data.Pattern = "{file:(.+?)}"
            Set Matches = sklead_data.Execute(SKCMS_Template_output)
            For Each Match In Matches
				FilePath= Match.SubMatches(0)
 				FileBody = Loading_template_file(FilePath)
   			    SKCMS_Template_output = Replace(SKCMS_Template_output, Match.Value,FileBody)
            Next
        End If
		SK_Embedded_documents=SKCMS_Template_output
 	End Function
	
	Public Function SK_Code_running(SKCMS_Template_output)
		On Error Resume Next
 		Dim operationlable, Match 
 		sklead_data.Pattern = "{skASP:([\s\S]*?)}"
		Set operationlable = sklead_data.Execute(SKCMS_Template_output)
		For Each Match In operationlable
 			Execute(replace(Match.SubMatches(0),"'",""""))
   			SKCMS_Template_output = Replace(SKCMS_Template_output, Match.Value, skASP) 
			If Err Then Response.Write "代码段无法运行[" & Match.SubMatches(0) & "]" & Err.Description & "": Err.Clear: Response.End
		Next
		SK_Code_running=SKCMS_Template_output
 	End Function

 	     Public Function SK_Built_in_label(Replace_content)
		 on error resume next
		 Replace_content = SK_ClassLabel_conversion(Replace_content)
 		 Dim HtmlLabel,HtmlLabelArr, Param,I,skweb_S 
		  Replace_content = Replace(Replace_content, "{$SKCMS_dir}",MyDbPath)  
		  Replace_content = Replace(Replace_content, "{$SKCMS_temp}",MyDbPath&"skcms_style/"&skweboa.SK_sys(18))   
		  IF lablebq()="false" THEN  
		  Replace_content = Replace(Replace_content, "{$SKCMS_sitename}",skweboa.SK_sys(1)&"ELline CMS")  
		  else
		  Replace_content = Replace(Replace_content, "{$SKCMS_sitename}",skweboa.SK_sys(1))    
		  end if 
		 %>
     <!--#include file="skconfig/SKCMS_lable.cs" -->	 
	 <%	    	 
		 If InStr(Replace_content, "{=SK_todaycount") <> 0 Then
			 HtmlLabel = SelectLabelParameter(Replace_content, "{=SK_todaycount")
			 HtmlLabelArr=Split(HtmlLabel,"$$$")
			 For I=0 To Ubound(HtmlLabelArr)
				 Param = Split(FunctionLabelParam(HtmlLabelArr(I), "{=SK_todaycount"),",")
				 Replace_content = Replace(Replace_content, HtmlLabelArr(I), skweboa.SK_TodayStatistical_model_data(Param(0)))
			 Next
		 End If
	     		
 		 If InStr(Replace_content, "{=SK_listcount") <> 0 Then
			 HtmlLabel = SelectLabelParameter(Replace_content, "{=SK_listcount")
			 HtmlLabelArr=Split(HtmlLabel,"$$$")
			 For I=0 To Ubound(HtmlLabelArr)
				 Param = Split(FunctionLabelParam(HtmlLabelArr(I), "{=SK_listcount"),",")
				 Replace_content = Replace(Replace_content, HtmlLabelArr(I), skweboa.SK_LISTStatistical_model_data(Param(0)))
			 Next
		 End If

		 If InStr(Replace_content, "{=SK_syscount") <> 0 Then
			 HtmlLabel = SelectLabelParameter(Replace_content, "{=SK_syscount")
			 HtmlLabelArr=Split(HtmlLabel,"$$$")
			 For I=0 To Ubound(HtmlLabelArr)
				 Param = Split(FunctionLabelParam(HtmlLabelArr(I), "{=SK_syscount"),",")
				 Replace_content = Replace(Replace_content, HtmlLabelArr(I), skweboa.SK_Statistical_model_data(Param(0)))
			 Next
		 End If
		 
		 SK_Built_in_label = Replace_content
    End Function

	Function SK_ClassLabel_conversion(Replace_content)
		 on error resume next
		 If Application(SkcmsCookies & "SK_Data_classification")<>"Folder"   Then SK_ClassLabel_conversion=Replace_content:Exit Function
		 Replace_content = Replace(Replace_content, "{$classid}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),0))
		 Replace_content = Replace(Replace_content, "{$classname}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),2))
		 Replace_content = Replace(Replace_content, "{$classtitle}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),25))
		 Replace_content = Replace(Replace_content, "{$classkeywords}", skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),8))
		 Replace_content = Replace(Replace_content, "{$classdescription}", skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),9))

		 Replace_content = Replace(Replace_content, "{$classad}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),18))
 
		 
	Replace_content = Replace(Replace_content, "{$SKCMS_subsite}",skweboa.skCMSlist(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),14),2))
	Replace_content = Replace(Replace_content, "{$SKCMS_subsitetitle}",skweboa.skCMSlist(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),14),25))	
	Replace_content = Replace(Replace_content, "{$SKCMS_subsitedescription}",skweboa.skCMSlist(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),14),9))
	Replace_content = Replace(Replace_content, "{$SKCMS_subsitekeywords}",skweboa.skCMSlist(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),14),8))
				 
		 if skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),24)="" then
		 Replace_content = Replace(Replace_content, "{$classimg}","")   		        
		  else
		 Replace_content = Replace(Replace_content, "{$classimg}","<img src="""&skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),24)&"""/>")
		 end if
		 
		 if skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),28)="" then
		 Replace_content = Replace(Replace_content, "{$classico}","")   		        
		  else
		 Replace_content = Replace(Replace_content, "{$classico}","<img src="""&skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),28)&"""/>") 
		 end if
		 
		 Replace_content = Replace(Replace_content, "{$modeid}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),10))
		 Replace_content = Replace(Replace_content, "{$modename}",skweboa.SK_Mroot(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),10),1))
		 Replace_content = Replace(Replace_content, "{$modedw}",skweboa.SK_Mroot(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),10),5))
		 Replace_content = Replace(Replace_content, "{$parentid}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),11))	 
		
	if  skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),11)=0 then
		 Replace_content = Replace(Replace_content, "{$pclassname}",skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),2))
	else 
		 Replace_content = Replace(Replace_content, "{$pclassname}",skweboa.skCMSlist(skweboa.skCMSlist(Application(SkcmsCookies & "ClassID"),11),2))	
	end if 
		 	 
 		 SK_ClassLabel_conversion = Replace_content
	End Function 
		
 	  Public Function ArrayToxml(DataArray,Recordset,row,xmlroot)
			Dim i,node,rs,j
			If xmlroot="" Then xmlroot="xml"
			Set ArrayToxml = Server.CreateObject("msxml2.FreeThreadedDOMDocument"& MsxmlVersion)
			ArrayToxml.appendChild(ArrayToxml.createElement(xmlroot))
			If row="" Then row="row"
			For i=0 To UBound(DataArray,2)
				Set Node=ArrayToxml.createNode(1,row,"")
				j=0
				For Each rs in Recordset.Fields
						 node.attributes.setNamedItem(ArrayToxml.createNode(2,LCase(rs.name),"")).text= DataArray(j,i)& ""
						 j=j+1
				Next
				ArrayToxml.documentElement.appendChild(Node)
			Next
		End Function
  Function SK_CMS_Alllabels(Content)
  			Dim  node 
			If not IsObject(Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")) then
					Dim RS:Set RS = Server.CreateObject("ADODB.Recordset")
 					Set Rs=skweboa.SK_axe("Select id,LabelType,LabelName,LabelContent from Label_skweb")
					if Not RS.eof then
						Set Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")=ArrayToXml(RS.GetRows(-1),rs,"row","")
					end if
					RS.Close:Set RS = Nothing
 			End if

			 		
			For Each Node In Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels").documentElement.SelectNodes("row")
			 	If Node.SelectSingleNode("@labeltype").text = "2" Then 
					Content = Replace(Content, Node.SelectSingleNode("@labelname").text, SK_SQLlabels( "  " & Node.SelectSingleNode("@labelcontent").text))
				Else 
				    Content = Replace(Content, Node.SelectSingleNode("@labelname").text, " " &  Node.SelectSingleNode("@labelcontent").text)
				End If 
  			Next   
 			SK_CMS_Alllabels = Content
		End Function


  Function SK_CMS_Alllabelshtml(Content)
  			Dim  node 
			If not IsObject(Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")) then
					Dim RS:Set RS = Server.CreateObject("ADODB.Recordset")
 					Set Rs=skweboa.SK_axe("Select id,LabelType,LabelName,LabelContent from Label_skweb")
					if Not RS.eof then
						Set Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")=ArrayToXml(RS.GetRows(-1),rs,"row","")
					end if
					RS.Close:Set RS = Nothing
 			End if
			For Each Node In Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels").documentElement.SelectNodes("row")
	
	         	If Node.SelectSingleNode("@labeltype").text = "2" Then 
					Content = Replace(Content, Node.SelectSingleNode("@labelname").text, SK_SQLlabels(Node.SelectSingleNode("@labelcontent").text))
				Else 
				    Content = Replace(Content, Node.SelectSingleNode("@labelname").text, Node.SelectSingleNode("@labelcontent").text)
				End If 	
  			Next   
 			SK_CMS_Alllabelshtml = Content
	End Function
		

		Function ReplaceSK_CMS_Alllabels(Content)
			Dim D:Set D=New SK_Label_conversion
			Content=D.SK_Doing_the_transformation(Content) 
			Set D=nothing
			ReplaceSK_CMS_Alllabels =Content
		End Function
 

		Function SK_SQLlabels(Content)
  			Dim  node 
			If not IsObject(Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")) then
				Dim RS:Set RS = Server.CreateObject("ADODB.Recordset")
				Set Rs=skweboa.SK_axe("Select  id,LabelName,LabelContent from Label_skweb")
				if Not RS.eof then
					Set Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels")=ArrayToXml(RS.GetRows(-1),rs,"row","")
				end if
				RS.Close:Set RS = Nothing
 			End if
			For Each Node In Application(SkcmsCookies&"_ReplaceSK_CMS_Alllabels").documentElement.SelectNodes("row")
				Content = Replace(Content, Node.SelectSingleNode("@labelname").text, Node.SelectSingleNode("@labelcontent").text)
  			Next   
			SK_SQLlabels = Content
		End Function

		Function LableFlag(Content)
			Dim LAaexe, operationlable, Match, parameters_nubs
			Set LAaexe = New RegExp
			LAaexe.Pattern = "{\$[^{\$}]*}"
			LAaexe.IgnoreCase = True
			LAaexe.Global = True
			Set operationlable = LAaexe.Execute(Content)
			LableFlag = Content
			For Each Match In operationlable
				on error resume next
				parameters_nubs = Match.Value
				parameters_nubs = Replace(parameters_nubs, Chr(13) & Chr(10), "")
				parameters_nubs = Replace(parameters_nubs, "{$", "")
				parameters_nubs = Replace(parameters_nubs, "}", "")
				parameters_nubs = Left(parameters_nubs, InStr(parameters_nubs, "(") - 1) & "§" & MID(parameters_nubs, InStr(parameters_nubs, "(") + 1)
				parameters_nubs = Left(parameters_nubs, InStrRev(parameters_nubs, ")") - 1)

				If Err.Number = 0 Then
					LableFlag = Replace(LableFlag, Match.Value, SK_CMSlablehtml(parameters_nubs))
				End If
			Next
		End Function	


 Function SK_CMSlablehtml(Dataparameters)
		   Dim sk_ste:sk_ste = Split(Dataparameters,"§")
			If sk_ste(0) = "" Then
				  SK_CMSlablehtml = ""
				  Exit Function
			End If

			Select Case UCase(sk_ste(0))		
				 Case "CURRENT"   
							  SK_CMSlablehtml =Current(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(6),sk_ste(7), sk_ste(5),sk_ste(8))  
				 Case "GETSPECIAL"'GetSpecial
							  SK_CMSlablehtml =GetSpecial(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4))
				 Case "LINK" 
					   SK_CMSlablehtml = sk_ste(6)&GetLinkList(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5), sk_ste(6), sk_ste(7))&sk_ste(7) 
				Case "PHOTO"
						SK_CMSlablehtml =SK_PHOTO(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5), sk_ste(6), sk_ste(7), sk_ste(8), sk_ste(9), sk_ste(10), sk_ste(11), sk_ste(12),sk_ste(13),sk_ste(14),sk_ste(15))
			    Case "LIST"  
		                If 	 skweboa.SK_Mroot(Application(SkcmsCookies & "ModeID"),3) = "0"   Or skweboa.SK_Mroot(Application(SkcmsCookies & "ModeID"),3) = "2" Or Application(SkcmsCookies & "Make")="No" Then 
								SK_CMSlablehtml=Dataparameters
								Application(SkcmsCookies &"PageParam")=Dataparameters
								Application(SkcmsCookies & "Make")="Yes"						  
						Else 		
			SK_CMSlablehtml = skweboa_lsit(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5), sk_ste(6), sk_ste(7), sk_ste(8), sk_ste(9), sk_ste(10), sk_ste(11), sk_ste(12), sk_ste(13), sk_ste(14))
						End If 				
				Case "NAV"
				             dim sk_stea:sk_stea= skweb_Navano(sk_ste(6),sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5),sk_ste(8),sk_ste(9),sk_ste(7))
							 SK_CMSlablehtml =sk_stea
						 
				Case "RELATED"  
				             dim related_A:related_A=related_Article(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5), sk_ste(6), sk_ste(7), sk_ste(8), sk_ste(9))
							 SK_CMSlablehtml = sk_ste(10)&related_A&sk_ste(11)	
							 if  related_A=skweboa.SK_sys(24) then  SK_CMSlablehtml ="" 			 
				Case "FOR"  
							 SK_CMSlablehtml = GetListForno(sk_ste(1), sk_ste(2), sk_ste(3), sk_ste(4), sk_ste(5), sk_ste(6), sk_ste(7), sk_ste(8), sk_ste(9), sk_ste(10), sk_ste(11), sk_ste(12), sk_ste(13),sk_ste(14),sk_ste(15),sk_ste(16),sk_ste(17),sk_ste(18),sk_ste(19))
				Case Else
					   SK_CMSlablehtml = sk_ste(0)&"标签无法运行"
					   Exit Function
				 End Select
		End Function

		
		Function SK_modestyle(MID,SK_Template_content_output) 
			Dim deomcidsa,Nuber
			deomcidsa=skweboa.SK_Return_Mode(MID,1)
			If IsArray(deomcidsa) Then
			  For Nuber=0 To Ubound(deomcidsa,2)
				 If Not IsNull(SK_GetNodehtml("" &LCase(deomcidsa(0,Nuber)) & "")) Then
				  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & deomcidsa(0,Nuber) & "}",SK_GetNodehtml("" &LCase(deomcidsa(0,Nuber)) & ""))
				 Else
				  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & deomcidsa(0,Nuber) & "}","")
				 End If
			  Next
			End If
			SK_modestyle=SK_Template_content_output
		End Function	
%>
		

<!--#include file="sk.list.cs" --> 

<% 
		 

		Function GCssID(ID)
		  If ID="" Then GCssID="" Else GCssID=" ID=""" & ID & """"
		End Function  

		Function GCss(CssName)
 			 If CssName = "" Then  GCss = "" Else GCss = " class=""" & CssName & """"
		End Function

		Function GNavi(NaviType, NaviStr)
		 If CStr(NaviType) = "0" Then
			 If NaviStr = "" Then GNavi = "" Else GNavi = NaviStr
		 ElseIf CStr(NaviType) = "1" Then
		     If NaviStr <> "" Then  GNavi = "<img src=""" & MyDbPath&NaviStr & """ border=""0""/>&nbsp;"
		 Else
			 GNavi = ""
		 End If
		End Function
 	
 		Function CodeDateStr(UpdateTime,DateForm)
			   If CStr(DateForm) <> "0" And CStr("DateForm") <> "" Then
					Dim NowDate
						 CodeDateStr=DateFormat(UpdateTime, DateForm)
			  Else
						 CodeDateStr= DateFormat(UpdateTime,1)
			  End If
		End Function
 
 		Function DateFormat(DateStr, Types)
			Dim DateString
			If IsDate(DateStr) = False Then
				DateFormat = "":Exit Function
			End If
			Select Case CStr(Types)
			  Case "0"
				DateFormat = ""
				Exit Function
			  Case 1,21,41
			      DateString=Year(DateStr) & "-" & Right("0" & Month(DateStr), 2) & "-" & Right("0" & Day(DateStr), 2)
			      if Types=21 then
				   DateString = "(" & DateString &")"
				  elseIf Types=41 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 2,22,42
			      DateString=Year(DateStr) & "." & Right("0" & Month(DateStr), 2) & "." & Right("0" & Day(DateStr), 2)
			      if Types=22 then
				   DateString = "(" & DateString &")"
				  elseIf Types=42 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 3,23,43
			      DateString=Year(DateStr) & "/" & Right("0" & Month(DateStr), 2) & "/" & Right("0" & Day(DateStr), 2)
			      if Types=23 then
				   DateString = "(" & DateString &")"
				  elseIf Types=43 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 4,24,44
			      DateString=Right("0" & Month(DateStr), 2) & "/" & Right("0" & Day(DateStr), 2) & "/" & Year(DateStr)
			      if Types=24 then
				   DateString = "(" & DateString &")"
				  elseIf Types=44 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 5,25,45
				  DateString = Year(DateStr) & "年" & Right("0" & Month(DateStr), 2) & "月"
			      if Types=25 then
				   DateString = "(" & DateString &")"
				  elseIf Types=45 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 6,26,46
				  DateString = Year(DateStr) & "年" & Right("0" & Month(DateStr), 2) & "月" & Right("0" & Day(DateStr), 2) & "日"
			      if Types=26 then
				   DateString = "(" & DateString &")"
				  elseIf Types=46 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 7,27,47
				  DateString = Right("0" & Month(DateStr), 2) & "." & Right("0" & Day(DateStr), 2) & "." & Year(DateStr)
			      if Types=27 then
				   DateString = "(" & DateString &")"
				  elseIf Types=47 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 8,28,48
				  DateString = Right("0" & Month(DateStr), 2) & "-" & Right("0" & Day(DateStr), 2) & "-" & Year(DateStr)
				  if Types=28 then
				   DateString = "(" & DateString &")"
				  elseIf Types=48 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 9,29,49
				  DateString = Right("0" & Month(DateStr), 2) & "/" & Right("0" & Day(DateStr), 2)
				  if Types=29 then
				   DateString = "(" & DateString &")"
				  elseIf Types=49 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 10,30,50
				  DateString = Right("0" & Month(DateStr), 2) & "." & Right("0" & Day(DateStr), 2)
			      if Types=30 then
				   DateString = "(" & DateString &")"
				  elseIf Types=50 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 11,31,51
				  DateString = Right("0" & Month(DateStr), 2) & "月" & Right("0" & Day(DateStr), 2) & "日"
			      if Types=31 then
				   DateString = "(" & DateString &")"
				  elseIf Types=51 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 12,32,52
				  DateString = Right("0" & Day(DateStr), 2) & "日" & Right("0" & Hour(DateStr), 2) & "时"
				  if Types=32 then
				   DateString = "(" & DateString &")"
				  elseIf Types=52 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 13,33,53
				  DateString = Right("0" & Day(DateStr), 2) & "日" & Right("0" & Hour(DateStr), 2) & "点"
			      if Types=33 then
				   DateString = "(" & DateString &")"
				  elseIf Types=53 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 14,34,54
				  DateString = Right("0" & Hour(DateStr), 2) & "时" & Minute(DateStr) & "分"
				  if Types=34 then
				   DateString = "(" & DateString &")"
				  elseIf Types=54 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 15,35,55
				  DateString = Right("0" & Hour(DateStr), 2) & ":" & Right("0" & Minute(DateStr), 2)
			      if Types=35 then
				   DateString = "(" & DateString &")"
				  elseIf Types=55 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 16,36,56
				  DateString = Right("0" & Month(DateStr), 2) & "-" & Right("0" & Day(DateStr), 2)
				 if Types=36 then
				   DateString = "(" & DateString &")"
				  elseIf Types=56 then
				  	DateString = "[" & DateString &"]"
				  end if
			  Case 17,37,57
				  DateString = Right("0" & Month(DateStr), 2) & "/" & Right("0" & Day(DateStr), 2) &" " &Right("0" & Hour(DateStr), 2)&":"&Right("0" & Minute(DateStr), 2)
				  if Types=37 then
				   DateString = "(" & DateString &")"
				  elseIf Types=57 then
				  	DateString = "[" & DateString &"]"
				  end if
				  
			Case 18,26,46

				  DateString = Right("0" & Month(DateStr), 2) & "-" & Right("0" & Day(DateStr), 2) & "-" &Year(DateStr) & "," &Right("0" & Hour(DateStr), 2) & ":" & Minute(DateStr) & ":"& second(DateStr)
			      if Types=26 then
				   DateString = "(" & DateString &")"
				  elseIf Types=46 then
				  	DateString = "[" & DateString &"]"
				  end if
				  

		Case 19,26,46		  
 DateString = Cedate(Right(Month(DateStr), 2))&" "& Right("" & Day(DateStr), 2) & ", " &Year(DateStr) & " " &Right("" &Hour(DateStr),2) &":"&Minute(DateStr)&":"& second(DateStr)
			      if Types=26 then
				   DateString = "(" & DateString &")"
				  elseIf Types=46 then
				  	DateString = "[" & DateString &"]"
				  end if
				   
			  Case Else
				  DateString = DateStr
			 End Select
			 DateFormat = DateString
	 End Function
	 Function lablebq()
             IF skweboa.SK_sys(40)<>"Ofem8"&skcmscodeJ(skweboa.SK_sys(6)&skweboa.SK_sys(39)&skweboa.SK_sys(12))&"ewlbf"  then
			 lablebq="false"
			 else
			 lablebq="true"			 
			 end if
 	End Function
function   Cedate(strdate)   
      month1=month(strdate)   
      select   case   month1   
  case   1   
  str_month="JAN"   
  case   2   
  str_month="FEB"   
  case   3   
  str_month="MAR"   
  case   4   
  str_month="APR"   
  case   5   
  str_month="MAY"   
  case   6   
  str_month="JUN"   
  case   7   
  str_month="JUL"   
  case   8   
  str_month="AUG"   
  case   9   
  str_month="SEP"   
  case   10   
  str_month="OCT"   
  case   11   
  str_month="NOV"   
  case   12   
  str_month="DEC"   
        end   select   
        str_month=str_month
        Cedate=str_month   
        end   function 
	  Function SelectLabelParameter(Content, MatchStr)
			Dim regEx, Matches, Match,N
			Set regEx = New RegExp
			regEx.Pattern = MatchStr & "[^{\=}]([\s\S]+?)}"
			regEx.IgnoreCase = True
			regEx.Global = True
			Set Matches = regEx.Execute(Content)
			SelectLabelParameter = ""
			For Each Match In Matches
				 on error resume next
 				N=N+1
				IF N=1 Then
				SelectLabelParameter = Match.Value
				Else
				 SelectLabelParameter=SelectLabelParameter & "$$$" & Match.Value
				End IF
			Next
		End Function
		Function FunctionLabelParam(Content, MatchStr)
		FunctionLabelParam = Replace(Content, MatchStr & "(", "")
		FunctionLabelParam = Replace(Replace(FunctionLabelParam, ")}", ""), """", "")
		End Function	
%>
 
<%
End Class
%>