diff options
author | Malf Furious <m@lfurio.us> | 2017-02-05 21:58:04 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-02-05 21:58:04 -0500 |
commit | e0140672f1fb7c79e47aadad6fbee57e7262b1a2 (patch) | |
tree | 5e56748efe28e192cc18a494956885a9ca09d639 /examples/class/framework.class.php | |
parent | ce38fd96e1105c70b55196ae3b6ab612442c8b2f (diff) | |
download | scrott-e0140672f1fb7c79e47aadad6fbee57e7262b1a2.tar.gz scrott-e0140672f1fb7c79e47aadad6fbee57e7262b1a2.zip |
Purge old content
Diffstat (limited to '')
-rw-r--r-- | examples/class/framework.class.php | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/examples/class/framework.class.php b/examples/class/framework.class.php index 802c821..0461da7 100644 --- a/examples/class/framework.class.php +++ b/examples/class/framework.class.php @@ -1,30 +1,7 @@ <?php -/* Define Scrott version number */ -define("__VERSION__", "v0.0"); - -/* Init PHP session */ -session_start(); - -require_once "class/mysql.class.php"; -require_once "class/user.class.php"; - -/* - * Global functions / operations and access to contextual or session-based information - */ abstract class Framework { - static $dbobj = null; - - /* - * Check for the existence of Scrott's system-level config - */ - function scrottConfExists() - { - global $_SCROTT; - return isset($_SCROTT['conf']); - } - /* * Get the absolute path on this server for the root of this app */ @@ -51,50 +28,6 @@ abstract class Framework } /* - * Get a user object for the currently logged in user. Returns false if session is logged out. - */ - function getCurrentUser() - { - if (isset($_SESSION['userguid'])) - { - $user = new User($_SESSION['userguid']); - - if ($user->type == "user") - return $user; - - $this->setCurrentUser(); - } - - return false; - } - - /* - * Get the IP address the client held when the current session began - */ - function getOriginIP() - { - return $_SESSION['userip']; - } - - /* - * Set the current logged in user - */ - function setCurrentUser($user = null) - { - if ($user != null && isset($user->guid)) - { - $_SESSION['userguid'] = $user->guid; - $_SESSION['userip'] = $_SERVER['REMOTE_ADDR']; - } - - else - { - unset($_SESSION['userguid']); - unset($_SESSION['userip']); - } - } - - /* * Get or create the app's database connection object (this is a singleton object and dependent on system-level config) */ static function getDbConnection() |