<%
dim choose,path,mydb,myset,SQL,fs,mp3
‘ è·å¾Âç¨æ·æÂÂ交表åÂÂ(list.htm)éÂÂä¸ÂçÂÂæ²ç®对åºÂçÂÂidå·,并å°ÂÃ¥Â
¶èµÂç»ÂÃ¥ÂÂ串åÂÂéÂÂchoose.
choose=âÂÂ(“
for i=3 to request.form.count
choose=chooseï¼Ârequest.form(i)ï¼ÂâÂÂ,”
next
choose=left(choose,len(choose)ï¼Â1)ï¼ÂâÂÂ)”
if choose=âÂÂ()” then
response.redirect(âÂÂlist.htm”)xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??
response.end
‘ å¤æÂÂchooseÃ¥ÂÂéÂÂ,å¦ÂæÂÂä¸ÂÃ¥ÂÂ
å«idå·,说æÂÂlist.htmä¸Â没æÂÂéÂÂä¸Âä»»ä½ÂæÂÂæ²,ç»Âæ¢ç¨ÂåºÂ.
end if
path=âÂÂE:\inetpub\wwwroot\temp\”
‘ 设置æÂÂ件路å¾Â,æÂÂtempç®å½ÂçÂÂæÂÂéÂÂ设为对internetå¿åÂÂç¨æ·åÂ
·æÂÂread ï¼ write æÂÂéÂÂ.
Set fs = CreateObject(âÂÂScripting.FileSystemObject”)
Set mp3 = fs.CreateTextFile(pathï¼ÂâÂÂlisten.m3u”, True)
‘ Ã¥ÂÂ建æÂÂ件对象.
set mydb=server.createobject(âÂÂadodb.connection”)
‘ Ã¥ÂÂ建æ°æ®åºÂ对象.
mydb.open âÂÂmusic”
SQL=âÂÂselect mp3name,url from “ï¼Âdbnameï¼ÂâÂÂwhere id in “ï¼Âchoose set myset=tdb.execute(SQL)
do while not myset.eof
‘ æ£Âç´¢æ°æ®åºÂ,è·å¾Âæ²ç®信æ¯.
mp3.Write(âÂÂhttp://”ï¼Âmyset(âÂÂurl”)ï¼Âchr(10))
myset.movenext
‘ çÂÂæÂÂç¹æÂÂæ²ç®æÂÂ件åÂÂ表.
loop
SQL=âÂÂupdate music set click=clickï¼Â1,
this=thisï¼Â1 where id in “ï¼Âchoose
mydb.execute(SQL)
‘ æ´æ°æ°æ®åºÂä¸ÂçÂÂå½Â天ç¹æÂÂ次æ°åÂÂæÂȌÂ
±ç¹æÂÂ次æ°.
set myset=nothing
mydb.close
set mydb=nothing
mp3.close
set mp3=nothing
‘ æ¸Â
空.
response.redirect(âÂÂlisten.m3u”)
‘ å°Â该æÂÂ件ä¸Âä¼ å°ç¨æ·.
response.end
%>
[1]