The following code implements the LPG table using ASP:
<p align="center"><font size="4" color="#0000FF"><img src="../images/lunalogo.gif" width="212" height="196"><br>
Luna Park Grille Music Schedule from </font><font size="4" color="#0000FF">
<%
limit = request.form("limit")
if limit > 0 then
else
limit = Request("limit")
if limit = 0 then
limit = 20
end if
end if
if limit < 0 then
limit = 30000
startdate = "7/1/99"
else
startdate = request.form("SD")
if len(startdate) then
else
startdate = Request("SD")
if len(startdate) = 0 then
startdate = Date-7
end if
end if
end if
Response.Write startdate
Response.Write "</font></p>" & chr(13) & chr(10)
%>
<%
Set objConnect = CreateObject("ADODB.Connection")
objConnect.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0; data source=D:\Inetpub\hardts.net\data\website.mdb"
objConnect.Open
command = "SELECT LPG.PerformDate, LPG.Performers, LPGINFO.Description, LPGINFO.Website, LPG.Submit FROM LPG LEFT JOIN LPGINFO ON "
command = command & "LPG.Performers=LPGINFO.Performers "
command = command & "WHERE LPG.PerformDate >= #" & startdate & "# "
command = command & "ORDER BY LPG.PerformDate, LPG.Submit DESC"
set objRecords = objConnect.Execute( command )
response.write "<TABLE BORDER=1 align=""center"">" & chr(13) & chr(10)
response.write "<TH>Date" & chr(13) & chr(10)
response.write "<TH>Performer" & chr(13) & chr(10)
response.write "<TH>Description" & chr(13) & chr(10)
response.write "<TH>Website" & chr(13) & chr(10)
response.write "<TBODY>" & chr(13) & chr(10)
do while true
if (objRecords.EOF or limit = 0) then exit do
if prev_date <> objRecords.Fields("PerformDate") then
response.write "<TR>" & chr(13) & chr(10)
if objRecords.Fields("PerformDate") < Date then
response.write "<TD>" & chr(13) & chr(10)
else
response.write "<TD STYLE=""font-weight:bold"">" & chr(13) & chr(10)
end if
Response.Write " " & objRecords.Fields("PerformDate") & " " & chr(13) & chr(10)
Response.Write "</TD>" & chr(13) & chr(10)
Response.Write "<TD STYLE=""font-weight:bold;color:#FF6984"">" & chr(13) & chr(10)
performer = objRecords.Fields("Performers")
Response.Write " " & performer & " " & chr(13) & chr(10)
Response.Write "</TD>" & chr(13) & chr(10)
Response.Write "<TD>" & chr(13) & chr(10)
Response.Write " " & objRecords.Fields("Description") & " " & chr(13) & chr(10)
Response.Write "</TD>" & chr(13) & chr(10)
Response.Write "<TD STYLE=""font-weight:bold;color:#FF6984""> " & chr(13) & chr(10)
web_site = objRecords.Fields("Website")
if len(web_site) then
if instr( web_site, "http:") then
Response.Write "<a href=""" & web_site & """>" & web_site & " </a>" & chr(13) & chr(10)
else
Response.Write "<a href=""http://" & web_site & """>" & web_site & " </a>" & chr(13) & chr(10)
end if
end if
Response.Write " </TD>" & chr(13) & chr(10)
prev_date = objRecords.Fields("PERFORMDATE")
Response.Write "</TR>" & chr(13) & chr(10)
limit = limit - 1
end if
objRecords.MoveNext
loop
Response.Write "</TBODY>" & chr(13) & chr(10)
Response.Write "</TABLE>" & chr(13) & chr(10)
objConnect.Close
%>
</font>
<%
'=========================================================================
'
' Most of the code below is unreadable - sorry but I use FrontPage and it
' re-arranges and adds things. It just implements the form at the bottom
' of the page - which is not really all that interesting...
'
'=========================================================================
%>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.SD.value == "")
{
alert("Please enter a value for the \"SD\" field.");
theForm.SD.focus();
return (false);
}
if (theForm.SD.value.length > 65)
{
alert("Please enter at most 65 characters in the \"SD\" field.");
theForm.SD.focus();
return (false);
}
if (theForm.limit.value == "")
{
alert("Please enter a value for the \"limit\" field.");
theForm.limit.focus();
return (false);
}
if (theForm.limit.value.length > 254)
{
alert("Please enter at most 254 characters in the \"limit\" field.");
theForm.limit.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form ACTION="http://www.hardts.net/data/banddata.asp" METHOD="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<font color="#000080"><strong> Starting Date:</strong></font><br>
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Maximum-Length="65"
-->
<input SIZE="65" NAME="SD" tabindex="1" maxlength="65"
<p <%
startdate = Request("SD")
if len(startdate) = 0 then
startdate = Date-7
end if
response.write "value=""" & startdate & """"
%>>
<br>
<font color="#000080"><strong> Limit (-1 means all dates):</strong></font><br>
<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Maximum-Length="254" --> <input TYPE="text" SIZE="65" NAME="limit" tabindex="3" maxlength="254"
<p <%
limit = Request("limit")
if limit = 0 then
limit = 20
end if
Response.Write "value=""" & limit & """"
%>>
<input TYPE="submit" VALUE="Submit" NAME="btnSubmit" tabindex="6">
<br>
<table border="0" width="100%" height="17">
<tr>
<td width="71%" height="13"><font size="2"><img SRC="../lpg/images/Image1.gif" WIDTH="123" HEIGHT="116" align="left" alt="LPG logo"></font><font size="4"><strong> Luna
Park Grille<br>
5866 Washington Blvd<br>
Arlington, VA 22205<br>
(703)-237-5862</strong></font></td>
<td width="29%" height="13"></td>
</tr>
</table></form>
<p><strong>There have been </strong><!--webbot bot="HitCounter" u-custom i-digits="0" i-image="4"
PREVIEW="<strong>[Hit Counter]</strong>" i-resetvalue="0" startspan --><img src="../_vti_bin/fpcount.exe/?Page=data/banddata.asp|Image=4" alt="Hit Counter"><!--webbot bot="HitCounter" endspan i-checksum="44512" -->
<strong> hits on this page since November 1, 1999...</strong></p>