Advertisement
Guest User

Untitled

a guest
Jun 13th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. local username = admin
  2. local pass = admin
  3. local logged, err, logoutURL
  4.  
  5. if cgilua.authentication then
  6. logged, err = cgilua.authentication.check(admin, admin)
  7. username = cgilua.authentication.username() or ""
  8. logoutURL = cgilua.authentication.logoutURL("cows.html")
  9. else
  10. logged = false
  11. err = "Your are not ADMIN"
  12. username = ""
  13. end
  14.  
  15. if logged and username then
  16. cgilua.redirect(cgilua.authentication.refURL("cows.html"))
  17. else
  18. err = err or ""
  19. cgilua.htmlheader()
  20. cgilua.lp.include ("index.lp", {
  21. logged = logged, errorMsg = err, username = username,
  22. cgilua = cgilua, logoutURL = logoutURL})
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement