%@ Language=JScript %>
<%
//------------------------------------------------------------------------------
// Audio.asp
//
// ASP page to lookup audio lectures in a SQL database. It is
// intended for execution from another HTML or ASP page, with a
// user interface, as appropriate.
//
// The parameters must be supplied to this page as follows:
//
// Audio.asp?lang=
//
// Example: Audio.asp?lang=English
//
//------------------------------------------------------------------------------
var gindex = 0;
var STREAM_SERVER = "http://" + Request.ServerVariables("SERVER_NAME") + ":7070";
%>
Audio and Video Library
<%
// Main body of the HTML script
%>

To download a file, click on its link. To
listen to a file on-line, click on the appropriate
or
icon.
<%
// Open up the database
Conn = Server.CreateObject( "ADODB.Connection" );
//------------------------------------------------------------------
// Database Name: "AV"
// Login: ""
// Password: "" (none)
Conn.Open("AV", "", "");
//------------------------------------------------------------------
// build SQL query based on user request
if (age == 'All') {
agestring = "";
} else {
agestring = " AND New = Yes";
}
if (type == 'All') {
typestring = "";
} else {
typestring = " AND Category = '" + type + "'";
}
if (lang == 'All') {
langstring = "";
} else {
langstring = " AND Language LIKE '%" + lang + "%'";
}
if (reciter == 'All' || reciter == '' || reciter == null) {
speakerstring = "";
} else {
speakerstring = " AND Reciter = '" + reciter + "'";
}
SQL = "SELECT * FROM av WHERE Approved = true " + agestring + typestring + langstring + speakerstring + " order by ID";
Response.Write("Language: "+lang+"
\n");
Response.Write("Type: "+type+"\n");
if (reciter != 'All' && reciter != null) {
Response.Write("
Reciter: "+reciter+"\n");
}
//Response.Write( "
SQL Query: " + SQL)
RS = Conn.Execute( SQL );
count = 0;
len = 0;
%>
| No. |
Subject/occasion and
lecturer/reciter |
|
Venue |
|
Date |
|
Duration/file size |
<%
while(!RS.EOF)
{
count = count +1;
nID = 0+RS("ID");
// sNumb = RS("Number");
sTitle = RS("Title");
sDLink = RS("DownloadLink");
sSLink = STREAM_SERVER + RS("StreamLink");
sSLink += "";
sPerson = RS("Reciter");
sDate = RS("Date");
sVenue = RS("Venue");
sDuration = RS("Duration");
sFileSize = RS("FileSize");
sDesc = RS("Description");
sNew = RS("New");
sCategory = RS("Category");
sOccasion = RS("Occasion");
sIsAudio = (RS("IsAudio") + "") == "true"; // Response.Write("" + RS("IsAudio") + "");
sOccasion = sOccasion + "";
giffy="";
if (sNew==true)
giffy = "
"
%>
| <%=count%> |
<%=sTitle%>
<% if (sOccasion != "null") { %>
<%=sOccasion%>
<% } %>
<%=sPerson%>
|
<% if (sSLink != " " && sSLink != "" && sSLink != "null") { %>
"listen.gif" alt="Listen Now"
<%} else {%>
"video/see.gif" alt="Stream Now"
<%}%> border="0" width="15" height="22">
<% } %>
<%
Response.Write(giffy);
%>
|
<%=sVenue%> |
|
<%=sDate%> |
|
<%=sDuration%>
<%=sFileSize%> |
| |
<%=sDesc%> |
| |
|
|
|
|
|
|
|
|
|
|
<%
RS.MoveNext();
}
%>
<%
RS.Close()
Conn.Close()
%>
*****
You need
to listen to the audio here.
Presented by the Ahlul
Bayt Digital Islamic Library Project team