I get the following output from debugview:
[13836] [st] Failed to load zlibwapi.dll
[13836] [netTrace][thread=3] NetTalk WebServer - unable to compress data - zlibwapi.dll Not found
[13836] [netTrace][thread=3] ValidateForm on ChangeRecord
[13836] [netTrace][thread=3] JMR invalid password:Login Failed. Invalid User/Password Pair - Try Again.
[13836] [st] Failed to load zlibwapi.dll
[13836] [netTrace][thread=3] NetTalk WebServer - unable to compress data - zlibwapi.dll Not found
I inserted the above 'JMR' p_web._trace line using the following code in the validate:update routine after do validate:record
you will notice the JMR trace message displays but the loc:invalid and loc:alert settings dont show on the browser ?
:
! The HASH test prevents the same form-post from being used "twice".
! This improves security on public computers.
! message(p_web.GetValue('loc:hash')& '-' & p_web.GetSessionValue,('loc:hash'),'before hash')
if p_web.GetValue('loc:hash') = p_web.GetSessionValue('loc:hash') or TRUE
! login checking goes here. In this example a simple 'Demo / Demo" login will work. Your app will
! probably need a stronger test than that.
use3:userlogin = loc:Login
! message('hello')
if Access:Users.TryFetch(use3:sk_userlogin)
loc:Invalid = 'Loc:Login'
p_web.SetValue('retry',p_web.site.LoginPage)
loc:Alert = 'Login Failed. Try Again.'
p_web.DeleteCookie('loc__login')
p_web.DeleteCookie('loc__password')
else
if use3:password not = Loc:Password
loc:Invalid = 'Loc:Password'
p_web.SetValue('retry',p_web.site.LoginPage)
loc:Alert = 'Login Failed. Invalid User/Password Pair - Try Again.'
p_web.DeleteCookie('loc__login')
p_web.DeleteCookie('loc__password')
p_web._trace('JMR invalid password:' loc:alert)
else
if use3:activeInd not = 1
loc:Invalid = 'Loc:Password'
p_web.SetValue('retry',p_web.site.LoginPage)
loc:Alert = 'Login Failed. User Expired - Big Brother is watching you.... - Try Again.?'
p_web.DeleteCookie('loc__login')
p_web.DeleteCookie('loc__password')
else
p_web.ValidateLogin() ! this sets the session to "logged in"
p_web.SetSessionValue('loc:hash',0) ! clear the hash, so this login can't get "replayed".
p_web.ssv('XibsUser',use3:usercode)
! set the session level, and any other session variables based on the logged in user.
p_web.SetSessionLevel(use3:useraccess)
p_web.SSV('XibsUserName',use3:username)
! this next bit shows how the login & password can be stored in the browser
! so that it is "remembered" for next time
if loc:remember = 1
p_web.SetCookie('loc__login',loc:login,today()+30) ! note the expiry date. It's good
p_web.SetCookie('loc__password',loc:password,today()+30) ! form to make sure your cookies expire sometime.
else
! don't remember, so clear cookies in browser.
p_web.DeleteCookie('loc__login')
p_web.DeleteCookie('loc__password')
End
end
end
end
Else
p_web.DeleteCookie('loc__login')
p_web.DeleteCookie('loc__password')
End
! delete the session values, so if the user comes back to the form, the items are not set.
p_web.deletesessionvalue('loc:login')
p_web.deletesessionvalue('loc:password')
p_web.deletesessionvalue('loc:remember')
p_web.deletevalue('loc:login')
p_web.deletevalue('loc:password')
p_web.deletevalue('loc:remember')