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")
- dFromDate = Request("FromDate")
- dToDate = Request("ToDate")
-
- If Len(dFromDate)=0 Then
- dFromDate = clsTes.ADbl(clsTes.FromDate)
- Else
- clsTes.FromDate = clsTes.ADbl(dFromDate)
- End If
-
- If Len(dToDate)=0 Then
- dToDate = clsTes.ADbl(clsTes.ToDate)
- Else
- clsTes.ToDate = clsTes.ADbl(dToDate)
- 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
-
- %>
- <!-- #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 Table</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 %>
-
- <FORM ACTION="tsaction.asp" METHOD=POST>
-
- <table border=0 Cellpadding=0 CellSpacing=0 width=100%>
- <tr>
- <td COLSPAN=2><IMG border=0 src="..\images\space.gif"> </td>
- </tr>
-
- <tr>
- <td align=left valign=top nowrap=nowrap>
- <table width = 250 border=0 cellspacing=1 cellpadding=1>
- <tr>
- <td align=left width = 75>
- <b><%= Server.HTMLEncode(clsTes.ResourceLabel) %>:</b>
- </td>
- <td align=left width = 175>
- <% If clsTes.TimesheetViewAccess <> 3 and clsTes.TimesheetViewAccess <> 6 and clsTes.TimesheetViewAccess <> 7 Then 'US_OWN %>
- <a href="pickitem.asp?Type=Resource&<% Response.Write("ReturnURL=" & Server.URLEncode("tstable.asp")) %>">
- <% 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>
-
- </tr>
- </table>
- </td>
-
- <td align=right valign=top>
- <% tURL = "tstable.asp?FromDate=" %>
- <table border=0 cellspacing=1 cellpadding=1>
- <tr>
-
- <td align=center NOWRAP=NOWRAP>
- <A HREF="calendar.asp?ReturnURL=<%= Server.URLEncode("tstable.asp") %>&Name=FromDate&Date=<%= dFromDate %>">
- <b><% Response.Write(clsTes.FormatDate(dFromDate)) %></b>
- </A>
- </td>
- <td align=center>
- To
- </td>
- <td align=center NOWRAP=NOWRAP bgcolor="<%= SelectBackColor %>">
- <A HREF="calendar.asp?ReturnURL=<%= Server.URLEncode("tstable.asp") %>&Name=ToDate&Date=<%= dToDate %>">
- <b><% Response.Write(clsTes.FormatDate(dToDate)) %></b>
- </A>
- </td>
- <td width=10></td>
- <td align=center width=25>
- <a href=<% Response.Write(tURL & CStr(dFromDate - 28) & "&ToDate=" & CStr(dToDate - 28)) %>>
- <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(dFromDate - 7) & "&ToDate=" & CStr(dToDate - 7)) %>>
- <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(dFromDate + 7) & "&ToDate=" & CStr(dToDate + 7)) %>>
- <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(dFromDate + 28) & "&ToDate=" & CStr(dToDate + 28)) %>>
- <img border=0 align=center src="../images/fwd4w.gif" ALT="Forward 4 Weeks">
- </a>
- </td>
- </tr>
- </table>
- </td>
-
- </tr>
- <tr>
- <td COLSPAN=2><IMG border=0 src="..\images\space.gif"> </td>
- </tr>
- </table>
-
- <table width=100% border=0 cellspacing=1 cellpadding=1>
- <tr>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Date</b>
- </font>
- </td>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b><%= Server.HTMLEncode(clsTes.ResourceLabel) %></b>
- </font>
- </td>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b><%= Server.HTMLEncode(clsTes.ClientLabel) %></b>
- </font>
- </td>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b><%= Server.HTMLEncode(clsTes.ProjectLabel) %></b>
- </font>
- </td>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b><%= Server.HTMLEncode(clsTes.ActivityLabel) %></b>
- </font>
- </td>
-
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b><%= Server.HTMLEncode(clsTes.UnitTimeLabelP) %></b>
- </font>
- </td>
-
- <% If clsTes.UserCost = 1 or clsTes.UserCost = 3 Then %>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Cost</b>
- </font>
- </td>
- <% ElseIf clsTes.UserCost <> 0 Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Total Cost</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserCharge = 1 or clsTes.UserCharge = 3 Then %>
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Charge</b>
- </font>
- </td>
- <% ElseIf clsTes.UserCharge <> 0 Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Total Charge</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserChargeableTimesheet <> 0 Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Chargeable</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserOvertime Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Overtime</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserApprovedTimesheet Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Approved</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserInvoicedTimesheet Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Invoiced</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.UserTimesheetNotes Then %>
- <td align=Left valign=top bgcolor="<%= CellTitleColor %>">
- <font color = "<%= CellTitleTextColor %>">
- <b>Notes</b>
- </font>
- </td>
- <% End If %>
-
- <% If clsTes.TimesheetMaintainAccess <> 0 And clsTes.TimesheetApproveAccess <> 0 Then %>
- <td align=center valign=top bgcolor="<%= CellTitleColor %>">
- <FONT color = "<%= CellTitleTextColor %>">
- <b>Select</b>
- </FONT>
- </td>
- <% End If %>
-
- <td align=left valign=top bgcolor="<%= CellTitleColor %>">
-
- </td>
- </tr>
- <% lMaintainCount = 0
- lApproveCount = 0
-
- Dim lRowCount
- Dim lRow
- Dim nColumn
-
- lRowCount = clsTes.GenerateTimesheetTable
-
- If clsTes.ErrorNumber <> 0 Then
-
- Response.Write (Server.HTMLEncode(clsTes.ErrorDescription))
-
- Else
-
- If lRowCount > 0 Then
- For lRow = 1 To lRowCount %>
-
- <tr>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 4)) %>
- </FONT>
- </td>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 5)) %>
- </FONT>
- </td>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 6)) %>
- </FONT>
- </td>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 7)) %>
- </FONT>
- </td>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 8)) %>
- </FONT>
- </td>
- <td align=right valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 9)) %>
- </FONT>
- </td>
-
- <% nColumn = 10 %>
-
- <% If clsTes.UserCost = 1 or clsTes.UserCost = 3 Then %>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, 10)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% ElseIf clsTes.UserCost <> 0 Then 'UT_COST_NONE %>
- <td align=right valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= CStr(clsTes.GridValue(lRow, 10)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
-
-
-
- <% If clsTes.UserCharge = 1 or clsTes.UserCharge = 3 Then %>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, nColumn)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% ElseIf clsTes.UserCharge <> 0 Then 'UT_CHARGE_NONE %>
- <td align=right valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= CStr(clsTes.GridValue(lRow, nColumn)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
-
-
- <% If clsTes.UserChargeableTimesheet <> 0 Then 'UT_CHARGEABLE_TS_NONE %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, nColumn)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
-
- <% If clsTes.UserOvertime Then %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, nColumn)) %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
-
-
- <% If clsTes.UserApprovedTimesheet Then %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <% If Not IsNull(clsTes.GridValue(lRow,nColumn)) Then %>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, nColumn)) %>
- <% Else %>
-
- <% End If %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
-
-
- <% If clsTes.UserInvoicedTimesheet Then %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow, nColumn)) %>
- <% nColumn = nColumn + 1 %>
- </td>
- <% End If %>
-
- <% If clsTes.UserTimesheetNotes Then %>
- <td align=left valign=middle bgcolor="<%= CellColor %>">
- <FONT SIZE=-1>
- <% If Not IsNull(clsTes.GridValue(lRow, nColumn)) Then %>
- <%= Server.HTMLEncode(clsTes.GridValue(lRow,nColumn)) %>
- <% Else %>
-
- <% End If %>
- <% nColumn = nColumn + 1 %>
- </FONT>
- </td>
- <% End If %>
-
- <% If clsTes.TimesheetMaintainAccess <> 0 or clsTes.TimesheetApproveAccess <> 0 Then
- If clsTes.Maintain(lRow) or clsTes.Approve(lRow) Then %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <INPUT TYPE=CHECKBOX NAME="chkSelect" VALUE="<%= clsTes.GridValue(lRow,0) %>">
- <% If clsTes.Approve(lRow) Then
- lApproveCount = lApproveCount + 1
- End If %>
- </td>
- <% Else %>
- <td align=center valign=middle bgcolor="<%= CellColor %>">
-
- </td>
- <% End If %>
- <% End If %>
-
- <td align=center valign=middle bgcolor="<%= CellColor %>">
- <% If clsTes.Maintain(lRow) Then %>
- <a href="tstamend.asp?Key=<%= clsTes.GridValue(lRow,0) %>&ReturnURL=<%= Server.URLEncode("tstable.asp") %>"><IMG BORDER=0 align=center SRC="../images/amend.gif" ALT="Amend Timesheet"></a>
- <% lMaintainCount = lMaintainCount + 1 %>
- <% Else %>
- <a href="tsview.asp?Key=<%= clsTes.GridValue(lRow,0) %>&ReturnURL=<%= Server.URLEncode("tstable.asp") %>"><IMG BORDER=0 align=center SRC="../images/view.gif" ALT="View Timesheet"></a>
- <% End If %>
- </td>
- </tr>
-
- <% Next
- End If
-
- End If %>
-
-
- </table>
-
- <BR>
- <table border=0 align=right>
- <TR>
- <% If lApproveCount > 0 and clsTes.TimesheetApproveAccess <> 0 Then %>
- <TD align=center>
- <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Approve">
- </TD>
- <% End If %>
- <% If Len(clsTes.Resource) > 0 and clsTes.TimesheetMaintainAccess <> 0 and clsTes.MaintainResource(tResource, 1) Then %>
- <TD align=center>
- <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Add">
- </TD>
- <% End If %>
- <% If lMaintainCount > 0 and clsTes.TimesheetMaintainAccess <> 0 and clsTes.MaintainResource(tResource, 1) Then %>
- <TD align=center>
- <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Delete">
- </TD>
- <% End If %>
- </TR>
- </TABLE>
-
- <TABLE BORDER=0 ALIGN=LEFT CELLSPACING=2 CELLPADDING=5>
- <TR>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <B>Total <%= Server.HTMLEncode(clsTes.UnitTimeLabelP) %></B>
- </FONT>
- </TD>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <%= clsTes.GridTotalHours %>
- </FONT>
- </TD>
- <% If clsTes.UserCost=2 or clsTes.UserCost=4 or clsTes.UserCost=5 Then %>
- <TD WIDTH=10></TD>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <B>Total Cost</B>
- </FONT>
- </TD>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <%= clsTes.GridTotalCost %>
- </FONT>
- </TD>
- <% End If %>
-
- <% If clsTes.UserCharge=2 or clsTes.UserCharge=4 or clsTes.UserCharge=5 Then %>
- <TD WIDTH=10></TD>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <B>Total Charge</B>
- </FONT>
- </TD>
- <TD ALIGN=LEFT>
- <FONT SIZE=-1>
- <%= clsTes.GridTotalCharge %>
- </FONT>
- </TD>
- <% End If %>
- </TR>
- </TABLE>
- </FORM>
-
- <% Else %>
- Sorry, you do not have access to view timesheets.
- <% End If %>
-
- <% Set clsTes = Nothing %>
- </BODY>
- </HTML>
-