Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
IF FILE("baprot.dll")
DECLARE integer DllUnregisterServer IN baprot.dll
?DllUnregisterServer()
CLEAR DLLS
ENDIF
SET TEXTMERGE TO baprot.prg
SET TEXTMERGE ON NOSHOW
\DEFINE CLASS baprot AS Session OLEPUBLIC
\PROCEDURE PassProtect
\if FILE("pass.txt")
\ lnPassword=FILETOSTR("pass.txt")
\else
\ RETURN .f.
\endif
\if SYS(2007,SYS(0)+"YourSecretString")==ALLTRIM(TRANSFORM(lnPassword))
\ RETURN .t.
\else
\ RETURN .f.
\endif
\ENDPROC
\ENDDEFINE
SET TEXTMERGE TO
BUILD PROJECT baprot FROM baprot
BUILD DLL baprot FROM baprot
loPass=NEWOBJECT("baprot.baprot")
if FILE("pass.txt")=.f. or lopass.PassProtect=.f.
lnPass=INPUTBOX("Enter Password")
STRTOFILE(lnpass,"pass.txt")
ENDIF
IF lopass.PassProtect
MESSAGEBOX("success!")
ELSE
MESSAGEBOX("failure!")
ENDIF