home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / full / atlantic / Software / Teweb / data1.cab / Pages / scripts / tsdelete.asp < prev    next >
Encoding:
Text File  |  2000-02-14  |  1.6 KB  |  59 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <%    Set clsTes = Session("TES")
  3.     If clsTes.LoggedIn = False Then
  4.         Set clsTes = Nothing
  5.         Response.Redirect("../loggedout.htm")
  6.     End If
  7.     On Error Resume Next
  8.     tReturn = Request("ReturnURL")
  9.     lKey = Request("Key")
  10.  
  11.     nErrors = 0
  12.     tErrortext = ""
  13.  
  14.     If Request.Form("btnSubmit") = "Cancel" Then
  15.         Response.Redirect(tReturn)
  16.     ElseIf Request.Form("btnSubmit") = "OK" Then
  17.         clsTes.DeleteTimesheet CLng(lKey)
  18.         If clsTes.ErrorNumber <> 0 Then
  19.             nErrors = 1
  20.             tErrorText = tErrortext & "<BR>" & Server.HTMLEncode(clsTes.ErrorText)
  21.         Else
  22.             Response.Redirect(tReturn)
  23.         End If
  24.     End If
  25. %>
  26. <!-- #INCLUDE FILE = "settings/colours.txt" -->
  27. <HTML>
  28. <HEAD>
  29. <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
  30. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  31. <TITLE>Delete Timesheet</TITLE>
  32. </HEAD>
  33. <BODY BGCOLOR="<%= BackColor %>" LINK="<%= LinkColor %>" VLINK="<%= VLinkColor %>" ALINK="<%= ALinkColor %>" TEXT="<%= TextColor %>">
  34. <BASEFONT SIZE=2 COLOR="<%= TextColor %>">
  35.  
  36. <% If clsTes.TimesheetMaintainAccess <> 2 Then    'US_NONE %>
  37.  
  38. <CENTER>
  39. <FORM ACTION="tsdelete.asp" METHOD="POST">
  40. <P><BR>
  41. <%    If nErrors > 0 Then %>
  42.     <B>Errors</B>
  43.     <P>
  44.     <%= tErrorText %>
  45.     <P>
  46. <%    End If %>
  47.  
  48. Are you sure you want to delete this timesheet?
  49. <p>
  50. <INPUT TYPE=HIDDEN NAME="ReturnURL" VALUE="<%= tReturn %>">
  51. <INPUT TYPE=HIDDEN NAME="Key" VALUE="<%= lKey %>">
  52. <INPUT TYPE=SUBMIT VALUE="OK" NAME="btnSubmit">
  53. <INPUT TYPE=SUBMIT VALUE="Cancel" NAME="btnSubmit">
  54. </FORM>
  55. </CENTER>
  56. <% End If %>
  57. </BODY>
  58. </HTML>
  59.