Class Security

MyDatabase
  |
  +--Security

public class Security
extends MyDatabase

A class to check who can do what.


Constructor Summary
Security()
          Constructor of the class Security.
 
Method Summary
 integer BadAttempt()
          Method to check the bad attempt number of tries from the Accounts class.
 void EchoError(var $message, var $sql)
          Method to print any error message generated by ADODB to the screen.
 integer GetAccountID()
          Method to get the accountid.
 string GetErrorMessage()
          Method to get the error message.
 integer GetHierarchy()
          Method to get the hierarch level for the user.
 boolean GoToLoginPage()
          Determines the login page's path and redirects it to there.
 boolean GotoNotAuthorized()
          Determines the notAuthorized.php location and redirects it to there.
 boolean GotoThisPage(var $page, var $url)
          Redirects it to the page you want.
 boolean isAllowedTo(var $actionName)
          synonyms of isPermittedTo.
 boolean isNotAllowedTo(var $actionName)
          Method to return reverse value of isPermittedTo.
 boolean isPermittedTo(var $actionName)
          Method to check if the person can do the action.
 unknown PromptLogin(var $FormElements)
          Method to send a Login screen.
 unknown PromptMD5Password(var $FormElements)
          Method to create MD5 password for initial admin use.
 void ResetAccountTries(var $accountid)
          Method to reset the tries counter from the table after a successful login.
 bool SetErrorMessage(var $message)
          Method to set the error message.
 void SuccessfulLogin()
          Method to write to the log for successful Logins.
 unknown VerifyUser(var $username, var $password)
          Method to check the username and password.
 
Methods inherited from class MyDatabase
dbFailure, Field, InsertNew, Update
 

Constructor Detail

Security

public Security()
Constructor of the class Security.
Method Detail

GoToLoginPage

public boolean GoToLoginPage()
Determines the login page's path and redirects it to there.

GotoNotAuthorized

public boolean GotoNotAuthorized()
Determines the notAuthorized.php location and redirects it to there.

GotoThisPage

public boolean GotoThisPage(var $page,
                            var $url)
Redirects it to the page you want.
Parameters:
$url - Default Value: null

isNotAllowedTo

public boolean isNotAllowedTo(var $actionName)
Method to return reverse value of isPermittedTo.

isAllowedTo

public boolean isAllowedTo(var $actionName)
synonyms of isPermittedTo.

isPermittedTo

public boolean isPermittedTo(var $actionName)
Method to check if the person can do the action.

VerifyUser

public unknown VerifyUser(var $username,
                          var $password)
Method to check the username and password.

GetAccountID

public integer GetAccountID()
Method to get the accountid. You have to verify the the account to get it.

GetHierarchy

public integer GetHierarchy()
Method to get the hierarch level for the user. You have to verify the the account to get it.

BadAttempt

public integer BadAttempt()
Method to check the bad attempt number of tries from the Accounts class.

SuccessfulLogin

public void SuccessfulLogin()
Method to write to the log for successful Logins.

ResetAccountTries

public void ResetAccountTries(var $accountid)
Method to reset the tries counter from the table after a successful login.

SetErrorMessage

public bool SetErrorMessage(var $message)
Method to set the error message.

GetErrorMessage

public string GetErrorMessage()
Method to get the error message.

EchoError

public void EchoError(var $message,
                      var $sql)
Method to print any error message generated by ADODB to the screen.
Parameters:
$sql - Default Value: ""

PromptLogin

public unknown PromptLogin(var $FormElements)
Method to send a Login screen.

PromptMD5Password

public unknown PromptMD5Password(var $FormElements)
Method to create MD5 password for initial admin use.