<cfoutput>
<cfset today = "#now()#">
<cfparam name="thisday" default="#today#">
<cfset nextday = #dateadd("d",1,"#thisday#")#>
<cfset lastday = #dateadd("d",-1,"#thisday#")#>
<cfset datetoshow = "#thisday#">
<!---This query will get the current day's TV Guide--->
<cfquery name="getguide" datasource="#dsource#">
SELECT *
FROM tbl_guide
WHERE guide_DT = '#DateFormat(thisday, "DD MMM YY")#'
</cfquery>
<title>#title# for #DateFormat(Now(), "DD MMM YY")#</title>
<body>
<h2>#title#</h2>
<h3>#DateFormat(Now(), "DD MMM YY")#</h3>
<cfif getguide.recordcount GT 0>
<table width="300" border="1" class="header"><tr bgcolor="white"><td width="15%" align="center"><a title="View the Previous day" href="default.cfm?thisday=#dateformat(lastday,"mm/dd/yyyy")#"><font><<</font></a></td><td width="70%" align="center">#dateformat(thisday,"mm/dd/yyyy")#</td><td width="15%" align="center"><a title="View the Next day" href="default.cfm?thisday=#dateformat(nextday,"mm/dd/yyyy")#"><font>>></font></a></td></tr>
<TR class="header">
<TD>CHANNEL</TD>
<TD>HOURS</TD>
<TD>PROGRAM</TD>
</TR>
<cfloop query="getguide">
<TR class="guide-sub">
<!---<TD> </TD>--->
<TD>#getguide.guide_ch#</TD>
<TD>#getguide.guide_time#</TD>
<TD>#getguide.guide_tx#</TD>
</TR>
</cfloop>
<cfelse>
<p class="warnl">Currently there is no TV Guide listing.</p>
</cfif>
</table>
</body>
</html>
</cfoutput>