<%@ Language=VBScript EnableSessionState=False %> <% Option Explicit Response.buffer = True dim v59,filename,useMysql,v124,v22,v19,v68,v43,v135,v103,v113,v69,v110,v120,v146,v145,v47,v49,v72,v62,v151,v24,v71,defaultVisualBaseName,bkgdColor,scrollInfoDisplay,tptBkgd,forceXMLplaylist,randomOnLoad,shuffleOnLoad,defaultImage,voteScript,trackPlays,wimpyApp,wimpySwf,v38,useConfigFile,v107,randomButtonState,startOnTrack,autoAdvance,bufferAudio,v122,v121,v130,v128,v93,wimpySkin,useSysCodePage,serveMP3 dim v118,ecomWindow,strAbv114,v129,v102,v5,hide_files,v147,j,v142,items,v53,v106,v115,v1,v52,v96,v116,totalv7,v152,v7,v117,tf,fso,v82,v77,v25,QueryString,playerH,playerW,playerSize_value,v137,destination,v138,v2,v3,v134,v65,v131,v133,v66,v132,v114,v4,v56,v148,v149,defaultVisualExt,defaultVisualName,ecommerce,forceDownload,hide_folders,defaultPlaylistFilename,myDataSetup,pwd,user,table,db,v63 dim v144,v111,theVolume,popUpHelp,startPlayingOnload,defaultPlayRandom,infoDisplayTime,displayDownloadButton,background_color,wimpyHTMLpageTitle,playlisterOutputDirName,getMyid3info,action,theFile,v58,queryValue,queryWhere,v91,dir,v40,v105,v104,retval,MP3,v127,v64,v98,v57,v39,v94,v20,v0,v6,v73,v45,v23,v140,v136,x,v99,v101,v100,v37,v15,v78,v54,v55,v48,v79,v125,v83,i,try,k dim v143,v81,v16,v70,v85,v46,v17,v80,bob,v9,v11,v12,v14,v97,b,v50,v67,v42,v8,v123,v75,v76,v88,v84,v89,v92,v86,v109,v108,v44,v139,v51,v35,v27,v26,v36,v33,v29,v28,v31,v34,v30,v32,v119,v21,fs,v61,value,v74,v13,v10,v41,theWidth,theHeight,v112,v60 dim v150,v90,httpOption,startDir,loopPlaylist,wimpyVersion,wimpyConfigFile,myWimpySWFfilename,wimpy_auth,media_types,mediaExtMp3,myCodePage Response.Clear On Error Resume Next '// // '// available at http://www.wimpyplayer.com // '// ©2002-2006 plaino // '// // '// by Mike Gieson // '// available at http://www.wimpyplayer.com // '// ©2002-2006 plaino // '// // '// // '// // '///////////////////////////////////////////////////////////////// '// // '// INSTALLATION: // '// // '///////////////////////////////////////////////////////////////// '// '// Upload wimpy.php and wimpy.swf to the folder that '// contains your mp3's. '// '// USE AT YOUR OWN RISK. '// wimpyVersion = "v2.2.5" wimpyConfigFile = "wimpyAVConfigs.xml" myWimpySWFfilename = "wimpyAV.swf" media_types = "xml,mp3,swf,flv" mediaExtMp3 = "mp3" ' httpOption = "https" httpOption = "http" '// '// myCodePage '// If you are experiencing problems displaying glyphs and other '// double-byte (multibyte) characters, set the proper codepage '// for your language's characters set here. Use the following '// link to determine the proper codepage for your language: '// http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charset4.asp myCodePage = 65001 '///////////////////////////////////////////////////////////////// '// // '// Do not edit anything below here unless // '// you really know what you are doing! // '// // '///////////////////////////////////////////////////////////////// '///////////////////////////////////////////////////////////////// '///////////////////////////////////////////////////////////////// '///////////////////////////////////////////////////////////////// '///////////////////////////////////////////////////////////////// '//> myDataSetup = "filename|artist|album|title|track|comments|genre|seconds|filesize|bitrate|visual" set v57 = CreateObject("Scripting.FileSystemObject") set v39 = CreateObject("Scripting.Dictionary") v39.add "physical", v57.getparentfoldername(request.servervariables("PATH_TRANSLATED")) v90 = v39("physical") v39.add "www", httpOption & "://" & request.servervariables("SERVER_NAME") & v57.getparentfoldername(request.servervariables("PATH_INFO")) v19 = split(request.servervariables("PATH_INFO"), "/") v94 = v19(Ubound(v19)) set v38 = CreateObject("Scripting.Dictionary") set v43 = CreateObject("Scripting.FileSystemObject") useConfigFile = false If v43.FileExists((v39("physical") & "\" & wimpyConfigFile)) Then Set v107 = Server.CreateObject("Microsoft.XMLDOM") v107.async = False v107.Load (v39("physical") & "\" & wimpyConfigFile) If v107.parseError.errorCode <> 0 Then useConfigFile = false else useConfigFile = true end if if useConfigFile = true then Set v113 = v107.documentElement Set v103 = v113.getElementsByTagName("*") if v103.length > 4 then For i = 0 to (v103.length-1) v38.add v103.item(i).nodeName, v103.item(i).text Next end if end if end if set v43 = nothing If v38.Exists("wimpySwf") = false Then v38.add "wimpySwf", v39("www") & "/" & myWimpySWFfilename end if If v38.Exists("wimpyApp") = false Then v38.add "wimpyApp", v39("www") & "/" & v94 end if If v38.Exists("wimpySkin") = false Then v38.add "wimpySkin", "" end if If v38.Exists("tptBkgd") = false Then v38.add "tptBkgd", "" end if If v38.Exists("defaultVisualExt") = false Then v38.add "defaultVisualExt", "jpg" end If If v38.Exists("defaultVisualBaseName") = false Then v38.add "defaultVisualBaseName", "coverart" end if If v38.Exists("bkgdColor") = false Then v38.add "bkgdColor", "000000" end if If v38.Exists("startDir") = false Then v38.add "startDir", "" end if If v38.Exists("hide_folders") = false Then v38.add "hide_folders", "goodies,playlister_output,skins,getid3,_private,_private,_vti_bin,_vti_cnf,_vti_pvt,_vti_txt,cgi-bin" end if If v38.Exists("hide_files") = false Then v38.add "hide_files", "skin.xml,wimpyConfigs.xml,wimpyAVConfigs.xml,wimpy.swf,wimpyAV.swf,wasp.swf,wimpy_button.swf" end if If v38.Exists("wimpyHTMLpageTitle") = false Then v38.add "wimpyHTMLpageTitle", "Wimpy Player" end if If v38.Exists("getMyid3info") = false Then v38.add "getMyid3info", "" end if If v38.Exists("ecommerce") = false Then v38.add "ecommerce", "" end If If v38.Exists("v49") = false Then v38.add "v49", 0 end If If v38.Exists("v47") = false Then v38.add "v47", 0 end If wimpySwf = v38("wimpySwf") wimpyApp = v38("wimpyApp") tptBkgd = v38("tptBkgd") bkgdColor = v38("bkgdColor") startDir = v38("startDir") hide_folders = v38("hide_folders") hide_files = v38("hide_files") wimpyHTMLpageTitle = v38("wimpyHTMLpageTitle") getMyid3info = v38("getMyid3info") ecommerce = v38("ecommerce") v49 = v38("v49") v47 = v38("v47") if v49 < 1 or v47 < 1 then v145 = false v49 = "100%" v47 = "100%" end if if NOT startDir = "" Then v39("physical") = startDir end if v5 = Split(hide_files, ",") v6 = Split(hide_folders, ",") v40 = Split("Blues,Classic Rock,Country,Dance,Disco,Funk,Grunge,Hip-Hop,Jazz,Metal,New Age,Oldies,Other,Pop,R&B,Rap,Reggae,Rock,Techno,Industrial,Alternative,Ska,Death Metal,Pranks,Soundtrack,Euro-Techno,Ambient,Trip-Hop,Vocal,Jazz+Funk,Fusion,Trance,Classical,Instrumental,Acid,House,Game,Sound Clip,Gospel,Noise,Altern Rock,Bass,Soul,Punk,Space,Meditative,Instrumental Pop,Instrumental Rock,Ethnic,Gothic,Darkwave,Techno-Industrial,Electronic,Pop-Folk,Eurodance,Dream,Southern Rock,Comedy,Cult,Gangsta,Top 40,Christian Rap,Pop/Funk,Jungle,Native American,Cabaret,New Wave,Psychadelic,Rave,Showtunes,Trailer,Lo-Fi,Tribal,Acid Punk,Acid Jazz,Polka,Retro,Musical,Rock & Roll,Hard Rock,Folk,Folk/Rock,National Folk,Swing,Bebob,Latin,Revival,Celtic,Bluegrass,Avantgarde,Gothic Rock,Progressive Rock,Psychedelic Rock,Symphonic Rock,Slow Rock,Big Band,Chorus,Easy Listening,Acoustic,Humour,Speech,Chanson,Opera,Chamber Music,Sonata,Symphony,Booty Bass,Primus,Porn Groove,Satire,Slow Jam,Club,Tango,Samba,Folklore", ",") v0 = split(myDataSetup, "|") function f5(theURL) v136 = v39("www") & "/" f5 = v39("physical") & "\" & Replace(Replace(theURL, v136, ""), "/", "\") end function function f4(theFilePath) v136 = v39("physical") & "\" f4 = Replace(theFilePath, v136, "") end function function f6(theURL) v136 = v39("www") & "/" f6 = Replace(theURL, v136, "") end function function f2(theString_in) v97 = "" b = 0 for i=0 to len(theString_in)-1 b = b + 1 v50 = false v67 = mid(theString_in, b, 1) v42 = Asc(v67) if v42 < 46 then bob = "%" & Hex(v42) elseif v42 > 58 AND v42 < 65 then bob = "%" & Hex(v42) elseif v42 > 90 AND v42 < 97 then bob = "%" & Hex(v42) else bob = v67 end if v97 = v97 & bob next f2 = v97 end function function f3(theStringIn) f3 = Server.URLEncode(theStringIn) end function function f0(thebytes) For x = 1 to LenB(thebytes) If AscB(MidB(thebytes, x, 1)) <> 0 Then f0 = f0 & Chr(AscB(MidB(thebytes, x, 1))) End If Next End function function f1(sPath) dim v18() redim v81(Ubound(v0)) Set v99 = CreateObject("Scripting.FileSystemObject") Set v105 = v99.GetFolder(sPath) Set v104 = Server.CreateObject("ADODB.Stream") v104.Type = 1 v45 = 0 v24 = "" Set v37 = CreateObject("Scripting.FileSystemObject") Set v15 = v105.SubFolders redim v16(v15.Count) v125 = 0 For Each v79 in v15 v16(v125) = v79.Name v125 = v125 + 1 next For Each v78 in v16 v48 = true if Len(join(Filter(v6, v78), "")) > 0 then v48 = false end if if InStr(LCase(v78), "skin") > 0 then v48 = false end if if v48 = true then v81(0) = v73 & "/" & v78'v54("filename") v81(1) = v78 'v54("artist") v81(2) = "" 'v54("album") v81(3) = v78 'v54("title") v81(4) = "" 'v54("track") v81(5) = "" 'v54("comments") v81(6) = "" 'v54("genre") v81(7) = "" 'v54("seconds") v81(8) = "" 'v54("filesize") v81(9) = "" 'v54("bitrate") v81(10) = "" 'v54("visual") for k=0 to Ubound(v81) v81(k) = f3(v81(k)) Next v24 = v24 & "&item" & v45 & "=" & join(v81, "|") v45 = v45 + 1 end if Next v8 = split(media_types, ",") For Each MP3 in v105.Files if Not LCase(MP3.name) = LCase(join(Filter(v5, MP3.name, true), "")) Then if LCase(v37.GetExtensionName(MP3)) = LCase(join(Filter(v8, LCase(v37.GetExtensionName(MP3)), true), "")) then set v54 = CreateObject("Scripting.Dictionary") v55 = MP3.name v123 = false v54.add "filename", v73 & "/" & v55 if LCase(v37.GetExtensionName(MP3)) = LCase(mediaExtMp3) then If getMyid3info= "yes"Then v54.add "filesize", Round((MP3.Size * .000001), 2) v104.Open v104.LoadFromFile MP3.Path v104.Position = v104.Size - 128 If UCase(f0(v104.Read(3))) = "TAG" Then v54.add "title", f0(v104.Read(30)) v54.add "artist", f0(v104.Read(30)) v54.add "album", f0(v104.Read(30)) v54.add "track", f0(v104.Read(4)) v127 = v104.Read(30) If AscB(MidB(v127, 29, 1)) = 0 AND AscB(MidB(v127, 30, 1)) > 0 AND AscB(MidB(v127, 30, 1)) < 256 Then v54.add "comments", f0(LeftB(v127, 28)) Else v54.add "comments", f0(v127) End If v54.add "genre", "" Else v54.add "artist", "" v54.add "album", "" v54.add "title", "" v54.add "track", "" v54.add "comments", "" v54.add "genre", "" End If v104.Close v54.add "bitrate", "" v54.add "seconds", "" else v54.add "filesize", "" v54.add "artist", "" v54.add "album", "" v54.add "title", "" v54.add "track", "" v54.add "comments", "" v54.add "genre", "" v54.add "bitrate", "" v54.add "seconds", "" End If Else if InStr(LCase(MP3.name), "skin") > 0 then v123 = true end if if InStr(LCase(MP3.name), "config") > 0 then v123 = true end if if v123 = false then v54.add "filesize", "" v54.add "artist", "" v54.add "album", "" v54.add "title", "" v54.add "track", "" v54.add "comments", "" v54.add "genre", "" v54.add "bitrate", "" v54.add "seconds", "" end if set v113 = nothing set v107 = nothing End If if v123 = false then v4 = left(v55,InStrRev(v55, ".")-1) v56 = v4 & "." & defaultVisualExt v148 = v73 & "/" & v56 v149 = f5(v148) If v37.FileExists(v149) Then if not startDir = "" then v148 = v39("www") & "/" & v94 & "?action=getCoverart&theFile=" & v148 end if v54.add "visual", v148 else v54.add "visual", "" End If for k=0 to Ubound(v0) v81(k) = f3(v54(v0(k))) next redim Preserve AmyFiles(v45) AmyFiles(v45) = "&item" & v45 & "=" & join(v81, "|") v45 = v45 + 1 end if set v54 = nothing end if end if Next v148 = v73 & "/" & defaultVisualBaseName & "." & defaultVisualExt v149 = f5(v148) If v37.FileExists(v149) Then if not startDir = "" then v148 = f3(v39("www") & "/" & v94 & "?action=getCoverart&theFile=" & v148) end if v147 = "&visualURL=" & v148 else v147 = "" End If Set v104 = Nothing Set v105 = Nothing Set v99 = Nothing v24 = v24 & join(AmyFiles, "") f1 = v24 & "&datasetup=" & myDataSetup & v147 & "&totalitems=" & v45 end function if IsEmpty(Request.QueryString("getMyid3info")) then getMyid3info = getMyid3info else getMyid3info = Request.QueryString("getMyid3info") end if if IsEmpty(Request.QueryString("action")) then action = "" else action = Request.QueryString("action") end if if IsEmpty(Request.QueryString("theFile")) then theFile = "" else theFile = Request.QueryString("theFile") end if if IsEmpty(Request.QueryString("filename")) then filename = "" else filename = Request.QueryString("filename") end if if IsEmpty(Request.QueryString("dir")) then dir = "" else dir = Request.QueryString("dir") end if if IsEmpty(Request.QueryString("useMysql")) then useMysql = "" else useMysql = Request.QueryString("useMysql") end if if IsEmpty(Request.QueryString("destination")) then destination = "" else destination = Request.QueryString("destination") end if if IsEmpty(Request.QueryString("items")) then items = "" else items = Request.QueryString("items") end if if IsEmpty(Request.QueryString("queryValue")) then queryValue = "" else queryValue = Request.QueryString("queryValue") end if if IsEmpty(Request.QueryString("queryWhere")) then queryWhere = "" else queryWhere = Request.QueryString("queryWhere") end if if not isEmpty(Request.QueryString("defaultVisualExt")) then defaultVisualExt = Request.QueryString("defaultVisualExt") end If if not isEmpty(Request.QueryString("defaultVisualBaseName")) then defaultVisualBaseName = Request.QueryString("defaultVisualBaseName") end if Function URLDecode(byVal v53) v131 = v53 : v133 = _ "" : v66 = Instr(v131, "+") Do While v66 v132 = "" : v134 = "" If v66 > 1 then _ v132 = Left(v131, v66 - 1) If v66 < len(v131) then _ v134 = Mid(v131, v66 + 1) v131 = v132 & " " & v134 v66 = InStr(v131, "+") v65 = v65 + 1 Loop v66 = InStr(v131, "%") Do while v66 If v66 > 1 then _ v133 = v133 & _ Left(v131, v66 - 1) v133 = v133 & _ Chr(CInt("&H" & _ mid(v131, v66 + 1, 2))) If v66 > (len(v131) - 3) then v131 = "" Else v131 = Mid(v131, v66 + 3) End If v66 = InStr(v131, "%") Loop URLDecode = v133 & v131 End Function Function formatDate(myDate, offset) dim v87,v95 myDate = CDate(myDate) v75 = WeekdayName(Weekday(myDate),true) v76 = Day(myDate) v87 = MonthName(Month(myDate), true) v95 = Year(myDate) v84 = zeroPad(Hour(myDate), 2) v86 = zeroPad(Minute(myDate), 2) v92 = zeroPad(Second(myDate), 2) formatDate = v75&", "& _ v76&" "& _ v87&" "& _ v95&" "& _ v84&":"& _ v86&":"& _ v92&" "& _ offset End Function Function zeroPad(m, t) zeroPad = String(t-Len(m),"0")&m End Function v71 = false function f7(theString) v135 = theString v135 = Replace(v135, Chr(10), "x") v135 = Replace(v135, Chr(13), "x") v135 = Replace(v135, Chr(9), "x") v135 = Replace(v135, "\", "x") v135 = Replace(v135, "./", "x") v135 = Replace(v135, "..", "x") f7 = v135 end function If action="getVersion" Then Response.Write wimpyVersion elseif action="dir" Then Response.codepage = myCodePage Response.CharSet = "utf-8" v73 = dir retval = f1(f5(f7(v73))) Response.Write retval ElseIf action="getCoverart" Then v1 = split(theFile, "/") v52 = v1(Ubound(v1)) v114 = v39("physical") & "\" & Replace(theFile, v39("www") & "/", "") strAbv114 = v114 Set v99 = Server.CreateObject("Scripting.FileSystemObject") If v99.FileExists(strAbv114) Then Set v102 = v99.GetFile(strAbv114) Response.AddHeader "Pragma", "public" Response.AddHeader "Expires", "Thu, 19 Nov 1981 08:52:00 GMT" Response.AddHeader "Cache-Control", "must-revalidate, post-check=0, pre-check=0" Response.AddHeader "Cache-Control", "no-store, no-cache, must-revalidate" Response.AddHeader "Cache-Control", "private" Response.AddHeader "Content-Length", v102.Size Response.ContentType = "image/jpeg" Set v106 = Server.CreateObject("ADODB.Stream") v106.Open v106.Type = 1 v106.LoadFromFile(strAbv114) Response.BinaryWrite(v106.Read) v106.Close Set v106 = Nothing Set v102 = Nothing End If Set v99 = Nothing ElseIf action="serveMP3" OR action="downloadfile" Then if not startDir = "" then v1 = split(theFile, "/") v52 = v1(Ubound(v1)) v114 = v39("physical") & "\" & Replace(theFile, v39("www") & "/", "") strAbv114 = v114 else v114 = f5(f7(theFile)) v1 = split(theFile, "/") v52 = v1(Ubound(v1)) v114 = Replace(theFile, v39("www") & "/", "") strAbv114 = Server.MapPath(v114) end if Set v99 = Server.CreateObject("Scripting.FileSystemObject") If v99.FileExists(strAbv114) Then Set v102 = v99.GetFile(strAbv114) Response.AddHeader "Pragma", "public" Response.AddHeader "Expires", "Thu, 19 Nov 1981 08:52:00 GMT" Response.AddHeader "Cache-Control", "must-revalidate, post-check=0, pre-check=0" Response.AddHeader "Cache-Control", "no-store, no-cache, must-revalidate" Response.AddHeader "Cache-Control", "private" if action="downloadfile" Then Response.AddHeader "Content-Disposition", ("attachment; filename=""" & v102.Name & """") end if Response.AddHeader "Content-Length", v102.Size Response.ContentType = "audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3" Set v106 = Server.CreateObject("ADODB.Stream") v106.Open v106.Type = 1 Response.CharSet = "UTF-8" v106.LoadFromFile(strAbv114) Response.BinaryWrite(v106.Read) v106.Close Set v106 = Nothing Set v102 = Nothing End If Set v99 = Nothing ElseIf action="getstartupdirlist" Then Response.codepage = myCodePage Response.CharSet = "utf-8" v73 = v39("www") retval = f1(v39("physical")) Response.Write retval Else queryString = "" queryString = queryString & wimpySwf if useConfigFile = true then queryString = queryString & "?wimpyConfigs=" & v39("www") & "/" & wimpyConfigFile else queryString = queryString & "?wimpyApp=" & wimpyApp end if v118 = VBNewLine if bkgdColor = "" then bkgdColor = "000000" end if if tptBkgd = "yes" then v146 = true else v146 = false end if if v146 then v143 = "wmode=""transparent" v144 = "" & v118 else v143 = "" v144 = "" end if v59 = "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & wimpyHTMLpageTitle & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & " " & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "
" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 v59 = v59 & v144 v59 = v59 & "" & v118 v59 = v59 & "
" & v118 v59 = v59 & "" & v118 v59 = v59 & "" & v118 Response.Write v59 End If set v57 = nothing set v39 = nothing set v38 = Nothing Response.Flush %>