add comments, remove unused code
authorchriskl <chriskl>
Wed, 8 Jan 2003 06:46:26 +0000 (06:46 +0000)
committerchriskl <chriskl>
Wed, 8 Jan 2003 06:46:26 +0000 (06:46 +0000)
libraries/lib.inc.php

index 480eecb40d8fbdce8f7be02fe8f20d7712c8c1b5..242b070ddc76218a5889b7b2805020be196572b0 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Function library read in upon startup
         *
-        * $Id: lib.inc.php,v 1.9 2003/01/06 05:11:48 chriskl Exp $
+        * $Id: lib.inc.php,v 1.10 2003/01/08 06:46:26 chriskl Exp $
         */
 
        // Application name 
        include_once('../classes/Misc.php');
        $misc = new Misc();
 
+       // Start session
        session_start();
-       //session_register('webdbServerID');
-       //session_register('webdbUsername');
-       //session_register('webdbPassword');
 
        // Do basic PHP configuration checks
        if (ini_get('magic_quotes_gpc')) {
@@ -48,6 +46,7 @@
                $misc->stripVar($_REQUEST);
        }
 
+       // Enforce PHP environment
        ini_set('magic_quotes_gpc', 0);
        ini_set('magic_quotes_runtime', 0);
        ini_set('magic_quotes_sybase', 0);
                $webdbUsername = $_POST['formUsername'];
                $webdbPassword = $_POST['formPassword'];
 
+               // Register some session variables
                $_SESSION['webdbServerID'] = $webdbServerID;
                $_SESSION['webdbUsername'] = $webdbUsername;
                $_SESSION['webdbPassword'] = $webdbPassword;
-
-               //setCookie('webdbServerID', $webdbServerID);
-               //setCookie('webdbUsername', $webdbUsername);
-               //setCookie('webdbPassword', $webdbPassword);
-               //$_COOKIE['webdbServerID'] = $webdbServerID;
-               //$_COOKIE['webdbUsername'] = $webdbUsername;
-               //$_COOKIE['webdbPassword'] = $webdbPassword;
        }
                
        // If the logged in settings aren't present, put up the login screen
@@ -91,6 +84,8 @@
        }
        
        // Check that the database functions are loaded
+       // @@ NOTE: THIS IS WRONG. IT NEEDS TO BE DONE BEFORE THE ABOVE, BUT
+       // RELIES ON THE ABOVE!!
        if (!$data->isLoaded()) {
                echo $strNotLoaded;
                exit;