When i run this page it just pulls up the page as though cfcontent was not
even there. What have I done wrong?
Josh
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<cfquery name="qryGETMTHS"
datasource="0424_SQL_REGION_VACATION"
dbtype="ODBC"
username=""
password="">
SELECT month, rtrim(colspan) as col, bgcolor
from tblMONTHS
</cfquery>
<cfquery name="qryGETSUPS"
datasource="0424_SQL_REGION_VACATION"
dbtype="ODBC"
username=""
password="">
SELECT supid, supname, rr, dd, supemail, dept
from tblSUPS
where supid = '#supid#'
</cfquery>
<cfquery name="qryGETUSERS"
datasource="0424_SQL_REGION_VACATION"
dbtype="ODBC"
username=""
password="">
SELECT distinct tblusers.fname, tblusers.lname, rtrim(tblUSERS.fname+ ' '
+ tblUSERS.lname) as name, tblusers.id, dateofhire, wksvac, ssno
FROM tblusers
where tblusers.supgroup = '#supid#' and active = '1'
order by dateofhire
</cfquery>
<cfquery name="qryGETVACATIONS"
datasource="0424_SQL_REGION_VACATION"
dbtype="ODBC"
username=""
password="">
SELECT distinct tblVACATIONS.we_date, tblvacations.tblusersid, approved
FROM {oj dbo.tblUSERS RIGHT OUTER JOIN dbo.tblVACATIONS ON
dbo.tblUSERS.id = dbo.tblVACATIONS.tblusersid}
WHERE tblvacations.we_date is not NULL and active = '1' and
datepart(yyyy, tblvacations.we_date) = '#year#'
</cfquery>
<html>
<head>
<title>Untitled</title>
<link rel="STYLESHEET" type="text/css" href="css/vacation.css">
</head>
<body>
<cfcontent type="application/x-msexcel">
<cfset vari = dateformat(now(), "yyyy")>
<cfset year = vari + 1>
<cfset NewYears = DayOfWeek("01/01/#year#")>
<cfset FirstWeekEnd = (7 - NewYears)>
<cfset NewYears1 = DayOfWeek("1/1/#Year#")>
<cfset FirstWeekEnd1 = (6 - NewYears1)>
<cfset listFirstHalf = "">
<cfset listSecondHalf = "">
<cfloop index="saturday" from="#firstWeekEnd1#" to="#DaysInYear(Year)#"
step="7">
<cfset thisDate1 = DateAdd("d",saturday,"1/1/2001")>
<cfif month(thisDate1) lt 7>
<cfset listFirstHalf = listAppend(listFirstHalf, thisDate1)>
<cfelse>
<cfset listSecondHalf = listAppend(listSecondHalf, thisDate1)>
</cfif>
</cfloop>
<table align="center">
<tr>
<td align="center" class="tdheader0"><cfoutput
query="qryGETSUPS">#supname# / #rr##dd# / #dept#</cfoutput></td>
</table>
</tr>
<table border="1" cellspacing="0" align="center">
<tr> <td rowspan="2"
align="center"><cfoutput>#year#</cfoutput></td>
<td rowspan="2" align="center">Social</td>
<cfoutput query="qryGETMTHS">
<td colspan="#col#" align="center" bgcolor="#bgcolor#"
class="tdheader">#month#</td>
</cfoutput>
<td rowspan="2">Wks. Allowed</td>
</tr>
<tr>
<cfloop index="saturday" from="#firstWeekEnd#" to="#DaysInYear(year)#"
step="7">
<cfset thisDate = DateAdd("d",saturday,"1/1/#year#")>
<cfoutput><td align="center" class="tdheader1">#dateformat(thisdate,
"dd")#</td></cfoutput></cfloop>
</tr>
<cfoutput>
<cfLOOP query="qryGETUSERS">
<cfset curid = #id#>
<tr>
<cfif client.user_level eq 5>
<td align="center" class="tdheader5"><a
href="update.cfm?empid=#curid#">#name#<br>#dateformat(dateofhire,
"mm/dd/yy")#</a></td>
<cfelse>
<td align="center"
class="tdheader5">#name#<br>#dateformat(dateofhire,
"mm/dd/yy")#</td>
<td align="center" class="tdheader5">#qryGETUSERS.ssno#</td>
</cfif>
<cfloop index="saturday" from="#firstWeekEnd#"
to="#DaysInYear(year)#"
step="7">
<cfset thisDate = DateAdd("d",saturday,"1/1/#year#")>
<cfloop query="qryGETVACATIONS">
<CFIF (#thisdate# eq
#qryGETVACATIONS.we_date#) and
(#qrygetvacations.tblusersid# eq #curid#)>
<CFSET box = "<font
size=2><strong>X</strong></font>">
<CFSET ischecked="checked">
<cfif approved eq 'Yes'>
<CFSET cellcolor="Orange">
<cfelse>
<cfset cellcolor="red">
</cfif>
<CFBREAK>
<cfelse>
<cfset box = " ">
<cfset ischecked="">
<CFSET cellcolor="Gray">
</CFIF>
</cfloop>
<cfif isdefined("cellcolor")>
<cfelse>
<cfset cellcolor = "Gray">
<cfset box = " ">
</cfif>
<td align="center" bgcolor="#cellcolor#"
class="tdheader1">
#box#
</td>
</cfloop>
<td align="center">#qrygetusers.wksvac#</td>
</tr>
</cfloop>
</cfoutput>
</table>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists