home *** CD-ROM | disk | FTP | other *** search
- <%@ LANGUAGE="VBSCRIPT" %>
- <% Set clsTes = Session("TES")
- If clsTes.LoggedIn = False Then
- Set clsTes = Nothing
- Response.Redirect("../loggedout.htm")
- End If
-
- tResource = Request("Resource")
- dDate = Request("Date")
- tGridBy = Request("GridBy")
- tViewBy = Request("ViewBy")
-
- If Len(dDate)=0 Then
- dDate = clsTes.Monday(clsTes.ADbl(clsTes.FromDate))
- clsTes.FromDate = clsTes.ADbl(dDate)
- Else
- dDate = clsTes.Monday(clsTes.ADbl(dDate))
- clsTes.FromDate = clsTes.ADbl(dDate)
- End If
-
- If Len(tResource) = 0 Then
- tResource = clsTes.Resource
- Else
- If clsTes.ViewResource(tResource,1) Then
- clsTes.Resource = tResource
- Else
- tResource = clsTes.Resource
- End If
- End If
-
- If Len(tGridBy) = 0 Then
- tGridBy = clsTes.GridBy
- Else
- clsTes.GridBy = tGridBy
- End If
-
- If Len(tViewBy) = 0 Then
- tViewBy = clsTes.ViewBy
- Else
- clsTes.ViewBy = tViewBy
- End If
-
- %>
- <!-- #INCLUDE FILE = "settings/colours.txt" -->
- <HTML>
- <HEAD>
- <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
- <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
- <TITLE>Timesheet Grid View</TITLE>
- </HEAD>
- <BODY BGCOLOR="<%= BackColor %>" LINK="<%= LinkColor %>" VLINK="<%= VLinkColor %>" ALINK="<%= ALinkColor %>" TEXT="<%= TextColor %>">
- <BASEFONT SIZE=2 COLOR="<%= TextColor %>">
-
- <% If clsTes.TimesheetViewAccess <> 2 Then 'US_NONE %>
-
- <table border=0 width=100% cellspacing=0 cellpadding=0>
- <tr>
- <td><IMG border=0 src="..\images\space.gif"> </td>
- </tr>
- <tr>
- <td align=left valign=top nowrap=nowrap>
-
- <table border=0 cellspacing=1 cellpadding=1>
- <tr>
- <td align=left>
- <b>
- <%= Server.HTMLEncode(clsTes.ResourceLabel) %>:
- </b>
- </td>
- <td align=left>
- <% If clsTes.TimesheetViewAccess <> 3 and clsTes.TimesheetViewAccess <> 6 and clsTes.TimesheetViewAccess <> 7 Then 'US_OWN %>
- <a href="pickitem.asp?Type=Resource&<%= "ReturnURL=" & Server.URLEncode("tsgrid.asp") %>" target=_parent>
- <% End If
-
- If len(tResource) > 0 Then
- Response.Write(Server.HTMLEncode(tResource))
- Else %>
- Please Select
- <% End If %>
-
- <% If clsTes.TimesheetViewAccess <> 3 and clsTes.TimesheetViewAccess <> 6 and clsTes.TimesheetViewAccess <> 7 Then 'US_OWN %>
- </a>
- <% End If %>
-
- </td>
-
- <td width=25></td>
-
- <td align=left>
- <B>Grid By:</B>
- <% tURL="tsgrid.asp?GridBy="
- If tGridBy = "Project" Then
- tURL=tURL & "Activity" %>
- <a href="<%= tURL %>" target=_parent>
- <%= Server.HTMLEncode(clsTes.ProjectLabel) %>
- <% Else
- tURL=tURL & "Project" %>
- <a href="<%= tURL %>" target=_parent>
- <%= Server.HTMLEncode(clsTes.ActivityLabel) %>
- <% End If%>
- </a>
- </td>
-
- <td width=25></td>
-
- <td align=left>
- <B>View:</b>
- <% tURL="tsgrid.asp?ViewBy="
- If tViewBy = "Desc" Then
- tURL=tURL & "Code" %>
- <a href="<% Response.Write(tURL) %>" target=_parent>
- Descriptions
- <% Else
- tURL=tURL & "Desc" %>
- <a href="<% Response.Write(tURL) %>" target=_parent>
- Codes
- <% End If%>
- </a>
- </td>
-
- <td width=25></td>
-
- </tr>
- </table>
- </td>
-
- <td align=right valign=top>
- <% tURL = "tsgrid.asp?Date=" %>
- <table border=0 cellspacing=1 cellpadding=1>
- <tr>
- <td align=center NOWRAP=NOWRAP>
- <b>
- <A HREF="calendar.asp?ReturnURL=<%= Server.URLEncode("tsgrid.asp") %>&Name=Date&Date=<%= dDate %>" target="_parent">
- <% Response.Write(clsTes.FormatDate(dDate)) %>
- </A>
- </b>
- </td>
- <td align=center>
- To
- </td>
- <td align=center>
- <b><% Response.Write(clsTes.FormatDate(dDate+6)) %></b>
- </td>
- <td width=10></td>
- <td align=center width=25>
- <a href=<% Response.Write(tURL & CStr(dDate - 28)) %> target=_parent>
- <img border=0 align=center src="../images/bck4w.gif" ALT="Back 4 Weeks">
- </a>
- </td>
- <td align=center width=25>
- <a href=<% Response.Write(tURL & CStr(dDate - 7)) %> target=_parent>
- <img border=0 align=center src="../images/bck1w.gif" ALT="Back 1 Week">
- </a>
- </td>
- <td align=center width=25>
- <a href=<% Response.Write(tURL & CStr(dDate + 7)) %> target=_parent>
- <img border=0 align=center src="../images/fwd1w.gif" ALT="Forward 1 Week">
- </a>
- </td>
- <td align=center width=25>
- <a href=<% Response.Write(tURL & CStr(dDate + 28)) %> target=_parent>
- <img border=0 align=center src="../images/fwd4w.gif" ALT="Forward 4 Weeks">
- </a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><IMG border=0 src="..\images\space.gif"> </td>
- </tr>
- </table>
-
-
-
- <table border=0 width=100% cellspacing=1 cellpadding=2>
- <tr>
- <td align=left valign=top bgcolor ="<%= CellTitleColor %>" width=20%>
- <font color="<%= CellTitleTextColor %>">
- <% If tGridBy = "Activity" Then %>
- <b><%= Server.HTMLEncode(clsTes.ActivityLabel) %></b>
- <% Else %>
- <b><%= Server.HTMLEncode(clsTes.ProjectLabel) %></b>
- <% End If %>
-
- <% If tViewBy = "Desc" Then %>
- <b>Description</B>
- <% Else %>
- <b>Code</b>
- <% End If %>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Mon</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Tue</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Wed</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Thu</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Fri</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Sat</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= CellTitleColor %>" width=8%>
- <font color="<%= CellTitleTextColor %>">
- <b>Sun</b>
- </font>
- </td>
- <td align=center valign=top bgcolor ="<%= GridTotalDarkColor %>" width=8%>
- <font color="<%= GridTotalTextColor %>">
- <b>Total <%= Server.HTMLEncode(clsTes.UnitTimeLabelP) %></b>
- </font>
- </td>
- <% If clsTes.UserCost = 2 or clsTes.UserCost = 4 or clsTes.UserCost = 5 Then %>
- <td align=center valign=top bgcolor ="<%= GridTotalDarkColor %>" width=8%>
- <font color="<%= GridTotalTextColor %>">
- <b>Total Cost</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserCharge = 2 or clsTes.UserCharge = 4 or clsTes.UserCharge = 5 Then %>
- <td align=center valign=top bgcolor ="<%= GridTotalDarkColor %>" width=8%>
- <font color="<%= GridTotalTextColor %>">
- <b>Total Charge</b>
- </font>
- </td>
- <% End If %>
-
- </tr>
-
- <% Dim lRowCount
- Dim lRow
- Dim nColumn
-
- lRowCount = clsTes.GenerateTimesheetGrid
- If clsTes.ErrorNumber <> 0 Then
- Response.Write (clsTes.ErrorText)
- clsTes.ErrorClear
- End If
-
- If lRowCount > 0 Then
- For lRow = 1 To lRowCount %>
- <tr>
- <td align=left valign=bottom bgcolor="<%= CellTitleColor %>">
- <font color="<%= CellTitleTextColor %>" size=-1>
- <% If tViewBy="Desc" Then %>
- <b><%= clsTes.GridValue(lRow,1) %></b>
- <% Else %>
- <b><%= clsTes.GridValue(lRow,0) %></b>
- <% End If %>
- </font>
- </td>
-
- <% For nColumn = 2 To 8 %>
-
- <td align=right valign=bottom bgcolor="<%= CellColor %>">
- <% If IsNull(clsTes.GridValue(lRow,0)) Then
- tCode = ""
- Else
- tCode = CStr(clsTes.GridValue(lRow,0))
- End If
- If IsNull(clsTes.GridValue(lRow,1)) Then
- tDesc = ""
- Else
- tDesc = CStr(clsTes.GridValue(lRow,1))
- End If
-
- tAddNewURL = "tsedit.asp?Mode=Add&Code=" & Server.URLEncode(tCode) & "&Desc=" & Server.URLEncode(tDesc) & "&Date=" & (dDate + (nColumn - 2))
- tDisplayURL = "detail.asp?Code=" & Server.URLEncode(tCode) & "&Desc=" & Server.URLEncode(tDesc) & "&Date=" & (dDate + (nColumn - 2))
- If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <font size=-1>
- <a href="<%= tDisplayURL %>" target="DETAIL">
- <%= clsTes.GridValue(lRow, nColumn) %>
- </a>
- </font>
-
- <% If clsTes.Maintain(lRow) Then %>
- <font size =-2>
- <a href="<%= tAddNewURL %>" target="_parent">
- +
- </a>
- </font>
- <% End If
- Else
- If clsTes.Maintain(lRow) Then %>
- <font size =-2>
- <a href="<%= tAddNewURL %>" target="_parent">
- +
- </a>
- </font>
- <% End If %>
- <% End If %>
- </td>
- <% Next
-
- nColumn = 9 %>
-
- <td align=right bgcolor="<%= GridTotalLightColor %>">
- <font size=-1 color="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <%= clsTes.GridValue(lRow,nColumn) %>
- <% End If %>
- </font>
- </td>
-
- <% If clsTes.UserCost=2 or clsTes.UserCost=4 or clsTes.UserCost=5 Then
-
- nColumn = 10 %>
- <td align=right bgcolor="<%= GridTotalLightColor %>">
- <font size=-1 color="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <%= clsTes.GridValue(lRow,nColumn) %>
- <% End If %>
- </font>
- </td>
- <% End If
-
- If clsTes.UserCharge=2 or clsTes.UserCharge=4 or clsTes.UserCharge=5 Then
-
- nColumn = nColumn + 1 %>
- <td align=right bgcolor="<%= GridTotalLightColor %>">
- <font size=-1 color="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <%= clsTes.GridValue(lRow,nColumn) %>
- <% End If %>
- </font>
- </td>
- <% End If %>
- </tr>
-
- <% Next
- lRow = lRowCount + 1 %>
-
- <TR>
- <TD BGCOLOR="<%= GridTotalDarkColor %>">
- <FONT COLOR="<%= GridTotalTextColor %>">
- <b>Total <%= clsTes.UnitTimeLabelP %></b>
- </TD>
-
- <% For nColumn = 2 to 8 %>
- <td bgcolor="<%= GridTotalLightColor %>" ALIGN=MIDDLE>
- <FONT SIZE=-1 COLOR="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow, nColumn)) Then %>
- <%= clsTes.GridValue(lRow, nColumn) %>
- <% Else %>
-
- <% End If %>
- </FONT>
- </td>
- <% Next %>
-
- <td bgcolor="<%= GridTotalDarkColor %>" align=right>
- <FONT COLOR="<%= GridTotalTextColor %>" SIZE=-1>
- <% If Not IsNull(clsTes.GridValue(lRow,9)) Then %>
- <B><%= clsTes.GridValue(lRow,9) %></B>
- <% Else %>
-
- <% End If %>
- </td>
-
-
-
- <% If clsTes.UserCost=2 or clsTes.UserCost=4 or clsTes.UserCost=5 Then %>
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
- <% End If %>
-
- <% If clsTes.UserCharge=2 or clsTes.UserCharge=4 or clsTes.UserCharge=5 Then %>
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
- <% End If %>
- </TR>
-
-
-
-
- <% If clsTes.UserCost=2 or clsTes.UserCost=4 or clsTes.UserCost=5 Then
- lRow = lRow + 1 %>
- <TR>
- <TD BGCOLOR="<%= GridTotalDarkColor %>">
- <FONT COLOR="<%= GridTotalTextColor %>">
- <b>Total Cost</b>
- </TD>
-
- <% For nColumn = 2 to 8 %>
- <td bgcolor="<%= GridTotalLightColor %>" align=center>
- <FONT SIZE=-1 COLOR="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow, nColumn)) Then %>
- <%= clsTes.GridValue(lRow, nColumn) %>
- <% Else %>
-
- <% End If %>
- </FONT>
- </td>
- <% Next %>
-
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
-
- <td bgcolor="<%= GridTotalDarkColor %>" align=right>
- <FONT COLOR="<%= GridTotalTextColor %>" SIZE=-1>
- <% If Not IsNull(clsTes.GridValue(lRow,10)) Then %>
- <B><%= clsTes.GridValue(lRow,10) %></B>
- <% Else %>
-
- <% End If %>
- </FONT>
- </td>
-
- <% If clsTes.UserCharge=2 or clsTes.UserCharge=4 or clsTes.UserCharge=5 Then %>
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
- <% End If %>
- </TR>
- <% End If %>
-
-
- <% If clsTes.UserCharge=2 or clsTes.UserCharge=4 or clsTes.UserCharge=5 Then
- lRow = lRow + 1 %>
- <TR>
- <TD BGCOLOR="<%= GridTotalDarkColor %>">
- <FONT COLOR="<%= GridTotalTextColor %>">
- <b>Total Charge</b>
- </TD>
-
- <% For nColumn = 2 to 8 %>
- <td bgcolor="<%= GridTotalLightColor %>" align=center>
- <FONT SIZE=-1 COLOR="<%= GridTotalTextColor %>">
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <%= clsTes.GridValue(lRow,nColumn) %>
- <% Else %>
-
- <% End If %>
- </FONT>
- </td>
- <% Next %>
-
- <% nColumn = 10 %>
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
-
- <% If clsTes.UserCost=2 or clsTes.UserCost=4 or clsTes.UserCost=5 Then
- nColumn = nColumn + 1 %>
- <td bgcolor="<%= GridTotalDarkColor %>"> </td>
- <% End If %>
-
- <td bgcolor="<%= GridTotalDarkColor %>" align=right>
- <FONT COLOR="<%= GridTotalTextColor %>" SIZE=-1>
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <B><%= clsTes.GridValue(lRow,nColumn) %></B>
- <% Else %>
-
- <% End If %>
- </FONT>
- </td>
-
- </TR>
- <% End If %>
- </table>
-
- <% End If %>
-
-
- <% Else %>
- Sorry, you do not have access to view timesheets.
- <% End If %>
- <% Set clsTes = Nothing %>
- </BODY>
- </HTML>
-