|
|
@@ -56,6 +56,45 @@ Public Function GetAppSetting(key) |
|
|
GetAppSetting = "nothing" |
|
|
GetAppSetting = "nothing" |
|
|
End Function |
|
|
End Function |
|
|
|
|
|
|
|
|
|
|
|
Public Function GetEnvironmentValue(name) |
|
|
|
|
|
Dim shell, env, value |
|
|
|
|
|
value = "" |
|
|
|
|
|
|
|
|
|
|
|
On Error Resume Next |
|
|
|
|
|
Set shell = Server.CreateObject("WScript.Shell") |
|
|
|
|
|
Set env = shell.Environment("PROCESS") |
|
|
|
|
|
If Err.Number = 0 Then |
|
|
|
|
|
value = env(name) |
|
|
|
|
|
If Err.Number <> 0 Then |
|
|
|
|
|
Err.Clear |
|
|
|
|
|
value = "" |
|
|
|
|
|
End If |
|
|
|
|
|
Else |
|
|
|
|
|
Err.Clear |
|
|
|
|
|
End If |
|
|
|
|
|
On Error GoTo 0 |
|
|
|
|
|
|
|
|
|
|
|
GetEnvironmentValue = Trim(CStr(value)) |
|
|
|
|
|
End Function |
|
|
|
|
|
|
|
|
|
|
|
Public Function GetSecureSetting(key, envName) |
|
|
|
|
|
Dim value |
|
|
|
|
|
|
|
|
|
|
|
value = Trim(CStr(GetAppSetting(key))) |
|
|
|
|
|
If Len(value) > 0 And LCase(value) <> "nothing" Then |
|
|
|
|
|
GetSecureSetting = value |
|
|
|
|
|
Exit Function |
|
|
|
|
|
End If |
|
|
|
|
|
|
|
|
|
|
|
value = Trim(CStr(GetEnvironmentValue(envName))) |
|
|
|
|
|
If Len(value) > 0 Then |
|
|
|
|
|
GetSecureSetting = value |
|
|
|
|
|
Exit Function |
|
|
|
|
|
End If |
|
|
|
|
|
|
|
|
|
|
|
GetSecureSetting = "" |
|
|
|
|
|
End Function |
|
|
|
|
|
|
|
|
Public Sub ShowServerVariables |
|
|
Public Sub ShowServerVariables |
|
|
Dim varName, htmlTable |
|
|
Dim varName, htmlTable |
|
|
htmlTable = "<table border='1' cellspacing='0' cellpadding='5'>" |
|
|
htmlTable = "<table border='1' cellspacing='0' cellpadding='5'>" |
|
|
|