% @Language = VBSCRIPT %> <%If Request.QueryString("ContentID") > "" Then%> <% Set rsContent = Server.CreateObject("ADODB.Recordset") rsContent.ActiveConnection = ConnectionString rsContent.Source = "SELECT * FROM Content WHERE ID = " & Request.QueryString("ContentID") & "" rsContent.CursorType = 3 rsContent.CursorLocation = 3 rsContent.LockType = 1 rsContent.Open %> <%End IF%> <% If Not rsContent.EOF Then Dim pageContent pageContent = rsContent("PageContent") Dim reFlash Set reFlash = New RegExp reFlash.IgnoreCase = True reFlash.Global = True 'reFlash.Pattern = "\[\[\s*flash file='([^']+)'( ([^=]+)='([^']+)')*\s*\]\]" reFlash.Pattern = "\[\[\s*flash file='([^']+)'.*\]\]" Dim flashTagCount flashTagCount = 0 Set tagMatches = reFlash.Execute(pageContent) flashTagCount = tagMatches.Count Dim flvFilename, autoplay, flashHeight, flashWidth, flashAlign, flashPreview, flvTemplate flvFilename = "" autoplay = "true" flashHeight = "300" flashWidth = "300" flashAlign = "center" flashPreview = "uploads/video1.jpg" For i = 0 To tagMatches.Count - 1 reFlash.Pattern = " ([^=]+)='([^']+)'" Dim attribMatches Set attribMatches = reFlash.Execute(tagMatches(i).Value) flvTemplate = "" For Each match In attribMatches For j = 0 To match.SubMatches.Count - 1 attrib = LCase(match.SubMatches(j)) value = LCase(match.SubMatches(j + 1)) Select Case attrib Case "file" flvFilename = value Case "autoplay" autoplay = value Case "height" flashHeight = value Case "width" flashWidth = value Case "align" flashAlign = value Case "preview" flashPreview = value End Select j = j + 1 Next Next ' Response.Write(flvFilename & " " & autoplay & " " & flashHeight & " " & flashWidth & " " & flashAlign) flvTemplate = _ "