Leaked source code of windows server 2003
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.

57 lines
1.1 KiB

  1. <%
  2. Function Posted()
  3. Posted = LCase(Request.ServerVariables("REQUEST_METHOD")) = "post"
  4. End Function
  5. Function User()
  6. User = Request.ServerVariables("LOGON_USER")
  7. End Function
  8. Function CreateDisconnectedRs(cnn, source)
  9. Dim rs
  10. Set rs = Server.CreateObject("ADODB.Recordset")
  11. rs.CursorLocation = adUseClient
  12. rs.Open source, cnn, adOpenStatic, adLockReadOnly
  13. Set rs.ActiveConnection = Nothing
  14. Set CreateDisconnectedRs = rs
  15. End Function
  16. 'Pads a string with characters
  17. Function Pad(sString, sChar, iLen, bPadLeft)
  18. While Len(sString) < iLen
  19. If (bPadLeft) Then
  20. sString = sChar & sString
  21. Else
  22. sString = sString & sChar
  23. End If
  24. Wend
  25. Pad = sString
  26. End Function
  27. Function ReplaceNull(ByVal var)
  28. If IsNull(var) Then
  29. ReplaceNull = ""
  30. Else
  31. ReplaceNull = var
  32. End If
  33. End Function
  34. Function GetBLOB(oField)
  35. Dim sChunk, sText: sText = ""
  36. Const iChunkSize = 1024
  37. sChunk = oField.GetChunk(iChunkSize)
  38. While Not IsNull(sChunk)
  39. sText = sText & sChunk
  40. sChunk = oField.GetChunk(iChunkSize)
  41. Wend
  42. GetBLOB = sText
  43. End Function
  44. %>