I need to attach the event to the date it occurred on in this calendar and suppress the link if no event occurred. Please help.
You can see this calendar at: http://128.83.78.247/texasforums/calendar4.cfm <<<<<Pasted Code Below>>>>> <cfparam name="URL.month" default="#Month(Now())#" /> <cfparam name="URL.year" default="#Year(Now())#" /> <cfquery name="rs_calendarevents" datasource="conn_texasforums"> SELECT * FROM tbl_event </cfquery> <cfset nNextMonth = URL.month + 1 /> <cfset nPreviousMonth = URL.month - 1 /> <cfset nNextYear = URL.year /> <cfset nPreviousYear = URL.year /> <cfif nNextMonth GT 12> <cfset nNextMonth = 1 /> <cfset nNextYear = nNextYear + 1 /> </cfif> <cfif nPreviousMonth LT 1> <cfset nPreviousMonth = 12 /> <cfset nPreviousYear = nPreviousYear - 1 /> </cfif> <cfset dCurrentMonth = CreateDate(URL.year, URL.month, 1) /> <cfset nDaysInMonth = DaysInMonth(dCurrentMonth) /> <cfset nDayOfMonth = 1 /> <cfset nFirstDayOfMonth = DayOfWeek(dCurrentMonth) /> <cfset nCounter = 1 /> <cfset dEndOfMonth = CreateDateTime(URL.year, URL.month, nDaysInMonth, 23, 59, 59) /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Untitled Document</title> </head> <body> <p> </p> <cfoutput> <table width="160" height="160" border="1" cellpadding="0" cellspacing="0"> <tr> <td colspan="7" bgcolor="gray"> <p align="center" class="calendarheadingmonth"><a href="#CGI.SCRIPT_NAME#?month=#nPreviousMonth#&year=#nPreviousYear#"> < </a> #UCase(MonthAsString(URL.month))# #URL.year# <a href="#CGI.SCRIPT_NAME#?month=#nNextMonth#&year=#nNextYear#"> > </a></p> </td> </tr> <tr> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>S</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>M</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>T</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>W</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>T</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>F</b></p> </td> <td width="20px" height="20px"> <p class="calendarheading" align="center"><b>S</b></p> </td> </tr> <cfloop condition="nDayOfMonth LT nDaysInMonth"> <tr valign="top"> <cfloop from="1" to="7" index="i"> <td> <cfif nCounter GTE nFirstDayOfMonth AND nDayOfMonth LTE nDaysInMonth> <table> <tr> <td> <p class="calendar"> <a href="events_details.cfm?ID=#rs_calendarevents.ID#">#nDayOfMonth#</a></p> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <cfset nDayOfMonth = nDayOfMonth + 1 /> </cfif> </td> <cfset nCounter = nCounter + 1 /> </cfloop> </tr> </cfloop> </table> </cfoutput> <p> </p> </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2367 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
