<%@ Language="VBSCRIPT"%> <% '------------------- ' Spooky Login 2000 ' www.Outfront.net CONST admin_mainVersion = 2.62 '------------------- ON ERROR RESUME NEXT %> <% DIM errReadFail,errWriteFail,wImg,rImg,txtOpenDatabase,txtUpdateDatabase DIM DatabasePath,PageDisplay,objConn,dActualADOVersion,fieldvalue,bIsSQL,txtUpgrade CONST dRequiredADOVersion = 2.1 CONST dRequiredVBScriptVersion = 5.0 DatabasePath = left(DatabaseFolder, inStrRev(DatabaseFolder,"\")) PageDisplay = Request.Querystring("PageDisplay") sPageName = Request.ServerVariables("URL") errSystemFail = 0 Call CheckForReset() Call CheckForLogout() Call objCheckDatabase() If Application(appName&"Setup_ID") <> "" AND errSystemFail = 0 then Call CheckForAdmin() End if '==================== Sub objCheckDatabase '==================== ON ERROR RESUME NEXT Err = 0 Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open sDSN dActualADOVersion = objConn.Version Call objTestRead() If strDbase = "SQL" OR inStr(sDSN,"SQL") then If NOT errReadFail then wImg = "yes" bIsSQL= -1 Else wImg = "no" bIsSQL= -1 End if Else Call objTestWrite() End if objConn.Close Set objConn = Nothing Err = 0 End sub '=============== Sub objTestRead '=============== ON ERROR RESUME NEXT Err = 0 Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open sTableName & "Config", objConn, 1, 2 fieldvalue = objRS("Setup_ID") If err.number <> 0 then rImg = "no" errReadFail = True errSystemFail = errSystemFail + 1 Else rImg = "yes" End if Call CloseDatabase() Err = 0 End Sub '================ Sub objTestWrite '================ ON ERROR RESUME NEXT Err = 0 Set objRs = Server.CreateObject("ADODB.RecordSet") objRs.Open sTableName &"Config", objConn, 2, 2 objRs.fields.item("test_field").Value = "Spooky" objRs.Update If err.number <> 0 then wImg = "no" errWriteFail = True errSystemFail = errSystemFail + 1 Else If objConn.errors.count <> 0 then wImg = "no" errWriteFail = True errSystemFail = errSystemFail + 1 Else wImg = "yes" End if End if Call CloseDatabase() Err = 0 End Sub '================ Sub CheckForReset() '================ If lCase(Request.Querystring("Reset")) = "true" then Application.Lock Application(appName&"Setup_ID") = "" Application(appName&"Reset") = "True" Application.UnLock End if End Sub %> Administration - version <%=admin_mainVersion%>

 

Welcome to the Login Managment Center
 
System View
 Diagnostics
 Readme
 Show current cookie / session values

Public pages
Register
Login

<% If errReadFail then %>

 !  ERROR - Database cannot be found

<%If bIsSQL then %> Please check the SQL connection <%else%>

The probable cause, is that the database has been copied to the wrong directory or does not yet exist.
You will need to edit the db_conn.asp file  in the includes directory to point to the correct file path and ensure the database exists.

By default, FP2000 places your database in the \fpdb\ folder.
That's where the path points to by default in db_conn.

Your database path from the connection file is currently : <%=DatabasePath%>

<%End if End if If errWriteFail AND NOT errReadFail then %> !  ERROR - Database is read only

The cause is that the file does not have the correct permissions to be able to write to the database.

One method that I have found reliable, using FP2000, open your web live (file > open web > your address)
Now, if you have an \fpdb\ directory already, click on it and delete the spooky_login2000.mdb file if it exists.

Click file > import and locate your local copy of that database
Import it and agree to the connection and placement options.
9/10 times this will fix the permissions problem.
The other 1/10 you will need to contact your host to enable read / write for that database directory.

<% End if If LoginVersion ="" OR db_connVersion = "" OR A_GeneralVersion = "" then %> !   ERROR - Include files not set up
Please check the include files are saved in the correct directory


<% End if%> <%If PageDisplay = "Diagnostics" AND ((Application(appName&"Setup_ID") = "") OR (Session(appName&"Admin")="True") OR (errSystemFail > 0)) then%>
Diagnostics
Database

Read Database
<%If errReadFail AND NOT bIsSQL then%> Database cannot be read
Verify that the database is in the <%=DatabasePath%> folder
The path must be corrected in db_conn.asp, or the database moved.
<%end if%>
Write Database <%If errWriteFail then%> Database cannot be written
Verify that the <%=DatabasePath%> folder has both read and write access
<%Elseif bIsSQL then%> SQL Server <%If uCase(strDbase) <> "SQL" then%>
Please open db_conn.asp and set the constant 'strDbase' value to 'SQL'<%End if%> <%End if%>
Connection string  
<%If NOT bIsSQL then response.write sDSN%>
Database Folder <%=DatabasePath%> 
Server Settings
Server Software <%= Request.ServerVariables("SERVER_SOFTWARE") %> 
Server Name <%= Request.ServerVariables("SERVER_NAME") %> 
Server Protocol <%= Request.ServerVariables("SERVER_PROTOCOL") %> 
VBScript Engine <%= ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion %> 
Physical Path <%= Request.ServerVariables("APPL_PHYSICAL_PATH") %> 
ADO Version <%=dActualADOVersion%> 
File System Object <%=IsObjInstalled("Scripting.FilesystemObject")%> 
E-Mail components
Detected : <% Dim i For i=0 to UBound(theComponent) If IsObjInstalled(theComponent(i)) Then Write ""& theComponentName(i) &"
" iCompInstalled = iCompInstalled + 1 End If Next If iCompInstalled < 1 then Write " None" %>
 
Login Settings
Application Variables "" then Response.write "yes" else Response.write "no"%>.gif" width="19" height="18">
Application Name <%=appName%>
Login Version <%=LoginVersion%> 
<%End If%> <%If PageDisplay = "Readme" AND ((Application(appName&"Setup_ID") = "") OR (Session(appName&"Admin")="True") OR (errSystemFail > 0)) then%>
Read me

 

The read me in Word format, containing the latest version information, may be downloaded from http://www.frontpagecommerce.com/spooky/

 

<%End If%> <%If PageDisplay = "cookie" then%>
<%End If%> <%If (PageDisplay = "Diagnostics" OR PageDisplay = "Readme") AND (Application(appName&"Setup_ID") <> "" AND NOT Session(appName&"Admin")) then %>

You must be logged in to access this area

<%End If%>