<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../include/connect.asp" -->
<!--#Include File="../../antisqlin/Neeao_SqlIn.Asp"-->
<%
musicid=request.querystring("musicid")

set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_ALLMusic where MusicID="&musicid&""
rs.open sql,cn,1,1

if rs.eof or rs.bof then
Response.write("<script>alert('找不到此音乐！');history.back(-1);</script>")
Response.end()
elseif rs("Username") <> session("username") then
Response.write("<script>alert('您没有权限！');history.back(-1);</script>")
rs.close
set rs=nothing
Response.end()
end if

cn.execute ("delete from Show5_ALLMusic where MusicID="&musicid&"")
Set fso = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
fso.DeleteFile("E:\Wwwroot\show5net\UploadMusic\"&rs("Username")&"\"&rs("Filename")&"")
fso.close
set fso=nothing
Response.write("<script>alert('成功删除音乐！');history.back(-1);</script>")
rs.close
set rs=nothing
%>
