%@ LANGUAGE = VBScript%><%Option Explicit
Dim SourceDir, fso, Indent, nl, SrcDrLen, tmp, TitleFile, Title,oConn,oRs,filePath,RecID
Dim ThisDir,File,arry(300,2),n,m,p
Dim stm
nl=vbCrLf
Indent=0
Const ForReading = 1
RecID=Request.QueryString("ID")
'RecID="38"
SourceDir=Server.MapPath("./")
Set fso = CreateObject("Scripting.FileSystemObject")
Set SourceDir = fso.GetFolder(SourceDir)
SrcDrLen=Len(SourceDir.Path)+2
' Create ADO Connection Component to connect
filePath = Server.MapPath("Adm_ThuyetPhap.mdb")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
If Len(RecID)<4 Then
Set oRs = oConn.Execute("select * from ThuyetPhap where ID=" & RecId & ";" )
Else
Set oRs = oConn.Execute("select * from ThuyetPhap where UniqueID='" & RecId & "';" )
End If
'Response.write("title=" & oRs("Title") & "
")
'Response.write("location=" & oRs("Location") & "
")
'Response.write("date=" & oRs("Date") & "
")
'Response.write("path=" & oRs("Path") & "
")
'Response.write("source=" & oRs("Source") & "
")
'Response.write("Authorid=" & oRs("Authorid") & "
")
Set ThisDir = fso.GetFolder(SourceDir & "\" & oRs("Path"))
For each File in ThisDir.Files
Tmp=ucase(right(File.name,4))
If Tmp=".MP3" Then
arry(n,1)=left(File.Name,len(file.name)-4)
arry(n,2)=File.Size
n=n+1
End If
Next
%>
|