home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ LANGUAGE="VBSCRIPT" %> <% Set clsTes = Session("TES") If clsTes.LoggedIn = False Then Set clsTes = Nothing Response.Redirect("../loggedout.htm") End If tType = Request("Type") If tType= "Activity" Then tTypeLabel = clsTes.ActivityLabel tType = "Activity" Else tTypeLabel = clsTes.ProjectLabel tType = "Project" End If bSave = False tErrorList = "<B>Errors:</B>" nErrors = 0 If Request.Form("btnSubmit") = "Save Restrictions" Then 'Save Mode bSave = clsTes.SaveOwnRestrictions(CStr(tType), CStr(Request.Form("chkSelect")), CStr(Request.Form("chkAll"))) If clsTes.ErrorNumber <> 0 Then nErrors = 1 tErrorList = tErrorList & "<BR>" & Server.HTMLEncode(clsTes.ErrorText) End If End If If Request.Form("btnSubmit") = " All " then bAll = True bClear = False ElseIf Request.Form("btnSubmit") = "Clear" then bAll = False bClear = True Else bAll = False bClear = False 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 Expert Web - Own <%= Server.HTMLEncode(clsTes.ResourceLabel) %> Restrictions</TITLE> </HEAD> <BODY BGCOLOR="<%= BackColor %>" LINK="<%= LinkColor %>" VLINK="<%= VLinkColor %>" ALINK="<%= ALinkColor %>" TEXT="<%= TextColor %>"> <BASEFONT SIZE=2 COLOR="<%= TextColor %>"> <center> <font size=+2><b> Own <%= Server.HTMLEncode(tTypeLabel) %> Restrictions<% If bSave then Response.Write (" - Saved") %></b></font> <P> <% If nErrors Then %> <%= tErrorList %> <BR><BR> <% End If %> <FORM NAME="frmRestrictions" ACTION="restrictions.asp" METHOD="POST"> <INPUT TYPE=HIDDEN NAME="Type" VALUE="<%= tType %>"> <table border=0 cellspacing=1 cellpadding=1> <TR> <TD ALIGN=LEFT> <INPUT TYPE=CHECKBOX NAME="chkAll" VALUE="NoRestrictions" <% If clsTes.GlobalResource(CStr(tType)) and not bClear and not bAll Then Response.Write("CHECKED") %>> <B>No <%= Server.HTMLEncode(tTypeLabel) %> Restrictions</B> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Save Restrictions"> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE=" All "> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Clear"> </TD> </TR> <tr> <td align=left valign=top bgcolor="<%= CellTitleColor %>"> <font color="<%= CellTitleTextColor %>"> <b><%= Server.HTMLEncode(tTypeLabel) %> Code</b> </font> </td> <td align=left valign=top bgcolor="<%= CellTitleColor %>"> <font color="<%= CellTitleTextColor %>"> <b>Description</b> </font> </td> <td align=left valign=top bgcolor="<%= CellTitleColor %>"> <font color="<%= CellTitleTextColor %>"> <b>Global</b> </font> </td> <td align=center valign=top bgcolor="<%= CellTitleColor %>"> <font color="<%= CellTitleTextColor %>"> <b>Select</b> </font> </td> </tr> <% Dim lRowCount Dim lRow lRowCount = clsTes.GenerateRestrictions(CStr(tType)) If clsTes.ErrorNumber <> 0 Then Response.Write (clsTes.ErrorText) Else If lRowCount > 0 Then For lRow = 1 to lRowCount %> <tr> <td align=left valign=top bgcolor="<%= CellColor %>"> <%= Server.HTMLEncode(clsTes.GridValue(lRow, 0)) %> </td> <td align=left valign=top bgcolor="<%= CellColor %>"> <%If Not IsNull(clsTes.GridValue(lRow, 1)) = True Then %> <%= Server.HTMLEncode(clsTes.GridValue(lRow, 1)) %> <%End If%> </td> <td align=left valign=top bgcolor="<%= CellColor %>"> <% If Not IsNull(clsTes.GridValue(lRow, 2)) Then %> <%= Server.HTMLEncode(clsTes.GridValue (lRow, 2)) %> <% End If %> </td> <td align=center valign=middle bgcolor="<%= CellColor %>"> <INPUT TYPE=CHECKBOX NAME="chkSelect" VALUE="'<%= clsTes.GridValue (lRow,0) %>'" <% If (clsTes.GridValue(lRow,3) and Not bClear) or bAll Then Response.Write ("CHECKED") %>> </td> </tr> <% Next End If End If %> <TR> <TD ALIGN=LEFT> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Save Restrictions"> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE=" All "> </TD> <TD ALIGN=CENTER> <INPUT TYPE=SUBMIT NAME="btnSubmit" VALUE="Clear"> </TD> </TR> </table> </form> </center> <% Set clsTes = Nothing %> </BODY> </HTML>