| Line 35... |
Line 35... |
| 35 |
Dim glsTopic, glsMode , gHideLastEditor, gLoginFlag, gRemoveHtml,gBlackListedIps
|
35 |
Dim glsTopic, glsMode , gHideLastEditor, gLoginFlag, gRemoveHtml,gBlackListedIps
|
| 36 |
Dim gRE, gHighlightFlag, gHideWikiSource, gHideWikiFooter, gHideLogin, gHtmlHeadStr
|
36 |
Dim gRE, gHighlightFlag, gHideWikiSource, gHideWikiFooter, gHideLogin, gHtmlHeadStr
|
| 37 |
Dim gDisableSave,gTimeZoneOffset, gRssStyle, gRedirectURL
|
37 |
Dim gDisableSave,gTimeZoneOffset, gRssStyle, gRedirectURL
|
| 38 |
Dim gBannerTemplate, gWikiBodyPrefix, gHideTopSearch, gDisableScripting
|
38 |
Dim gBannerTemplate, gWikiBodyPrefix, gHideTopSearch, gDisableScripting
|
| 39 |
Dim gMdbExtension , gSearchLabel, gBlackListedIpsRE ,gDeletePassword , gPersistPassword
|
39 |
Dim gMdbExtension , gSearchLabel, gBlackListedIpsRE ,gDeletePassword , gPersistPassword
|
| 40 |
Dim gPasswordLabel, gFooterHtml
|
40 |
Dim gPasswordLabel, gFooterHtml, gEnableEdit
|
| 41 |
|
41 |
|
| 42 |
'+-----------------------------------------------------------------------------+
|
42 |
'+-----------------------------------------------------------------------------+
|
| 43 |
'| AN IMPORTANT NOTE: !!!!! |
|
43 |
'| AN IMPORTANT NOTE: !!!!! |
|
| 44 |
'| Enter your password below for creating new DB and for Delete. |
|
44 |
'| Enter your password below for creating new DB and for Delete. |
|
| 45 |
'| Enter your URL inside quotes below e.g. http://www28.brinkster.com/site |
|
45 |
'| Enter your URL inside quotes below e.g. http://www28.brinkster.com/site |
|
| Line 74... |
Line 74... |
| 74 |
gDisableScripting = true
|
74 |
gDisableScripting = true
|
| 75 |
gSearchLabel = " Search On:"
|
75 |
gSearchLabel = " Search On:"
|
| 76 |
gPersistPassword = true ' Remember password by default
|
76 |
gPersistPassword = true ' Remember password by default
|
| 77 |
gPasswordLabel = " To edit, enter the password: " ' The prompt label to use when entering a password. 4/2010
|
77 |
gPasswordLabel = " To edit, enter the password: " ' The prompt label to use when entering a password. 4/2010
|
| 78 |
gFooterHtml = "</body></html>" ' Now you can customize the footer with your chosen html. Even remove ads
|
78 |
gFooterHtml = "</body></html>" ' Now you can customize the footer with your chosen html. Even remove ads
|
| - |
|
79 |
gEnableEdit = false
|
| - |
|
80 |
|
| 79 |
'+-----------------------------------------------------------------------------+
|
81 |
'+-----------------------------------------------------------------------------+
|
| 80 |
'| DO YOU WANT TO SEPARATE SOME CONFIG SETTINGS IN ANOTHER FILE? |
|
82 |
'| DO YOU WANT TO SEPARATE SOME CONFIG SETTINGS IN ANOTHER FILE? |
|
| 81 |
'+-----------------------------------------------------------------------------+
|
83 |
'+-----------------------------------------------------------------------------+
|
| 82 |
'| IF yes,just uncomment line after this box (by removing single quote as |
|
84 |
'| IF yes,just uncomment line after this box (by removing single quote as |
|
| 83 |
'| the first character. If you do this, BE SURE TO CREATE config.asp |
|
85 |
'| the first character. If you do this, BE SURE TO CREATE config.asp |
|
| Line 122... |
Line 124... |
| 122 |
Else
|
124 |
Else
|
| 123 |
gDataSourceName = "DefaultDb"
|
125 |
gDataSourceName = "DefaultDb"
|
| 124 |
End If
|
126 |
End If
|
| 125 |
|
127 |
|
| 126 |
' Can only Edit on the Test / Development System not on the Live System
|
128 |
' Can only Edit on the Test / Development System not on the Live System
|
| 127 |
If (Not IsEmpty(Application("TestSystem"))) Then
|
129 |
If (IsEmpty(Application("LiveSystem"))) AND (Session("login") <> 0) Then
|
| 128 |
gHideLogin = false
|
130 |
gHideLogin = false
|
| 129 |
gHideWikiFooter = false
|
131 |
gHideWikiFooter = false
|
| - |
|
132 |
gEnableEdit = true
|
| - |
|
133 |
Session("login") = 1
|
| 130 |
Else
|
134 |
Else
|
| 131 |
gHideLogin = true
|
135 |
gHideLogin = true
|
| 132 |
gHideWikiFooter = true
|
136 |
gHideWikiFooter = true
|
| 133 |
End If
|
137 |
End If
|
| 134 |
|
138 |
|
| Line 1423... |
Line 1427... |
| 1423 |
end function
|
1427 |
end function
|
| 1424 |
|
1428 |
|
| 1425 |
sub handleLogout
|
1429 |
sub handleLogout
|
| 1426 |
Dim url
|
1430 |
Dim url
|
| 1427 |
url = gScriptURL & "&o=" & glsTopic
|
1431 |
url = gScriptURL & "&o=" & glsTopic
|
| - |
|
1432 |
gEnableEdit = false
|
| 1428 |
Session.Abandon
|
1433 |
Session.Abandon
|
| 1429 |
Response.Redirect(url)
|
1434 |
Response.Redirect(url)
|
| 1430 |
end sub
|
1435 |
end sub
|
| 1431 |
|
1436 |
|
| - |
|
1437 |
sub handleLogin
|
| - |
|
1438 |
Dim url
|
| - |
|
1439 |
url = gScriptURL & "&o=" & glsTopic
|
| - |
|
1440 |
gEnableEdit = true
|
| - |
|
1441 |
Session("login") = 1
|
| - |
|
1442 |
Response.Redirect(url)
|
| - |
|
1443 |
end sub
|
| - |
|
1444 |
|
| 1432 |
sub handleEdit
|
1445 |
sub handleEdit
|
| 1433 |
If gHideLogin Then
|
1446 |
If gHideLogin Then
|
| 1434 |
Response.Write("<br/><br/><br/><br/><br/><center><h2>Editing is not allowed</h2></center>")
|
1447 |
Response.Write("<br/><br/><br/><br/><br/><center><h2>Editing is not allowed</h2></center>")
|
| 1435 |
Response.End
|
1448 |
Response.End
|
| 1436 |
exit sub
|
1449 |
exit sub
|
| Line 2047... |
Line 2060... |
| 2047 |
|
2060 |
|
| 2048 |
If gBannerTemplate = "" Then
|
2061 |
If gBannerTemplate = "" Then
|
| 2049 |
bannerPart = ""
|
2062 |
bannerPart = ""
|
| 2050 |
bannerPart = bannerPart & "<a href='" & gScriptURL & "'>Wiki Home</a>"
|
2063 |
bannerPart = bannerPart & "<a href='" & gScriptURL & "'>Wiki Home</a>"
|
| 2051 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=list&o=ByTitle' title='this may take a loooong time'>List all pages</a>"
|
2064 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=list&o=ByTitle' title='this may take a loooong time'>List all pages</a>"
|
| 2052 |
if ( Not gHideLogin ) Then
|
2065 |
if ( gEnableEdit OR 1 ) Then
|
| 2053 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=list&o=recent'>Recent pages</a>"
|
2066 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=list&o=recent'>Recent pages</a>"
|
| 2054 |
bannerPart = bannerPart & " | <span style='color: #FF0000;font-weight: bold;'>Development Web Server</span>"
|
2067 |
bannerPart = bannerPart & " | <span style='color: #FF0000;font-weight: bold;'>Development Web Server</span>"
|
| 2055 |
if search <> "" then
|
2068 |
if (search <> "") AND (gEnableEdit) then
|
| 2056 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=edit&o=" & search & "'>Edit page</a>"
|
2069 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=edit&o=" & search & "'>Edit page</a>"
|
| 2057 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=del&o=" & search & "'>Del page</a>"
|
2070 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=del&o=" & search & "'>Del page</a>"
|
| 2058 |
end if
|
2071 |
end if
|
| 2059 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ReleaseNotes&o=TextFormattingRules'>Formatting Rules</a>"
|
2072 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ReleaseNotes&o=TextFormattingRules'>Formatting Rules</a>"
|
| 2060 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ReleaseNotes'>Release Notes</a>"
|
2073 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ReleaseNotes'>Release Notes</a>"
|
| 2061 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ImplementationNotes'>RM Dev Notes</a>"
|
2074 |
bannerPart = bannerPart & " | <a href='" & gScript & "?db=ImplementationNotes'>RM Dev Notes</a>"
|
| - |
|
2075 |
if gEnableEdit Then
|
| 2062 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=logout'>Log out</a>"
|
2076 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=logout'>Log out</a>"
|
| - |
|
2077 |
Else
|
| - |
|
2078 |
bannerPart = bannerPart & " | <a href='" & gScriptURL & "&a=login'>Log in</a>"
|
| - |
|
2079 |
End If
|
| 2063 |
End If
|
2080 |
End If
|
| 2064 |
bannerPart = bannerPart & "<hr>"
|
2081 |
bannerPart = bannerPart & "<hr>"
|
| 2065 |
|
2082 |
|
| 2066 |
bannerPart = bannerPart & " <table class='cssBannerTable' id='idBannerTable' cellSpacing='0' cellPadding='0' border='0'>"
|
2083 |
bannerPart = bannerPart & " <table class='cssBannerTable' id='idBannerTable' cellSpacing='0' cellPadding='0' border='0'>"
|
| 2067 |
bannerPart = bannerPart & " </tr>"
|
2084 |
bannerPart = bannerPart & " </tr>"
|
| Line 2269... |
Line 2286... |
| 2269 |
case "search" handleSearch
|
2286 |
case "search" handleSearch
|
| 2270 |
case "create" handleCreate
|
2287 |
case "create" handleCreate
|
| 2271 |
case "save" handleSave
|
2288 |
case "save" handleSave
|
| 2272 |
case "browse" handleBrowse
|
2289 |
case "browse" handleBrowse
|
| 2273 |
case "logout" handleLogout
|
2290 |
case "logout" handleLogout
|
| - |
|
2291 |
case "login" handleLogin
|
| 2274 |
case else
|
2292 |
case else
|
| 2275 |
end select
|
2293 |
end select
|
| 2276 |
|
2294 |
|
| 2277 |
EmitDebug 56, 2, "<br/>done...<br/>" & vbcrlf
|
2295 |
EmitDebug 56, 2, "<br/>done...<br/>" & vbcrlf
|
| 2278 |
gDataConn.Close()
|
2296 |
gDataConn.Close()
|