[phpMP-CVS] CVS: phpMP/includes auth.php,1.30,1.31
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2003-02-08 09:39:56
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv9693 Modified Files: auth.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** auth.php 7 Feb 2003 23:28:49 -0000 1.30 --- auth.php 8 Feb 2003 09:39:52 -0000 1.31 *************** *** 1 **** ! <?php class Auth // Authenticates user. Only included if user auth is set to be used. { var $curr_user; var $session_id; function Auth() { global $DB; // Session ID is contained in the URL. if( isset( $_GET['s'] ) ) { define("C_SESSID_LOC", 1); $this->session_id = $_GET['s']; } // We're using the cookie set by the previous session. elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) { define("C_SESSID_LOC", 2); $this->session_id = $_COOKIE[C_COOKIE_NAME]; } // There is no Session ID. We'll have to make one. else { // Create a Session ID for our use. $this->session_id = makeSessionID(); // We must now determine where the session id should be placed. if( U_SESSION_URL == 1 ) { } } $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $this->session_id . " AND expiry<" . time(); $result = $DB->query($sql); $numrows = $DB->numRows($result); if($numrows >= 1) { $sess_data = $DB->fetchArray($result); } else // The session doesn't exist or has expired. { die("Your session has expired."); } if( C_SESSID_LOC == 2 ) // We need to set up the cookie. { // Set up cookie/url procedures and such. } } } ?> \ No newline at end of file --- 1,75 ---- ! <?php ! ! class Auth // Authenticates user. Only included if user auth is set to be used. ! { ! ! var $curr_user; ! var $session_id; ! ! function Auth() ! { ! ! global $DB; ! ! // Session ID is contained in the URL. ! if( isset( $_GET['s'] ) ) ! { ! define("C_SESSID_LOC", 1); ! ! $this->session_id = $_GET['s']; ! ! } ! // We're using the cookie set by the previous session. ! elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) ! { ! ! define("C_SESSID_LOC", 2); ! ! $this->session_id = $_COOKIE[C_COOKIE_NAME]; ! ! } ! // There is no Session ID. We'll have to make one. ! else ! { ! ! // Create a Session ID for our use. ! $this->session_id = makeSessionID(); ! ! // We must now determine where the session id should be placed. ! if( U_SESSION_URL == 1 ) ! { ! } ! ! } ! ! $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $this->session_id . " AND expiry<" . time(); ! $result = $DB->query($sql); ! ! $numrows = $DB->numRows($result); ! ! if($numrows >= 1) ! { ! ! $sess_data = $DB->fetchArray($result); ! ! } ! else // The session doesn't exist or has expired. ! { ! ! die("Your session has expired."); ! ! } ! ! if( C_SESSID_LOC == 2 ) // We need to set up the cookie. ! { ! ! ! // Set up cookie/url procedures and such. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file |