%@ 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 %>
|
Welcome to the Login Managment Center
<% 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. By default, FP2000 places your database in the \fpdb\ folder. 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) Click file > import and locate your local copy of that database
<% End if
If LoginVersion ="" OR db_connVersion = "" OR A_GeneralVersion = "" then
%> !
ERROR - Include files not set up
You must be logged in to access this area <%End If%>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||