Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.0 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% 'Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <%
  5. ' localDateToUTC
  6. '
  7. ' Because we want to display the correct client-side time and because
  8. ' the date string is not necessarily in a form that we can process (it's
  9. ' locale specific now) and it is currently in GMT, we need
  10. ' to do a manual format.
  11. '
  12. ' The goal is to get something that is parsable by javascript Date.parse()
  13. '
  14. Dim MONTHS
  15. Dim DAYS
  16. MONTHS = Array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" )
  17. DAYS = Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" )
  18. function localDateToUTC( theDate )
  19. On Error Resume Next
  20. Dim strTheDate
  21. Dim nTimePart
  22. strTheDate = DAYS(Weekday( theDate, vbSunday ) - 1 ) & ", " & CStr( Day(theDate) ) _
  23. & " " & MONTHS(Month(theDate) - 1) & " " & Year(theDate) & " "
  24. nTimePart = Hour(theDate)
  25. if nTimePart < 10 then
  26. strTheDate = strTheDate & "0"
  27. end if
  28. strTheDate = strTheDate & nTimePart & ":"
  29. nTimePart = Minute(theDate)
  30. if nTimePart < 10 then
  31. strTheDate = strTheDate & "0"
  32. end if
  33. strTheDate = strTheDate & nTimePart & ":"
  34. nTimePart = Second(theDate)
  35. if nTimePart < 10 then
  36. strTheDate = strTheDate & "0"
  37. end if
  38. strTheDate = strTheDate & nTimePart & " GMT"
  39. localDateToUTC = strTheDate
  40. end function
  41. %>
  42. <HTML>
  43. <HEAD>
  44. <SCRIPT LANGUAGE="JavaScript">
  45. <%
  46. On Error Resume Next
  47. Dim currentobj, BULocsObj, i, BackupItem
  48. Set currentobj = GetObject("IIS://localhost")
  49. dim vLocation, vIndex, vVersionOut, vLocationOut, vDateOut
  50. i = 0
  51. do while err.Number = 0
  52. currentobj.EnumBackups "", i, vVersionOut, vLocationOut, vDateOut
  53. if err.Number = 0 then
  54. %>top.main.head.cachedList[<%= i %>] = new top.main.head.listObj(<%= i %>, "<%= localDateToUTC(vDateOut) %>","<%= vLocationOut %>","<%= vVersionOut %>");<%
  55. Response.write chr(13)
  56. i = i + 1
  57. else
  58. Response.write "//" & err & "-" & err.description & "-" & hex(err)
  59. end if
  60. loop
  61. %>
  62. top.main.head.listFunc.loadList();
  63. </SCRIPT>
  64. </HEAD>
  65. <BODY>
  66. </BODY>
  67. </HTML>