Notes:
-For Student sessions student id is stored in $_SESSION['userid'].
-For Admin sessions username is stored in $_SESSION['username'].
-For students, the part of the e-mail before '@' is referenced as the "username" in development, but avoid it in user-interface to prevent confusion.
-$_SESSION['usertype'] is 0 for Anonymous (non-logged-in), 1 for Students and 2 for Admins.
-All TABLE and COLUMN names are UPPERCASE.
-For SQL executions use the function $result = runSQL($sql, $args); (defined in db.php) where $sql is the SQL command and $args is the argument array (New PDO version). It returns the query result upon successful execution and 'null' otherwise. Note that this function logs all executions.
-If you need a PHP file to do some checking, create it under "essentials/" and follow the naming convention: "[functionality]_check.php"; if functionality is more than one word, separate the words with underscores.
-Don't forget to append .toString() to the CryptoJS.SHA256 objects i.e CryptoJS.SHA256("jSociety").toString()
Notes: -For Student sessions student id is stored in $_SESSION['userid'].
-For Admin sessions username is stored in $_SESSION['username'].
-For students, the part of the e-mail before '@' is referenced as the "username" in development, but avoid it in user-interface to prevent confusion.
-$_SESSION['usertype'] is 0 for Anonymous (non-logged-in), 1 for Students and 2 for Admins.
-All TABLE and COLUMN names are UPPERCASE.
-For SQL executions use the function $result = runSQL($sql, $args); (defined in db.php) where $sql is the SQL command and $args is the argument array (New PDO version). It returns the query result upon successful execution and 'null' otherwise. Note that this function logs all executions.
-If you need a PHP file to do some checking, create it under "essentials/" and follow the naming convention: "[functionality]_check.php"; if functionality is more than one word, separate the words with underscores.
-Don't forget to append .toString() to the CryptoJS.SHA256 objects i.e CryptoJS.SHA256("jSociety").toString()