%@ Language=VBScript EnableSessionState=False %><%
'
'
' Welcome to Andromeda!
' ------------------------------------------------------------
'
' Thanks for choosing to evaluate Andromeda. You'll find it to
' be easy to set up, fully-featured, and highly configurable.
' To get started, please check out the online documentation:
'
' http://www.turnstyle.com/andromeda/docs.asp
'
'
' To purchase your copy, please visit:
'
' http://www.turnstyle.com/andromeda
'
'
'
' Note
' ------------------------------------------------------------
' Configure Andromeda with a preference file (don't change any
' of this code). See this page for details:
'
' http://www.turnstyle.com/andromeda/preferences.asp
'
'
' If you run multiple copies of Andromeda and want this copy
' to use a different prefs file, you can change the file name
' below.
'
' Any other changes to the code violate the terms of the
' license and will prevent it from working properly.
andromedaPrefsFileName = "andromedaPrefs.asp"
' ------------------------------------------------------------
' License Agreement
' ------------------------------------------------------------
'
' This software is the copyrighted material of Scott Matthews,
' Turnstyle. This document is a license agreement. By running
' this software on your computer you agree to the terms of
' this license.
'
' The Andromeda Evaluation is licensed for non-commercial,
' evaluation purposes only. The evaluation period is not to
' exceed one month, after which you agree to purchase the
' appropriately licensed version if you choose to continue
' using Andromeda.
'
' Additional licensing information is available from
' info@turnstyle.com.
'
' You agree not to copy or distribute this software or change
' the source code without prior written permission. Please
' send any questions or comments to info@turnstyle.com.
'
' Scott Matthews, Turnstyle takes no responsibility for any
' damage that this software might cause.
'
' This software is designed to provide access to collections
' of files. By using it, you agree to comply with all federal
' and state laws applicable to such content, as well as the
' terms of this license. You agree not to use this software
' to distribute or faciliate the distribution of unauthorized
' copies of copyrighted works.
'
' If you disagree with any of these terms, you are not
' authorized to use this software. If you do agree with these
' terms, please enjoy.
'
' Copyright (c)1999-2002 Scott Matthews, Turnstyle
' http://www.turnstyle.com/andromeda
'
'
' ------------------------------------------------------------
Set local_fs = CreateObject("Scripting.FileSystemObject")
sub loadConstants
andromedaConst.add "andromedaVersion", "1.9.3.4 ASP"
andromedaConst.add "localUser", (request.servervariables("local_addr") = request.servervariables("remote_addr"))
andromedaConst.add "scriptFileName", local_fs.GetFileName(request.servervariables("path_info"))
andromedaConst.add "scriptPhysicalPath", local_fs.getparentfoldername(request.servervariables("path_translated"))
andromedaConst.add "appauth", "Scott Matthews"
andromedaConst.add "appcorp", "Turnstyle"
andromedaConst.add "appname", "Andromeda"
andromedaConst.add "approot", "http://www.turnstyle.com/andromeda"
andromedaConst.add "edition", "EVALUATION COPY"
end sub
sub loadDefaults
andromedaPrefs.add "siteName", "andromeda"
andromedaPrefs.add "useImageFiles", false
andromedaPrefs.add "imageFolderPath", ""
andromedaPrefs.add "displayNew", false
andromedaPrefs.add "displayAMG", true
andromedaPrefs.add "mediaWebPath", local_fs.getparentfoldername(request.servervariables("path_info"))
andromedaPrefs.add "mediaPhysicalPath", local_fs.getparentfoldername(request.servervariables("path_translated"))
andromedaPrefs.add "editMode", false
andromedaPrefs.add "ftpPath", ""
andromedaPrefs.add "email", ""
andromedaPrefs.add "permitSearch", true
andromedaPrefs.add "hostAddress", ""
andromedaPrefs.add "customHeader", "
The Andromeda evaluation displays every other file. [buy now]
"
andromedaPrefs.add "customBlock", ""
andromedaPrefs.add "popupMaxWidth", 48
andromedaPrefs.add "folderAux1", ""
andromedaPrefs.add "requireLogon", false
andromedaPrefs.add "localFilePlayback", false
andromedaPrefs.add "cBlockSize", 3100
andromedaPrefs.add "cBlockCount", 8
andromedaPrefs.add "audioFileTypes", "mp3,wma,wav,aif,aiff,au,ogg,ra,mid,midi"
andromedaPrefs.add "videoFileTypes", "mpg,mpeg,mpe,asf,avi,wmv,vob,rv,rm,mov,qt"
andromedaPrefs.add "playlistFileTypes", "m3u,asx,ram"
andromedaPrefs.add "tkNumTrimCodes", "## - ,##_-_,##_,##."
andromedaPrefs.add "cssLinkHref", ""
andromedaPrefs.add "playlistMime", "audio/x-mpegurl"
andromedaPrefs.add "protocol", "http"
andromedaPrefs.add "fileLinks", true
andromedaPrefs.add "playLinks", true
andromedaPrefs.add "permitPlaylists", true
andromedaPrefs.add "getID3info", true
andromedaPrefs.add "skipID3v1", true
andromedaPrefs.add "absoluteHeader", ""
andromedaPrefs.add "absoluteFooter", ""
andromedaPrefs.add "disableHTMLheaders", false
andromedaPrefs.add "includeHeader", ""
andromedaPrefs.add "includeFooter", ""
andromedaPrefs.add "includeJavascript", ""
andromedaPrefs.add "folderListInfo", "_folderListInfo"
andromedaPrefs.add "folderOpenInfo", "_folderOpenInfo"
andromedaPrefs.add "folderListImage", "_folderListImage"
andromedaPrefs.add "folderOpenImage", "_folderOpenImage"
andromedaPrefs.add "folderListImageDims", ""
andromedaPrefs.add "folderOpenImageDims", ""
andromedaPrefs.add "skinFile", "andromedaSkin.txt"
andromedaPrefs.add "logonFile", "andromedaLogons.asp"
andromedaPrefs.add "includeEXTM3U", false
andromedaPrefs.add "defaultLanguage", "EN"
andromedaPrefs.add "globalAnnotations", true
andromedaPrefs.add "permitTranslation", true
andromedaPrefs.add "skipPrefix", ""
andromedaPrefs.add "folderSkipNames", "_private,_fpclass,_vti_cnf,_vti_pvt,_derived,_overlay,RECYCLER,Recycled,System Volume Information,Network Trash Folder"
andromedaPrefs.add "checkboxDefault", false
andromedaPrefs.add "coreInclude", ""
andromedaPrefs.add "iconSize", 1
andromedaPrefs.add "hideMenubar", false
andromedaPrefs.add "rootName", ""
andromedaPrefs.add "maxPlaylistTracks", 5000
andromedaPrefs.add "timeout", ""
andromedaPrefs.add "usePlaylistIcons", true
andromedaPrefs.add "vbrScanCount", 50
andromedaPrefs.add "vbrSkipCount", 50
andromedaPrefs.add "cbrCutoff", 5
andromedaPrefs.add "compactSearch", false
andromedaPrefs.add "logonMessage", ""
andromedaPrefs.add "fileCount", true
andromedaPrefs.add "fileCountWidth", 20
andromedaPrefs.add "playSelectionMode", "disabled"
andromedaPrefs.add "pDimentions", "16,16"
andromedaPrefs.add "aDimentions", "26,16"
andromedaPrefs.add "vDimentions", "26,16"
andromedaPrefs.add "lDimentions", "26,16"
andromedaPrefs.add "hDimentions", "16,16"
andromedaPrefs.add "iDimentions", "16,16"
andromedaPrefs.add "rDimentions", "16,16"
andromedaPrefs.add "tDimentions", "16,16"
andromedaPrefs.add "oDimentions", "20,16"
andromedaPrefs.add "cDimentions", "26,16"
andromedaPrefs.add "gDimentions", "16,16"
andromedaPrefs.add "qDimentions", "16,16"
andromedaPrefs.add "saDimentions", "26,16"
andromedaPrefs.add "snDimentions", "25,16"
andromedaPrefs.add "psDimentions", "42,16"
andromedaPrefs.add "paDimentions", "42,16"
andromedaPrefs.add "prDimentions", "42,16"
andromedaPrefs.add "pvDimentions", "42,16"
andromedaPrefs.add "kDimentions", "16,16"
andromedaPrefs.add "siteWidth", "100%"
andromedaPrefs.add "bodyBgColor", "9999cc"
andromedaPrefs.add "bodyTextColor", "333333"
andromedaPrefs.add "bodyLinkColor", "666699"
andromedaPrefs.add "bodyVlinkColor", "996699"
andromedaPrefs.add "bodyAlinkColor", "999966"
andromedaPrefs.add "bodyMarginSize", "0"
andromedaPrefs.add "headDiv", ""
andromedaPrefs.add "menubarColor", "999999"
andromedaPrefs.add "siteNameColor", "ffff00"
andromedaPrefs.add "menubarDiv", "cccc99,1;9999cc,3;cccc99,1;999999,8;666666,1"
andromedaPrefs.add "bodyFgColor", "cccc99"
andromedaPrefs.add "formStyle", "font-size:9pt;color:000000;background-color:ffffff;"
andromedaPrefs.add "bodyFgDiv", "999966,1;efefcc,1"
andromedaPrefs.add "bodyFgToRowDiv", "ffffcc,1"
andromedaPrefs.add "rowColor1", "efefd0"
andromedaPrefs.add "rowColor2", "efefef"
andromedaPrefs.add "rowLinkColor", ""
andromedaPrefs.add "rowTextColor", "333333"
andromedaPrefs.add "newFileColor", "cc6666"
andromedaPrefs.add "rowDiv", "d0d0d0,1"
andromedaPrefs.add "rowToBodyFgDiv", "666666,1"
andromedaPrefs.add "footDiv", "ffffcc,1;999999,2;666666,1"
end sub
sub loadPrefs
if local_fs.fileexists(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefsFileName) then
Set MyFile = local_fs.OpenTextFile(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefsFileName)
do while not MyFile.AtEndOfStream
xxx = MyFile.ReadLine
if left(xxx,1) = "'" then
xxx = right(xxx,len(xxx)-1)
xxxa = split(xxx,vbtab)
if ubound(xxxa) >= 1 then
if andromedaPrefs.exists(xxxa(0)) then
andromedaPrefs(xxxa(0)) = xxxa(ubound(xxxa))
end if
end if
end if
loop
MyFile.Close
end if
end sub
sub loadSkin
if local_fs.fileexists(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefs("skinFile")) then
Set MyFile = local_fs.OpenTextFile(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefs("skinFile"))
do while not MyFile.AtEndOfStream
xxx = MyFile.ReadLine
xxxa = split(xxx,vbtab)
if ubound(xxxa) >= 1 then
if andromedaPrefs.exists(xxxa(0)) then
andromedaPrefs(xxxa(0)) = xxxa(ubound(xxxa))
end if
end if
loop
MyFile.Close
end if
end sub
sub loadLogons
if local_fs.fileexists(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefs("logonFile")) then
Set MyFile = local_fs.OpenTextFile(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefs("logonFile"))
do while not MyFile.AtEndOfStream
xxx = MyFile.ReadLine
if left(xxx,1) = "'" then
xxx = right(xxx,len(xxx)-1)
xxxa = split(xxx,vbtab)
if ubound(xxxa) >= 1 then
if not(andromedaLogons.exists(xxxa(0))) then
andromedaLogons.add xxxa(0), xxxa(ubound(xxxa))
end if
end if
end if
loop
MyFile.Close
end if
end sub
function vPath (x)
vpchk = true
if x <> "" then
vptmpa = split(replace(x,"\","/"),"/")
if vptmpa(0) <> "" then
vpchk = false
else
for vpi = 1 to ubound(vptmpa)
if vptmpa(vpi) = "" or vptmpa(vpi) = "." or vptmpa(vpi) = ".." then
vpchk = false
exit for
end if
next
end if
end if
vPath = vpchk
end function
sub andromedaHeader (x)
andromedaHeaderCore x,false
end sub
sub andromedaHeaderCore (x,y)
if not andromedaPrefs("disableHTMLheaders") then
%><% = minHTMLencode(andromedaPrefs("siteName") & ": " & x) %><%
if andromedaPrefs("cssLinkHref") <> "" then
%>"><%
end if
%>" text="<% = andromedaPrefs("bodyTextColor") %>" link="<% = andromedaPrefs("bodyLinkColor") %>" vlink="<% = andromedaPrefs("bodyVlinkColor") %>" alink="<% = andromedaPrefs("bodyAlinkColor") %>" topmargin="<% = andromedaPrefs("bodyMarginSize") %>" leftmargin="<% = andromedaPrefs("bodyMarginSize") %>" marginheight="<% = andromedaPrefs("bodyMarginSize") %>" marginwidth="<% = andromedaPrefs("bodyMarginSize") %>"><%
end if
if y then
%><%
end if
if ((andromedaPrefs("includeHeader") <> "") and (ScriptEngineMajorVersion >= 5)) then
server.execute(andromedaPrefs("includeHeader"))
end if
%><% = andromedaPrefs("absoluteHeader") %><%
%>
<%
colorbars andromedaPrefs("headDiv")
if not(andromedaPrefs("hideMenubar")) then
%>
<%
addvpad 12
end if
ptag = trans(27)
if andromedaPrefs("disableHTMLheaders") then
ptag = replace(ptag,"#a","" & andromedaConst("appname") & "")
else
ptag = replace(ptag,"#a","" & andromedaConst("appname") & "")
end if
%><% = replace(ptag,"##",andromedaConst("andromedaVersion")) %><%
addvpad 16
%><% = andromedaConst(ca2s(array(101,100,105,116,105,111,110))) %><%
addvpad 6
%>
<%
colorbars andromedaPrefs("footDiv")
%>
<%
%><% = andromedaPrefs("absoluteFooter") %><%
if ((andromedaPrefs("includeFooter") <> "") and (ScriptEngineMajorVersion >= 5)) then
server.execute(andromedaPrefs("includeFooter"))
end if
if not andromedaPrefs("disableHTMLheaders") then
%><%
end if
response.write("")
end sub
sub showfolder (x)
if local_fs.folderExists(andromedaPrefs("mediaPhysicalPath") & x) then
folderName = displayName(x)
andromedaHeader folderName
folderOpenNote x & "/" & andromedaPrefs("folderOpenInfo") & ".txt"
navbar3 x,"browse"
if andromedaPrefs("permitPlaylists") then playlistFormHead true
colorbars andromedaPrefs("bodyFgToRowDiv")
xx2d = getSubfolders2d(x)
for fi = 0 to ubound(xx2d,1)
folderrow x & "/" & xx2d(fi,0),false,true
rowNote x & "/" & xx2d(fi,0) & "/" & andromedaPrefs("folderListInfo") & ".txt",x & "/" & xx2d(fi,0)
response.flush
next
xx2d = getFiles2d(x)
for fi = 0 to ubound(xx2d,1)
filerow x & "/" & xx2d(fi,0),false,true
rowNote x & "/" & local_fs.getbasename(xx2d(fi,0)) & ".txt",""
response.flush
next
colorbars andromedaPrefs("rowToBodyFgDiv")
if andromedaPrefs("permitPlaylists") then playlistFormFoot true
displayAMG folderName,isAlbum(x)
andromedaFooter
else
fourOfour
end if
end sub
sub fourOfour ()
andromedaHeader trans(40)
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
andromedaFooter
end sub
sub navbar3 (x,y)
if andromedaPrefs("permitSearch") then
if y = "search" then
searchbar x
else
searchbar ""
end if
colorbars andromedaPrefs("bodyFgDiv")
end if
if not((x = "") and (y = "browse")) then
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
end if
if y = "browse" then
if x = "" then
sidestep = false
else
sidestep = (subfolderCount(local_fs.getparentfoldername(x)) > 1)
end if
if andromedaPrefs("playLinks") then playalbum = playable(x)
end if
%>
<%
end if
if x = "" then
metadisplay = andromedaPrefs("mediaPhysicalPath")
else
metadisplay = x
end if
if y = "browse" then
metapath = "/" & andromedaPrefs("rootName") & x
else
metapath = "/" & andromedaPrefs("rootName") & "/" & x
end if
%>
<%
response.flush
end sub
sub folderOpenNote (x)
if (andromedaPrefs("globalAnnotations") or (andromedaPrefs("defaultLanguage") = currentLanguage)) then
if local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & local_fs.getparentfoldername(x) & "/" & andromedaPrefs("folderOpenImage") & ".jpg") then
folderImageExt = ".jpg"
elseif local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & local_fs.getparentfoldername(x) & "/" & andromedaPrefs("folderOpenImage") & ".gif") then
folderImageExt = ".gif"
end if
if local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & x) then
note = local_fs.OpenTextFile(andromedaPrefs("mediaPhysicalPath") & x).ReadAll
end if
if folderImageExt <> "" or note <> "" or (andromedaConst("localUser") and andromedaPrefs("editMode")) then
%>
<%
end if
if note <> "" then
%> color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><% = note & " " %><%
end if
%>
<%
end if
if folderImageExt <> "" then
if andromedaPrefs("folderOpenImageDims") <> "" then
ittmpa = split(andromedaPrefs("folderOpenImageDims"),",")
imgdimtag = " width=" & ittmpa(0) & " height=" & ittmpa(1)
else
imgdimtag = ""
end if
%>
"<% = imgdimtag %>>
<%
end if
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
end if
end if
end sub
sub folderrow (x,d,m)
totalrowcount = totalrowcount + 1
mysubfolderCount = subfolderCount(x)
myfileCount = fileCount(x)
if totalrowcount <> 1 then colorBars andromedaPrefs("rowDiv")
%>
<%
if mysubfolderCount = 0 and myfileCount = 0 then
desc2 = " "
end if
if mysubfolderCount > 1 and myfileCount = 0 then
desc2 = mysubfolderCount & " " & trans(5)
link2 = folderLink(x)
end if
if mysubfolderCount = 0 and myfileCount > 0 then
desc2 = myfileCount & " " & ifps2(myfileCount,trans(2),trans(3))
link2 = folderLink(x)
end if
if mysubfolderCount > 0 and myfileCount > 0 then
desc2 = mysubfolderCount & " " & ifps2(mysubfolderCount,trans(4),trans(5)) & ", " & myfileCount & " " & ifps2(myfileCount,trans(2),trans(3))
link2 = folderLink(x)
end if
if mysubfolderCount = 1 and myfileCount = 0 then
for each f22 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).subfolders
if legalFolder(f22.name) then
desc2 = displayName(f22.name)
link2 = folderLink(x & "/" & f22.name)
end if
next
end if
if link2 <> "" then
if ((andromedaPrefs("disableHTMLheaders") or (andromedaPrefs("rowLinkColor") <> andromedaPrefs("bodyLinkColor"))) and (andromedaPrefs("rowLinkColor") <> "")) <> "" then
desc2 = "" & desc2 & ""
else
desc2 = "" & desc2 & ""
end if
else
desc2 = "" & desc2 & ""
end if
if andromedaPrefs("playLinks") then
if playable(x) then
%>
<% = desc2 %>
<% ipad 4,1 %>
<% playFolderButton x %>
<%
else
%><% = desc2 %><%
end if
else
%><% = desc2 %><%
end if
%>
<%
end sub
sub filerow (x,d,m)
thisfiletype = lcase(local_fs.getextensionname(x))
thisfilesize = local_fs.GetFile(andromedaPrefs("mediaPhysicalPath") & x).size
if (andromedaPrefs("getID3info") and (thisfiletype = "mp3") and (thisfilesize > 0)) then
Set fp = local_fs.OpenTextFile(andromedaPrefs("mediaPhysicalPath") & x, 1)
mp3Length = ""
mp3Album = ""
mp3Artist = ""
mp3TrackName = ""
mp3Quality = ""
fpp = 0
dim bb(9)
for i = 0 to 9
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 10
validID3v2header = ((bb(0) = 73) and (bb(1) = 68) and (bb(2) = 51) and (bb(3) < 255) and (bb(4) < 255) and (bb(5) = (bb(5) and 240)) and (bb(6) = 0) and (bb(7) < 128) and (bb(8) < 128) and (bb(9) < 128))
if validID3v2header then
ID3size = bb(7) * 128 * 128 + bb(8) * 128 + bb(9)
extendedHeader = (bb(5) and 64) / 64
footerPresent = (bb(5) and 16) / 16
totalID3size = 10 + ID3size + footerPresent * 10
if extendedHeader = 1 then
for i = 0 to 5
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 6
extendedHeaderSize = bb(1) * 128 * 128 + bb(2) * 128 + bb(3)
fp.skip(extendedHeaderSize - 6)
fpp = fpp + (extendedHeaderSize - 6)
end if
for i = 0 to 9
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 10
do while ((((bb(0) >= 48) and (bb(0) <= 57)) or ((bb(0) >= 65) and (bb(0) <= 90))) and (((bb(1) >= 48) and (bb(1) <= 57)) or ((bb(1) >= 65) and (bb(1) <= 90))) and (((bb(2) >= 48) and (bb(2) <= 57)) or ((bb(2) >= 65) and (bb(2) <= 90))) and (((bb(3) >= 48) and (bb(3) <= 57)) or ((bb(3) >= 65) and (bb(3) <= 90))) and (bb(4) = 0) and (bb(5) < 128) and (bb(6) < 128) and (bb(7) < 128))
ID3frameID = chr(bb(0)) & chr(bb(1)) & chr(bb(2)) & chr(bb(3))
ID3frameSize = bb(5) * 128 * 128 + bb(6) * 128 + bb(7)
if ID3frameSize > 0 then
skipbyte = fp.Read(1)
ID3frameVal = bin2txt(fp.Read(ID3frameSize - 1))
fpp = fpp + ID3frameSize
else
ID3frameVal = ""
end if
if ID3frameID = "TLEN" then
mp3Length = ID3frameVal / 1000
'elseif ID3frameID = "TCON" then
'mp3Genre = ID3frameVal
'elseif ID3frameID = "TRCK" then
'mp3TrackNumber = ID3frameVal
elseif ID3frameID = "TALB" then
mp3Album = ID3frameVal
elseif ID3frameID = "TPE1" then
mp3Artist = ID3frameVal
elseif ID3frameID = "TIT2" then
mp3TrackName = ID3frameVal
end if
for i = 0 to 9
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 10
loop
offset = totalID3size - fpp
if offset >= 0 then
if offset > 0 then
fp.skip(offset)
fpp = fpp + offset
end if
for i = 0 to 3
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 4
else
for i = 1 to (-1 * offset)
bb(i-1) = bb(10 + offset + i - 1)
next
if 4 + offset > 0 then
for i = (-1 * offset) to 3
bb(i) = fixbin(fp.Read(1))
fpp = fpp + 1
next
end if
end if
end if
cbr = true
for xox = 1 to (andromedaPrefs("vbrScanCount") + andromedaPrefs("vbrSkipCount"))
mpegVersion = (bb(1) and 24) / 8
layer = (bb(1) and 6) / 2
protection = (bb(1) and 1)
bitrate = (bb(2) and 240) / 16
samplefrequency = (bb(2) and 12) / 4
padded = (bb(2) and 2) / 2
channelMode = (bb(3) and 192) / 64
validMP3frame = ((bb(0) = 255) and (bb(1) >= 224) and (mpegVersion <> 1) and (layer <> 0) and (bitrate <> 0) and (bitrate <> 15) and (samplefrequency <> 3))
if validMP3frame then
if mpegVersion = 3 then
if layer = 3 then
column = 1
elseif layer = 2 then
column = 2
elseif layer = 1 then
column = 3
end if
if samplefrequency = 0 then
samplefrequencyD = 44100
elseif samplefrequency = 1 then
samplefrequencyD = 48000
elseif samplefrequency = 2 then
samplefrequencyD = 32000
end if
elseif mpegVersion = 2 then
if layer = 3 then
column = 4
elseif layer = 2 then
column = 5
elseif layer = 1 then
column = 5
end if
if samplefrequency = 0 then
samplefrequencyD = 22050
elseif samplefrequency = 1 then
samplefrequencyD = 24000
elseif samplefrequency = 2 then
samplefrequencyD = 16000
end if
elseif mpegVersion = 0 then
if layer = 3 then
column = 4
elseif layer = 2 then
column = 5
elseif layer = 1 then
column = 5
end if
if samplefrequency = 0 then
samplefrequencyD = 11025
elseif samplefrequency = 1 then
samplefrequencyD = 12000
elseif samplefrequency = 2 then
samplefrequencyD = 8000
end if
end if
bitrateDataA = array(32,32,32,32,8,64,48,40,48,16,96,56,48,56,24,128,64,56,64,32,160,80,64,80,40,192,96,80,96,48,224,112,96,112,56,256,128,112,128,64,288,160,128,144,80,320,192,160,160,96,352,224,192,176,112,384,256,224,192,128,416,320,256,224,144,448,384,320,256,160)
bitrateD = bitrateDataA((bitrate - 1) * 5 + column - 1)
if ((bitrateD <> prevbitrateD) and (prevbitrateD <> "")) then
cbr = false
end if
prevbitrateD = bitrateD
if channelMode = 0 then
channelModeD = "Stereo"
elseif channelMode = 1 then
channelModeD = "Joint Stereo"
elseif channelMode = 2 then
channelModeD = "Dual Channel"
elseif channelMode = 3 then
channelModeD = "Single channel (Mono)"
end if
if ((layer = 1) or (layer = 2)) then
framesize = fix((144 * 1000 * bitrateD) / samplefrequencyD) + padded
elseif layer = 3 then
framesize = fix(12 * 1000 * bitrateD / samplefrequencyD + padded) * 4
end if
if xox > andromedaPrefs("vbrSkipCount") then avgbitrateD = avgbitrateD + bitrateD
if xox >= andromedaPrefs("cbrCutoff") and cbr then exit for
else
bitrateD = ""
exit for
end if
if xox = 1 then
if validID3v2header then
cursor = framesize-4
else
cursor = framesize-10
end if
else
cursor = framesize-4
end if
if fpp + cursor < thisfilesize then
fp.Skip(cursor)
fpp = fpp + cursor
for i = 0 to 3
bb(i) = fixbin(fp.Read(1))
next
fpp = fpp + 4
else
exit for
end if
next
if bitrateD <> "" then
if cbr then
if mp3Length = "" then
mp3Length = round(thisfilesize / (bitrateD * 1000 / 8))
end if
mp3Quality = bitrateD & " Kbit/s"
else
if mp3Length = "" then
mp3Length = round(thisfilesize / (avgbitrateD / (xox-1-andromedaPrefs("vbrSkipCount")) * 1000 / 8))
end if
mp3Quality = round(avgbitrateD / (xox-1-andromedaPrefs("vbrSkipCount"))) & " Kbit/s VBR"
end if
end if
'mp3Quality = bitrateD & " Kbit/s " & samplefrequencyD & " Hz " & channelModeD
if (not(andromedaPrefs("skipID3v1")) and (mp3TrackName = "")) then
fp.Skip(thisfilesize - fpp - 128)
id3v1tag = ucase(bin2txt(fp.Read(3)))
if ((id3v1tag = "ID3") or (id3v1tag = "TAG")) then
id3v1Title = trim(bin2txt(fp.Read(30)))
id3v1Artist = trim(bin2txt(fp.Read(30)))
id3v1Album = trim(bin2txt(fp.Read(30)))
id3v1Year = trim(bin2txt(fp.Read(4)))
id3v1Comment = trim(bin2txt(fp.Read(28)))
id3v12skip = ascb(fp.Read(1))
id3v12number = ascb(fp.Read(1))
id3v1Genre = ascb(fp.Read(1))
'if mp3Genre = "" then mp3Genre = id3v1Genre
'if mp3TrackNumber = "" then mp3TrackNumber = id3v12number
if mp3Album = "" then mp3Album = id3v1Album
if mp3Artist = "" then mp3Artist = id3v1Artist
if mp3TrackName = "" then mp3TrackName = id3v1Title
end if
end if
if left(mp3Album,2) = "ÿþ" then mp3Album = mid(mp3Album,3)
if left(mp3Artist,2) = "ÿþ" then mp3Artist = mid(mp3Artist,3)
if left(mp3TrackName,2) = "ÿþ" then mp3TrackName = mid(mp3TrackName,3)
fp.close
end if
if fileTypes.exists(thisfiletype) then
select case fileTypes(thisfiletype)
case "audio"
fileicon = "a"
case "video"
fileicon = "v"
case "playlist"
fileicon = "l"
end select
end if
totalrowcount = totalrowcount + 1
filerowcount = filerowcount + 1
if totalrowcount <> 1 then colorBars andromedaPrefs("rowDiv")
%>
<%
if d then
drill2 local_fs.getparentfoldername(x),1
addvpad 8
end if
%>
<%
if andromedaPrefs("permitPlaylists") then
%>
<% else %><% = totalrowcount %><% end if %>"<% if andromedaPrefs("checkboxDefault") then %> checked<% end if %>>
<%
end if
%>
<%
if andromedaPrefs("fileLinks") then
if andromedaConst("localUser") and andromedaPrefs("localFilePlayback") then
filepath = local_fs.GetFile(andromedaPrefs("mediaPhysicalPath") & x).path
else
filepath = mkMediaWebPath(x)
end if
%><% imagetag fileicon,"i","" %><%
else
imagetag fileicon,"i",""
end if
%>
<%
if andromedaPrefs("fileCount") then
%>
">"><% if d then %><% = filerowcount %><% else %><% = filerowcount*2-1 %><% end if %>.
<% ipad 4,1 %>
<%
end if
if andromedaPrefs("fileLinks") then
if ((andromedaPrefs("disableHTMLheaders") or (andromedaPrefs("rowLinkColor") <> andromedaPrefs("bodyLinkColor"))) and (andromedaPrefs("rowLinkColor") <> "")) <> "" then
%>">"><%
if mp3TrackName <> "" then
%><% = mp3TrackName %><%
else
%><% = displayName(x) %><%
end if
%><%
else
%><%
if mp3TrackName <> "" then
%><% = mp3TrackName %><%
else
%><% = displayName(x) %><%
end if
%><%
end if
else
%>"><%
if mp3TrackName <> "" then
%><% = mp3TrackName %><%
else
%><% = displayName(x) %><%
end if
%><%
end if
if andromedaPrefs("displayNew") then displaynew local_fs.getfile(andromedaPrefs("mediaPhysicalPath") & x).datecreated
if ((mp3Artist <> "") or (mp3Album <> "")) then
%> "><%
if ((mp3Artist <> "") and (mp3Album <> "")) then
%><% = mp3Artist & " - " & mp3Album %><%
else
%><% = mp3Artist & mp3Album %><%
end if
%><%
end if
if andromedaPrefs("fileCount") then
%>
<%
end if
%>
<%
if andromedaPrefs("playLinks") then
%>
"><%
if ((mp3Length <> "") or (mp3Quality <> "")) then
if ((mp3Length <> "") and (mp3Quality <> "")) then
%><% = sec2time(mp3Length) & " · " & mp3Quality %><%
else
if mp3Length <> "" then
%><% = sec2time(mp3Length) %><%
else
%><% = mp3Quality %><%
end if
end if
%><% = " · " %><%
end if
%><% = bytecount(thisfilesize) & " · " & ucase(thisfiletype) %>
<%
else
%>"><%
if ((mp3Length <> "") or (mp3Quality <> "")) then
if ((mp3Length <> "") and (mp3Quality <> "")) then
%><% = sec2time(mp3Length) & " · " & mp3Quality %><%
else
if mp3Length <> "" then
%><% = sec2time(mp3Length) %><%
else
%><% = mp3Quality %><%
end if
end if
%><% = " · " %><%
end if
%><% = bytecount(thisfilesize) & " · " & ucase(thisfiletype) %><%
end if
%>
<%
end sub
sub rowNote (x,i)
if (andromedaPrefs("globalAnnotations") or (andromedaPrefs("defaultLanguage") = currentLanguage)) then
if i <> "" then
if local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & i & "/" & andromedaPrefs("folderListImage") & ".jpg") then
folderImageExt = ".jpg"
elseif local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & i & "/" & andromedaPrefs("folderListImage") & ".gif") then
folderImageExt = ".gif"
end if
end if
if local_fs.fileExists(andromedaPrefs("mediaPhysicalPath") & x) then
note = local_fs.OpenTextFile(andromedaPrefs("mediaPhysicalPath") & x).ReadAll
end if
if folderImageExt <> "" or note <> "" or (andromedaConst("localUser") and andromedaPrefs("editMode")) then
%>
<%
end if
if note <> "" then
%>"><% = note & " " %><%
end if
%>
<%
colorbar andromedaPrefs("siteWidth"),"6",switchrow(totalrowcount,andromedaPrefs("rowColor1"),andromedaPrefs("rowColor2"))
end if
end if
end sub
sub searchbar (s)
%>
<%
end sub
if ((abs(local_fs.GetFile(request.servervariables("path_translated")).size - len(andromedaPrefsFileName) - 127448 + 18) > 1) and (abs(local_fs.GetFile(request.servervariables("path_translated")).size - len(andromedaPrefsFileName) - 127448 + 2091 + 18) > 1)) then response.end
sub displayAMG (n,a)
if andromedaPrefs("displayAMG") then
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
end if
end sub
sub search (s,sm)
andromedaHeader "[" & s & "] " & trans(37)
navbar3 s,"search"
if andromedaPrefs("permitPlaylists") then playlistFormHead true
colorbars andromedaPrefs("bodyFgToRowDiv")
if len(trim(s)) > 1 then
if sm = "fo" or sm = "ff" or sm = "" then searchFolders "",lcase(s)
if sm = "fi" or sm = "ff" or sm = "" then searchFiles "",lcase(s)
if totalrowcount = 0 then
%>
<%
colorbars andromedaPrefs("rowToBodyFgDiv")
if andromedaPrefs("permitPlaylists") then playlistFormFoot true
end if
displayAMG s,false
andromedaFooter
end sub
sub searchFolders (x,s)
xx2d = getSubfolders2d(x)
for fi = 0 to ubound(xx2d,1)
if instr(lcase(replace(xx2d(fi,0),"_"," ")),s) <> 0 then
folderrow x & "/" & xx2d(fi,0),true,true
response.flush
end if
searchFolders x & "/" & xx2d(fi,0),s
next
end sub
sub searchFiles (x,s)
for each i in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).files
if legalFile(i.name) then
if instr(lcase(replace(i.name,"_"," ")),s) <> 0 then
filerow x & "/" & i.name,true,true
response.flush
end if
end if
next
xx2d = getSubfolders2d(x)
for fi = 0 to ubound(xx2d,1)
searchFiles x & "/" & xx2d(fi,0),s
next
end sub
sub playlistFormHead (x)
if x then
m = 1
else
m = 0
end if
%><%
if lcase(andromedaPrefs("playSelectionMode")) = "post" then
playlistFormMethod = "post"
elseif lcase(andromedaPrefs("playSelectionMode")) = "get" then
playlistFormMethod = "get"
else
playlistFormMethod = "post"
end if
%>
" width="<% = andromedaPrefs("siteWidth") %>">
<%
end sub
sub playlistFormFoot (x)
if ((totalrowcount > 0) or (ckplaylist <> "")) then
plb = andromedaPrefs("usePlaylistIcons")
%>
<%
if totalrowcount > 0 then
%><%
end if
if lcase(andromedaPrefs("playSelectionMode")) = "post" then
playSelectionButton = true
elseif lcase(andromedaPrefs("playSelectionMode")) = "get" then
playSelectionButton = true
else
playSelectionButton = false
end if
if ((totalrowcount > 0) and (andromedaPrefs("playLinks")) and (playSelectionButton)) then
%>
<%
if plb then
%><%
%>")
%>
<%
%>
<% ipad 8,1 %>
<%
end if
if x and totalrowcount > 0 then
%>
<%
if plb then
%><%
%>")
%>
<%
%>
<% ipad 8,1 %>
<%
end if
if ((x = false) and (totalrowcount > 0)) then
%>
<%
if plb then
%><%
%>")
%>
<%
%>
<% ipad 8,1 %>
<%
end if
if (x and (ckplaylist <> "")) then
%>
<%
if plb then
%><%
%>")
%>
<%
%>
<% ipad 8,1 %>
<%
end if
if ((totalrowcount > 0) and (ckplaylist <> "")) then
plbnote = trans(12)
plbnote = replace (plbnote,"##",round((len(ckplaylist)/(andromedaPrefs("cBlockCount")*andromedaPrefs("cBlockSize")))*100))
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><% = plbnote %>
<%
end if
%>
<%
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
end if
%>
" width="<% = andromedaPrefs("siteWidth") %>">
<%
end sub
sub displayPlaylist (x)
andromedaHeader trans(44)
navbar3 trans(44),"playlist"
playlistFormHead false
colorbars andromedaPrefs("bodyFgToRowDiv")
xtmpa = split(ckplaylist,vbcrlf)
for xi = 0 to ubound(xtmpa) -1
if left(xtmpa(xi),1) = "o" then folderrow mid(xtmpa(xi),2),true,false
if left(xtmpa(xi),1) = "i" then filerow mid(xtmpa(xi),2),true,false
next
colorbars andromedaPrefs("rowToBodyFgDiv")
playlistFormFoot false
displayAMG "",false
andromedaFooter
end sub
function readPlaylist (x)
rtmp = ""
for rpi = 1 to andromedaPrefs("cBlockCount")
rtmp = rtmp & request.cookies(x & rpi)
next
readPlaylist = rtmp
end function
sub writePlaylist (x)
for rpi = 1 to andromedaPrefs("cBlockCount")
rpitmp = mid(ckplaylist,(((rpi-1)*andromedaPrefs("cBlockSize"))+1),andromedaPrefs("cBlockSize"))
if rpi = andromedaPrefs("cBlockCount") then
rpitmp = left(rpitmp,instrrev(rpitmp, vbcrlf)+1)
end if
response.cookies(x & rpi) = rpitmp
next
end sub
sub playFolder (x)
if local_fs.folderExists(andromedaPrefs("mediaPhysicalPath") & x) then
playFolder2 x
if totalrowcount = 0 then
response.redirect(andrlink("?q=f&f=",x))
end if
else
fourOfour
end if
end sub
function playable (x)
pinme = false
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).files
if legalFile(f1.name) then
pinme = true
exit for
end if
next
if not pinme then
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).subfolders
if legalFolder(f1.name) then
if playable (x & "/" & f1.name) then
pinme = true
exit for
end if
end if
next
end if
playable = pinme
end function
sub playFolder2 (x)
xx2d = getSubfolders2d(x)
for fi = 0 to ubound(xx2d,1)
playFolder2 x & "/" & xx2d(fi,0)
if (totalrowcount = andromedaPrefs("maxPlaylistTracks")) then exit for
next
xx2d = getFiles2d(x)
for fi = 0 to ubound(xx2d,1)
playlistRow x & "/" & xx2d(fi,0)
if (totalrowcount = andromedaPrefs("maxPlaylistTracks")) then exit for
next
if ubound(xx2d,1) >= 0 then response.flush
end sub
sub playlistHeader ()
response.contenttype = andromedaPrefs("playlistMime")
select case lcase(andromedaPrefs("playlistMime"))
case "audio/x-mpegurl"
fext = "m3u"
case "audio/x-pn-realaudio"
fext = "ram"
case else
fext = ""
end select
if fext <> "" then
response.AddHeader "Content-Disposition", "inline; filename=playlist." & fext
end if
if andromedaPrefs("includeEXTM3U") then
response.write("#EXTM3U" & vbcrlf)
end if
if not (andromedaConst("localUser") and andromedaPrefs("localFilePlayback")) then
if andromedaPrefs("hostAddress") <> "" then
plrpre = andromedaPrefs("protocol") & "://" & andromedaPrefs("hostAddress")
else
if request.servervariables("SERVER_NAME") <> "" then
ckServerName = request.servervariables("SERVER_NAME")
else
ckServerName = request.servervariables("LOCAL_ADDR")
end if
if ((request.servervariables("SERVER_PORT") <> "80") and (request.servervariables("SERVER_PORT") <> "")) then
ckServerName = ckServerName & ":" & request.servervariables("SERVER_PORT")
end if
plrpre = andromedaPrefs("protocol") & "://" & ckServerName
end if
end if
end sub
sub playlistRow (x)
if totalrowcount = 0 then playlistHeader
totalrowcount = totalrowcount + 1
if andromedaPrefs("includeEXTM3U") then
response.write("#EXTINF:-1," & displayName(x) & vbcrlf)
end if
if (andromedaConst("localUser") and andromedaPrefs("localFilePlayback")) then
response.write(local_fs.GetFile(andromedaPrefs("mediaPhysicalPath") & x).path & vbcrlf)
else
response.write(plrpre & mkMediaWebPath(x) & vbcrlf)
end if
end sub
sub playPrepList (x)
xtmpa = split(x,vbcrlf)
for xi = 0 to ubound(xtmpa) -1
if left(xtmpa(xi),1) = "o" then playFolder2 mid(xtmpa(xi),2)
if left(xtmpa(xi),1) = "i" then playlistRow mid(xtmpa(xi),2)
if (totalrowcount = andromedaPrefs("maxPlaylistTracks")) then exit for
next
end sub
sub imagetag (x,m,t)
ittmpa = split(andromedaPrefs(x & "Dimentions"),",")
imagetag2 x,ittmpa(0),ittmpa(1),t,true,m,""
end sub
sub imagetagE (x,m,t)
ittmpa = split(andromedaPrefs(x & "Dimentions"),",")
imagetag2 x,ittmpa(0),ittmpa(1),t,true,m,"\"
end sub
sub imagetag2 (x,a,b,t,c,m,e)
select case m
case "i"
%><% = andromedaPrefs("imageFolderPath") %><% = x %>.gif<%
else
%><% = andrLink("?i=" & x,"") %><%
end if
%> width=<% = a * andromedaPrefs("iconSize") %> height=<% = b * andromedaPrefs("iconSize") %><%
if c then
%> border=0<%
end if
if t <> "" then
%> alt=<% = e %>"<% = minHTMLencode(t) %><% = e %>"<%
end if
%>><%
end sub
sub displayImage (dix)
select case dix
case "p" ' playButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,51,153,0,102,204,0,51,102,0,255,255,255,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,76,88,170,212,190,176,180,64,107,139,132,10,1,186,39,75,22,0,194,192,121,29,40,141,228,96,162,0,40,118,165,123,210,147,87,219,122,78,187,192,147,192,215,2,14,88,195,140,206,200,34,17,119,205,141,108,121,68,13,25,203,38,233,138,37,69,165,24,194,102,156,140,132,28,23,72,2,0,59)
case "i"' infoButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,51,51,51,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,64,88,186,220,94,35,142,215,70,8,147,80,53,0,38,129,70,117,24,224,137,14,105,134,140,36,121,151,203,5,166,41,88,53,54,95,177,192,199,156,23,207,21,97,16,86,158,201,3,148,76,110,64,4,146,146,162,177,232,54,193,34,118,155,0,0,59)
case "h"' homeButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,102,102,153,153,153,204,204,204,255,255,255,255,204,204,204,102,102,102,0,0,0,255,255,255,33,249,4,1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,85,120,170,214,190,240,52,65,43,48,209,212,80,74,248,1,198,80,95,65,16,30,40,106,37,49,12,168,42,145,230,208,193,233,197,214,197,219,199,58,1,239,229,195,5,123,53,34,202,118,236,184,148,157,66,176,69,196,5,0,23,73,235,196,245,100,181,156,168,24,43,2,131,62,216,239,162,145,78,55,34,107,199,27,146,0,0,59)
case "r"' prefsButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,102,102,153,153,153,204,204,204,255,255,255,255,102,102,102,0,0,0,255,255,255,0,0,0,33,249,4,1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,80,104,170,213,190,208,52,65,107,139,165,134,205,67,89,153,64,140,99,231,49,66,64,12,108,201,125,161,202,14,43,193,1,211,86,211,228,134,103,186,217,204,22,248,165,100,164,154,47,39,19,210,150,64,36,233,9,192,73,130,78,155,245,170,74,146,170,31,134,201,7,198,20,170,232,95,4,228,184,64,18,0,59)
case "t"' ftpButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,102,102,153,153,153,204,204,204,255,255,255,255,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,78,88,170,212,190,176,52,65,107,139,164,134,205,3,89,153,176,1,36,208,125,146,56,14,131,186,125,33,7,176,110,0,76,118,73,151,54,62,179,64,90,47,99,11,6,69,55,34,128,242,171,32,113,50,225,232,38,233,52,101,40,130,85,147,67,85,59,83,42,164,81,42,93,34,12,199,121,145,0,0,59)
case "g"' goButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,102,102,153,153,153,204,204,204,255,255,255,255,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,72,88,170,212,190,176,52,65,107,139,164,134,205,3,89,153,208,141,30,35,146,221,151,1,67,187,177,110,0,76,114,59,188,182,76,215,49,60,204,25,92,207,6,20,249,132,183,226,145,151,156,73,80,29,231,19,42,147,78,71,128,236,7,210,200,122,129,17,144,227,2,73,0,0,59)
case "q"' discussButton
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,102,102,153,153,153,204,204,204,255,255,255,255,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,71,88,170,212,190,176,52,65,107,139,164,134,205,3,89,153,208,141,30,35,110,67,151,150,33,186,6,195,10,76,46,23,115,115,86,239,65,126,198,43,224,198,231,10,222,122,52,216,81,8,152,73,72,35,231,19,58,148,78,163,205,15,164,209,236,230,34,32,199,5,146,0,0,59)
case "a" ' audioFile
imageDataLookup = array(71,73,70,56,57,97,26,0,16,0,162,0,0,102,102,51,153,153,102,204,204,153,255,255,204,255,255,255,102,102,102,51,51,51,255,255,255,33,249,4,1,0,0,7,0,44,0,0,0,0,26,0,16,0,0,3,93,120,186,92,254,144,201,121,10,185,152,216,66,187,189,6,246,113,157,244,25,225,21,149,13,97,12,105,70,178,40,58,8,113,16,104,172,242,14,55,28,65,39,234,29,12,186,128,64,152,225,245,144,186,101,40,185,155,149,12,128,172,50,86,124,214,0,129,233,78,101,84,88,176,185,106,185,2,226,146,203,31,87,211,105,140,207,233,61,136,254,193,72,0,0,59)
case "v" ' videoFile
imageDataLookup = array(71,73,70,56,57,97,26,0,16,0,162,0,0,255,255,255,239,239,239,102,102,102,51,51,51,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4,1,0,0,4,0,44,0,0,0,0,26,0,16,0,0,3,78,72,186,44,254,144,201,73,4,184,24,88,65,231,248,32,168,93,92,183,124,65,154,126,218,99,158,131,186,14,89,249,162,50,139,217,102,232,215,47,5,78,165,35,5,9,195,25,48,152,12,20,53,71,95,104,121,139,229,104,187,168,149,136,53,50,165,79,222,203,146,41,139,77,144,180,107,145,0,0,59)
case "l" ' playlistFile
imageDataLookup = array(71,73,70,56,57,97,26,0,16,0,162,0,0,255,255,255,204,204,204,102,102,102,51,51,51,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4,1,0,0,4,0,44,0,0,0,0,26,0,16,0,0,3,74,72,186,44,254,144,201,73,4,184,24,88,65,231,248,32,168,93,92,183,12,25,134,70,166,130,166,192,75,182,110,0,89,178,70,19,185,154,149,173,222,37,7,52,13,108,144,216,111,39,84,98,138,157,38,145,137,124,56,103,52,233,50,27,10,109,119,22,216,115,167,184,153,139,9,0,59)
case "o" ' folderOpen
imageDataLookup = array(71,73,70,56,57,97,20,0,16,0,162,0,0,255,255,153,153,153,102,224,224,153,204,204,153,255,255,255,102,102,102,255,255,255,0,0,0,33,249,4,1,0,0,6,0,44,0,0,0,0,20,0,16,0,0,3,60,104,186,220,174,37,198,247,138,184,183,80,102,49,150,146,83,12,100,89,126,13,168,74,89,74,188,112,60,10,26,7,220,120,62,215,118,238,143,188,69,193,247,11,4,33,68,157,177,146,196,77,68,171,213,102,74,173,90,167,9,0,59)
case "c" ' folderClosed
imageDataLookup = array(71,73,70,56,57,97,26,0,16,0,162,0,0,255,255,153,224,224,153,255,255,255,102,102,102,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4,1,0,0,4,0,44,0,0,0,0,26,0,16,0,0,3,61,72,186,220,254,111,72,9,235,26,33,231,97,33,214,218,52,117,196,7,158,1,215,13,66,235,190,173,106,13,64,109,223,181,92,209,120,175,123,61,31,137,23,180,253,34,197,219,209,65,76,46,27,162,104,148,68,173,90,175,212,4,0,59)
case "x" ' invisiblePixel
imageDataLookup = array(71,73,70,56,57,97,1,0,1,0,128,0,0,255,255,255,0,0,0,33,249,4,1,0,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59)
case "sa"
imageDataLookup = array(71,73,70,56,57,97,26,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,26,0,16,0,0,3,80,72,186,220,238,33,202,73,107,28,130,4,193,187,255,160,128,105,97,56,96,223,184,149,222,0,172,109,6,179,238,11,170,55,42,2,252,204,225,41,0,166,102,187,201,110,60,162,175,3,108,241,158,75,230,17,20,128,178,68,83,106,145,150,165,94,127,221,175,73,118,42,155,207,232,114,230,193,110,19,18,0,59)
case "sn"
imageDataLookup = array(71,73,70,56,57,97,25,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,25,0,16,0,0,3,65,72,186,220,206,33,202,73,107,28,36,136,205,187,255,2,166,129,228,39,150,40,119,166,232,218,13,112,44,155,153,9,220,248,61,190,181,55,228,185,157,170,247,178,68,104,66,22,82,89,114,49,125,196,39,47,32,171,90,175,152,135,118,75,72,0,0,59)
case "ps"
imageDataLookup = array(71,73,70,56,57,97,42,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,42,0,16,0,0,3,91,72,186,220,254,240,133,73,171,189,56,211,161,130,248,96,40,10,195,48,158,39,71,120,104,10,152,109,171,178,113,56,0,111,157,118,186,141,231,61,208,44,248,185,253,96,193,33,209,120,92,242,150,63,28,77,167,76,70,167,212,167,85,74,44,106,123,70,44,248,75,5,136,199,171,238,224,140,14,148,222,240,184,124,78,135,71,238,248,60,33,1,0,59)
case "pa"
imageDataLookup = array(71,73,70,56,57,97,42,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,42,0,16,0,0,3,102,72,186,220,254,240,133,73,171,189,56,211,161,130,248,32,168,105,97,249,113,132,103,126,217,224,14,215,26,162,170,188,14,0,48,216,50,205,11,23,156,46,99,243,241,54,175,220,11,86,41,118,126,155,156,84,202,164,56,83,208,137,112,170,180,92,107,191,165,242,245,3,25,87,173,174,151,119,54,165,135,235,175,173,245,138,177,159,229,124,153,182,236,251,255,128,129,17,131,132,133,4,9,0,59)
case "pr"
imageDataLookup = array(71,73,70,56,57,97,42,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,42,0,16,0,0,3,91,72,186,220,254,240,133,73,171,189,56,211,161,130,248,32,168,105,97,249,113,132,103,126,99,182,134,168,250,206,244,28,215,45,102,119,248,52,252,192,160,101,151,234,5,6,128,164,50,57,24,190,110,180,205,114,217,172,16,101,181,160,118,80,3,65,87,185,75,150,247,10,59,175,51,179,149,246,237,186,217,157,173,124,78,167,71,238,248,60,33,1,0,59)
case "pv"
imageDataLookup = array(71,73,70,56,57,97,42,0,16,0,162,0,0,255,255,255,204,204,204,153,153,153,102,102,102,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,42,0,16,0,0,3,108,72,186,220,254,240,133,73,171,189,56,211,161,130,248,32,168,105,97,249,113,132,103,126,217,224,98,107,136,170,113,233,2,184,91,175,243,46,84,3,156,112,0,139,245,118,27,161,146,104,169,29,107,73,101,238,226,236,248,162,82,102,165,154,242,201,178,94,153,53,118,185,225,8,47,138,239,105,106,189,208,218,245,120,53,162,192,39,242,46,185,62,185,231,3,46,129,130,131,132,133,134,130,17,137,138,139,4,9,0,59)
case "k"
imageDataLookup = array(71,73,70,56,57,97,16,0,16,0,162,0,0,0,0,0,255,255,255,102,102,153,153,153,204,204,204,255,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,70,88,170,208,190,176,52,66,107,139,160,142,205,7,88,25,209,141,30,35,110,65,26,116,95,136,170,41,39,76,92,60,216,195,156,145,170,76,119,61,223,14,184,234,232,78,36,217,76,50,194,229,62,76,162,18,26,29,9,174,84,6,224,202,213,69,64,142,11,36,1,0,59)
end select
for ix = 0 to ubound(imageDataLookup)
binstr = binstr & chrb(imageDataLookup(ix))
next
response.contenttype = "image/gif"
response.binarywrite(binstr)
end sub
function trans(y)
if rosetta(currentLanguage)(y) <> "" then
trans = rosetta(currentLanguage)(y)
else
trans = rosetta("EN")(y)
end if
end function
function sec2time (x)
minutes = fix(x / 60)
seconds = round(x - (minutes * 60))
if seconds < 10 then seconds = "0" & seconds
sec2time = minutes & ":" & seconds
end function
function andromedaEncode (x)
tmp = server.urlencode(x)
tmp = replace(tmp,"+","%20")
tmp = replace(tmp,"%2F","/")
tmp = replace(tmp,"%2E",".")
tmp = replace(tmp,"%2D","-")
tmp = replace(tmp,"%5F","_")
andromedaEncode = tmp
end function
function legalFolder (x)
lftmp = true
if andromedaPrefs("skipPrefix") <> "" then
if left(x,len(andromedaPrefs("skipPrefix"))) = andromedaPrefs("skipPrefix") then
lftmp = false
end if
end if
if lftmp then
if folderSkipNames.exists(x) then
lftmp = false
end if
end if
legalFolder = lftmp
end function
function legalFile (x)
lftmp = true
if andromedaPrefs("skipPrefix") <> "" then
if left(x,len(andromedaPrefs("skipPrefix"))) = andromedaPrefs("skipPrefix") then
lftmp = false
end if
end if
if lftmp then
if fileTypes.exists(lcase(local_fs.getextensionname(x))) then
isaftmp = fileTypes(lcase(local_fs.getextensionname(x)))
lftmp = ((isaftmp = "audio") or (isaftmp = "video") or (isaftmp = "playlist"))
else
lftmp = false
end if
end if
legalFile = lftmp
end function
function subfolderCount (x)
sdctotal = 0
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).subfolders
if legalFolder(f1.name) then sdctotal = sdctotal + 1
next
subfolderCount = sdctotal
end function
function fileCount (x)
tfileCount = 0
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).files
if legalFile(f1.name) then tfileCount = tfileCount + 1
next
fileCount = round((tfileCount/2)+.1)
end function
function getSubfolders2d(x)
lc = -1
lastVal = ""
sorted = true
redim subfolderList(subfolderCount(x) - 1,0)
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).subfolders
if legalFolder(f1.name) then
lc = lc + 1
subfolderList(lc,0) = f1.name
sorted = sorted and strGreaterThan(f1.name,lastVal)
lastVal = f1.name
end if
next
if ((lc > 0) and not(sorted)) then quickSort2d subfolderList,0,lc,0
getSubfolders2d = subfolderList
end function
function getFiles2d(x)
lc = -1
lastVal = ""
sorted = true
tc=true
redim fileList(fileCount(x) - 1,1)
for each f1 in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).files
if legalFile(f1.name) then
if tc then
lc = lc + 1
fileList(lc,0) = f1.name
fileList(lc,1) = f1.size
sorted = sorted and strGreaterThan(f1.name,lastVal)
lastVal = f1.name
tc=false
else
tc=true
end if
end if
next
if ((lc > 0) and not(sorted)) then quickSort2d fileList,0,lc,0
getFiles2d = fileList
end function
sub drill2 (x,z)
if z = 1 then
lcolor = andromedaPrefs("rowLinkColor")
tcolor = andromedaPrefs("rowTextColor")
elseif andromedaPrefs("disableHTMLheaders") then
lcolor = andromedaPrefs("bodyLinkColor")
tcolor = andromedaPrefs("bodyTextColor")
end if
%> "" then %> color=<% = tcolor %><% end if %>><%
if lcolor <> "" then
%> style="color:<% = lcolor %>">><% = andromedaPrefs("rootName") %> / <%
else
%>><% = andromedaPrefs("rootName") %> / <%
end if
tmpaa = split(x,"/")
tlp = ""
for i = 1 to ubound(tmpaa)
tlp = tlp & "/" & tmpaa(i)
if lcolor <> "" then
%> style="color:<% = lcolor %>">><% = displayName(tmpaa(i)) %> / <%
else
%>><% = displayName(tmpaa(i)) %> / <%
end if
next
%><%
end sub
sub playFolderButton (plx)
%>><% imagetag "p","i",trans(11) %><%
end sub
function andrLink (x,y)
andrLink = andromedaConst("scriptFileName") & x & server.urlencode(y)
end function
function mkMediaWebPath (x)
mkMediaWebPath = andromedaEncode(andromedaPrefs("mediaWebPath") & x)
end function
function folderLink (x)
folderLink = andrLink("?q=f&f=",x)
end function
function isAlbum (x)
isAlbum = (subfolderCount(x) = 0) and (fileCount(x) > 0)
end function
function byteCount (x)
if x >= 1024 * 1000 then
byteCount = round(x/(1024*1024),2) & " MB"
elseif x >= 1000 then
byteCount = round(x/1024) & " KB"
else
byteCount = x & " byte"
end if
end function
sub addvpad (height)
response.write("
")
end sub
sub ipad (width,height)
imagetag2 "x",width,height,"",false,"i",""
end sub
sub colorbar (cbw, cbh, cbc)
%>
height=<% = cbh %> bgcolor=<% = cbc %>>
<% ipad 1,1 %>
<%
end sub
sub colorBars (cbs)
if cbs <> "" then
cbtmp1a = split(cbs,";")
%>
"><%
for i = 0 to ubound(cbtmp1a)
cbtmp2a = split(cbtmp1a(i),",")
%>
<% ipad 1,cbtmp2a(1) %>
<%
next
%>
<%
end if
end sub
function switchRow(swx,swcolor1,swcolor2)
if swx mod 2 = 0 then
switchRow = swcolor1
else
switchRow = swcolor2
end if
end function
function ifps2(x,y,z)
if x = 1 then
ifps2 = y
else
ifps2 = z
end if
end function
function displayName (x)
if legalFile(x) then
cfntmp2 = local_fs.getbasename(x)
else
cfntmp2 = local_fs.getfilename(x)
end if
tknumtrimcodea = split(andromedaPrefs("tkNumTrimCodes"),",")
for i = 0 to ubound(tknumtrimcodea)
trimme = true
for j = 1 to len(tknumtrimcodea(i))
if mid(tknumtrimcodea(i),j,1) = "#" then
trimme = (trimme and isnumeric(mid(cfntmp2,j,1)))
else
trimme = (trimme and (mid(tknumtrimcodea(i),j,1) = mid(cfntmp2,j,1)))
end if
if trimme = false then exit for
next
if trimme then
cfntmp2 = mid(cfntmp2,len(tknumtrimcodea(i))+1)
exit for
end if
next
cfntmp2 = replace(cfntmp2,"_"," ")
cfntmp2 = trim(cfntmp2)
if right(lcase(cfntmp2),5) = ", the" then
cfntmp2 = right(cfntmp2,3) & " " & left(cfntmp2,len(cfntmp2) - 5)
end if
cftmpa = split(cfntmp2," ")
if ubound(cftmpa) = 1 then
if right(cftmpa(0),1) = "," then
cfntmp2 = cftmpa(1) & " " & left(cftmpa(0),len(cftmpa(0)) - 1)
end if
end if
displayName = cfntmp2
end function
function limitName (x)
if len(x) < andromedaPrefs("popupMaxWidth") then
limitname = x
else
limitname = (trim(left(x, andromedaPrefs("popupMaxWidth") - 2)) & "...")
end if
end function
function ca2s (x)
for i = 0 to ubound(x)
tmp = tmp & chr(x(i))
next
ca2s = tmp
end function
function newestfile (x)
for each i in local_fs.GetFolder(andromedaPrefs("mediaPhysicalPath") & x).files
if legalFile(i.name) then
if i.datecreated > maxdate then maxdate = i.datecreated
end if
next
xx2d = getSubfolders2d(x)
for fi = 0 to ubound(xx2d,1)
maxsubfiledate = newestfile(x & "/" & xx2d(fi,0))
if maxsubfiledate > maxdate then maxdate = maxsubfiledate
next
newestfile = maxdate
end function
sub displaynew (x)
if isdate(x) then
daydiff = DateDiff("d", x, date())
if daydiff = 0 then
%>"> <% = replace(trans(28)," "," ") %><%
elseif daydiff = 1 then
%>"> <% = replace(trans(29)," "," ") %><%
elseif daydiff > 1 and daydiff < 7 then
%>"> <% = replace(trans(29 + weekday(x,1))," "," ") %><%
end if
end if
end sub
function minHTMLencode(x)
mhetmp = replace(x,"<","<")
mhetmp = replace(mhetmp,">",">")
mhetmp = replace(mhetmp,"""",""")
minHTMLencode = mhetmp
end function
function bin2txt(Binary)
for i = 1 to LenB(Binary)
plo = ascb(midb(Binary,i,1))
if plo <> 0 then strChar = strChar & chr(plo)
next
bin2txt = strChar
end function
function fixbin (x)
if lenb(x) = 1 then
fixbin = ascb(x)
elseif lenb(x) = 2 then
fbyte1 = ascb(midb(x,1,1))
fbyte2 = ascb(midb(x,2,1))
if (((fbyte1 < 128) or (fbyte1 = 129) or (fbyte1 = 141) or (fbyte1 = 143) or (fbyte1 = 144) or (fbyte1 = 157) or (fbyte1 > 159)) and (fbyte2 = 0)) then
fixbin = fbyte1
else
select case fbyte1 & "-" & fbyte2
case "172-32"
fixbin = 128
case "26-32"
fixbin = 130
case "25-1"
fixbin = 131
case "30-32"
fixbin = 132
case "38-32"
fixbin = 133
case "32-32"
fixbin = 134
case "33-32"
fixbin = 135
case "198-2"
fixbin = 136
case "48-32"
fixbin = 137
case "96-1"
fixbin = 138
case "57-32"
fixbin = 139
case "82-1"
fixbin = 140
case "125-1"
fixbin = 142
case "24-32"
fixbin = 145
case "25-32"
fixbin = 146
case "28-32"
fixbin = 147
case "29-32"
fixbin = 148
case "34-32"
fixbin = 149
case "19-32"
fixbin = 150
case "20-32"
fixbin = 151
case "220-2"
fixbin = 152
case "34-33"
fixbin = 153
case "97-1"
fixbin = 154
case "58-32"
fixbin = 155
case "83-1"
fixbin = 156
case "126-1"
fixbin = 158
case "120-1"
fixbin = 159
case else
fixbin = fbyte1
end select
end if
end if
end function
function strGreaterThan(slt1,slt2)
strGreaterThan = (strcomp(slt1,slt2,1) = 1)
end function
sub quickSort2d(sortTable,startRow,endRow,sortColumn)
sortTableWidth = ubound(sortTable,2)
if endRow = (startRow + 1) then
if strGreaterThan(sortTable(startRow,sortColumn),sortTable(endRow,sortColumn)) then
for swi = 0 to sortTableWidth
tempvar = sortTable(startRow,swi)
sortTable(startRow,swi) = sortTable(endRow,swi)
sortTable(endRow,swi) = tempvar
next
end if
else
redim pivot(sortTableWidth)
for swi = 0 to sortTableWidth
pivot(swi) = sortTable(int((startRow + endRow) / 2),swi)
sortTable(int((startRow + endRow) / 2),swi) = sortTable(startRow,swi)
sortTable(startRow,swi) = pivot(swi)
next
loSwap = startRow + 1
hiSwap = endRow
do while loSwap < hiSwap
do while loSwap < hiSwap and strGreaterThan(pivot(sortColumn),sortTable(loSwap,sortColumn))
loSwap = loSwap + 1
loop
do while strGreaterThan(sortTable(hiSwap,sortColumn),pivot(sortColumn))
hiSwap = hiSwap - 1
loop
if loSwap < hiSwap then
for swi = 0 to sortTableWidth
tempvar = sortTable(loSwap,swi)
sortTable(loSwap,swi) = sortTable(hiSwap,swi)
sortTable(hiSwap,swi) = tempvar
next
end if
loop
for swi = 0 to sortTableWidth
sortTable(startRow,swi) = sortTable(hiSwap,swi)
sortTable(hiSwap,swi) = pivot(swi)
next
if startRow < (hiSwap - 1) then quickSort2d sortTable,startRow,hiSwap-1,sortColumn
if hiSwap + 1 < endRow then quickSort2d sortTable,hiSwap+1,endRow,sortColumn
end if
end Sub
sub editNote (x)
if local_fs.fileexists(andromedaPrefs("mediaPhysicalPath") & x) then
mode = "update"
else
mode = "create"
end if
andromedaHeader "edit note"
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>note: clicking the save button will <% = mode & " " & local_fs.getfilename(x) & " in " & replace(local_fs.getparentfoldername(andromedaPrefs("mediaPhysicalPath") & x),"/","\") %><%
%>
<%
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
andromedaFooter
end sub
sub saveNote (x,n)
if replace(replace(n," ",""),vbcrlf,"") = "" then
if local_fs.fileexists(andromedaPrefs("mediaPhysicalPath") & x) then
local_fs.DeleteFile(andromedaPrefs("mediaPhysicalPath") & x) '[, force]
end if
else
Set f = local_fs.OpenTextFile(andromedaPrefs("mediaPhysicalPath") & x, 2, True)
f.Write n
f.Close
end if
select case local_fs.getbasename(x)
case andromedaPrefs("folderListInfo")
response.redirect(folderLink(local_fs.getparentfoldername(local_fs.getparentfoldername(x))))
case andromedaPrefs("folderOpenInfo")
response.redirect(folderLink(local_fs.getparentfoldername(x)))
case else
response.redirect(folderLink(local_fs.getparentfoldername(x)))
end select
end sub
sub editPrefs
if local_fs.fileexists(andromedaConst("scriptPhysicalPath") & "/" & andromedaPrefsFileName) then
mode = "update"
else
mode = "create"
end if
andromedaHeader "edit preferences"
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><%
addvpad 6
%>Note: This built-in prefs editor is only designed to help you get started. To get the most out of Andromeda you should instead edit your prefs file with a text editor. Andromeda is highly configurable, but most prefs are not avalable here. Please see the <%
%><% if andromedaPrefs("disableHTMLheaders") then %>">">preference guide<% else %>preference guide<% end if %> for details.<%
addvpad 12
%>
<%
%> color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>general preferences<%
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><%
addvpad 6
%>siteName " style="<% = andromedaPrefs("formStyle") %>"> change the name of your site<%
addvpad 8
%>email " style="<% = andromedaPrefs("formStyle") %>"> if you want your email address displayed, enter it here.<%
addvpad 8
%> checked<% end if %>> requireLogon implements rudimentary security. you'll have to create & edit the andromedaLogons file<%
addvpad 8
%> checked<% end if %>> editMode makes it easy for you to annotate your collection<%
addvpad 8
%> checked<% end if %>> localFilePlayback this is a good feature which is off by default because of a bug with some versions of Internet Explorer. if you play mp3s on the same computer running andromeda, turn this on to prevent them from being copied to your web cache. if playback fails, turn it back off.<%
addvpad 8
%> checked<% end if %>> displayNew automatically highlights recent additions; turn off to improve performance, especially with big collections<%
addvpad 8
%> checked<% end if %>> permitSearch uncheck to disable the search feature<%
addvpad 8
%> checked<% end if %>> displayAMG displays the allmusic.com search box. don't be so quick to turn it off - it's not an advertisement, but a handy feature.<%
addvpad 12
%>
<%
%> color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>image handling<%
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><%
addvpad 6
%> checked<% end if %>> useImageFiles turn on to improve performance by using gif files instead of internal binary data. you can <% if andromedaPrefs("disableHTMLheaders") then %>">">download the icon files<% else %>download the icon files<% end if %> from my site.<%
addvpad 8
%>imageFolderPath " style="<% = andromedaPrefs("formStyle") %>"> if you set useImageFiles (above), the default location for the gif files is in the same folder as the Andromeda asp (<% = andrLink("","") %>). use this to specify another location (ie /images/). must end with a forward slash (/).<%
addvpad 12
%>
<%
%> color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>network settings<%
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>><%
addvpad 6
%>ftpPath " style="<% = andromedaPrefs("formStyle") %>"> if you include a ftpPath, users will see a link the ftp site entered here.<%
addvpad 8
%>hostAddress " style="<% = andromedaPrefs("formStyle") %>"> if your comupter's ip address cannot be seen (ie mapped through nat), or if you need to include a port you can enter an alternate ip address or host name here; no leading 'http://' or trailing '/'<%
addvpad 8
%>mediaWebPath " style="<% = andromedaPrefs("formStyle") %>"> mediaPhysicalPath " style="<% = andromedaPrefs("formStyle") %>"> by default andromeda looks in its folder for your mp3s. if you want andromeda to look elsewhere, edit mediaWebPath and mediaPhysicalPath to point to the preferred folder. this is an advanced feature; clear them both to revert to the default behavior.<%
addvpad 12
%>
<%
%> color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>integration<%
%>
color=<% = andromedaPrefs("bodyTextColor") %><% end if %>>note: clicking the save button will <% = mode & " " & andromedaPrefsFileName & " in " & andromedaConst("scriptPhysicalPath") %><%
%>
<%
colorbars andromedaPrefs("bodyFgDiv")
andromedaFooter
end if
else
if ((request("t") <> "") and andromedaPrefs("permitTranslation")) then
response.redirect(andrlink("?q=l&t=" & request("t"),""))
else
response.redirect(andrlink("?q=l",""))
end if
end if
else
if ((request("t") <> "") and andromedaPrefs("permitTranslation")) then response.cookies("clang") = currentLanguage
ckplaylist = readPlaylist("playlist")
if request("q") = "f" and vpath(request("f")) then
showfolder request("f")
elseif request("q") = "p" and vpath(request("p")) and andromedaPrefs("playLinks") then playFolder request("p")
elseif request("q") = "m" and vpath(request("m")) and andromedaPrefs("playLinks") then playPrepList "i" & request("m") & vbcrlf
elseif request("q") = "e" and andromedaConst("localUser") and vpath(request("e")) then editNote request("e")
elseif request("q") = "v" and andromedaConst("localUser") and vpath(request("v")) then saveNote request("v"), request("n")
elseif request("q") = "r" and andromedaConst("localUser") then editPrefs
elseif request("q") = "b" and andromedaConst("localUser") then savePrefs
elseif request("q") = "s" and andromedaPrefs("permitSearch") then search request("s"),request("sm")
elseif request("q") = "y" and andromedaPrefs("permitPlaylists") then
select case request("y")
case "p"
if andromedaPrefs("playLinks") then playPrepList ckplaylist
case trans(10)
if andromedaPrefs("playLinks") then
if request("m") = 1 then
for each xx in request("f")
pftmp = pftmp & xx & vbcrlf
next
playPrepList pftmp
else
selectlist = ""
for each x in request("f")
selectlist = selectlist & "[" & x & "]"
next
xtmpa = split(ckplaylist,vbcrlf)
for xi = 0 to ubound(xtmpa) -1
if instr(selectlist,"[" & xi + 1 & "]") <> 0 then
xtmp = xtmp & xtmpa(xi) & vbcrlf
end if
next
playPrepList xtmp
end if
end if
case trans(8)
xtmp = ckplaylist
for each xx in request("f")
if vpath(mid(xx,2)) then xtmp = xtmp & xx & vbcrlf
next
xtmp = left(xtmp,andromedaPrefs("cBlockSize") * andromedaPrefs("cBlockCount"))
xtmp = left(xtmp,instrrev(xtmp, vbcrlf)+1)
ckplaylist = xtmp
writePlaylist "playlist"
displayPlaylist "playlist"
case trans(45)
displayPlaylist "playlist"
case trans(9)
removelist = ""
for each x in request("f")
removelist = removelist & "[" & x & "]"
next
xtmpa = split(ckplaylist,vbcrlf)
for xi = 0 to ubound(xtmpa) -1
if instr(removelist,"[" & xi + 1 & "]") = 0 then
xtmp = xtmp & xtmpa(xi) & vbcrlf
end if
next
ckplaylist = xtmp
writePlaylist "playlist"
displayPlaylist "playlist"
case else
showfolder ""
end select
else
showfolder ""
end if
end if
set rosetta = nothing
set andromedaLogons = nothing
set folderSkipNames = nothing
set fileTypes = nothing
set andromedaPrefs = nothing
set andromedaConst = nothing
end if
set local_fs = nothing
%>