--- trunk/admin/include/sessionClass.php 2004/03/18 20:21:08 71 +++ trunk/admin/include/sessionClass.php 2004/03/18 20:33:37 72 @@ -42,9 +42,9 @@ function sessionClass($duration, $session_id, $staff_account) { // Set the database connection variables - $this->con_session = @mysql_connect ( $this->db_session_srv, $this->db_session_usr, $this->db_session_pwd ) + $this->con_session = @xx_connect ( $this->db_session_srv, $this->db_session_usr, $this->db_session_pwd ) or die ( "ERROR: Could not connect to database server!" ); - $this->result_session = mysql_select_db ( $this->db_session, $this->con_session ) + $this->result_session = xx_select_db ( $this->db_session, $this->con_session ) or die ( "ERROR: Could not connect to database!" ); // Fetch user ip @@ -102,13 +102,13 @@ . $time_expire . "')"; - // mysql_query ("LOCK TABLE session WRITE", $this->con_session); - if (!mysql_query($sql, $this->con_session)){ - mysql_query ("UNLOCK TABLES", $this->con_session); + // xx_query ("LOCK TABLE session WRITE", $this->con_session); + if (!xx_query($sql, $this->con_session)){ + xx_query ("UNLOCK TABLES", $this->con_session); $this->bailout(); } else { - mysql_query("UNLOCK TABLES", $this->con_session); + xx_query("UNLOCK TABLES", $this->con_session); } @@ -189,8 +189,8 @@ // The SQL $sql = "SELECT * FROM session where session_id = '" . $hash . "'"; - $rs = mysql_query($sql, $con_session); - $duplicate = mysql_num_rows($rs); + $rs = xx_query($sql, $con_session); + $duplicate = xx_num_rows($rs); if ($duplicate > 0) { $duplicate = 1; $hash = "0"; @@ -229,9 +229,9 @@ . "' AND user_ip = '" . $user_ip ."'"; - $rs = mysql_query($sql, $con_session); - $valid = mysql_num_rows($rs); - $row = mysql_fetch_array ($rs); + $rs = xx_query($sql, $con_session); + $valid = xx_num_rows($rs); + $row = xx_fetch_array ($rs); $time_human = $row["time_human"]; $time_unix = $row["time_unix"]; $time_expire = $row["time_expire"]; @@ -292,13 +292,13 @@ . $user_ip . "'"; - //mysql_query ("LOCK TABLE session WRITE", $con_session); - if (!mysql_query($sql, $con_session)){ - mysql_query ("UNLOCK TABLES", $con_session); + //xx_query ("LOCK TABLE session WRITE", $con_session); + if (!xx_query($sql, $con_session)){ + xx_query ("UNLOCK TABLES", $con_session); $this->bailout(); } else { - mysql_query("UNLOCK TABLES", $con_session); + xx_query("UNLOCK TABLES", $con_session); $this->setProperties($session_id, $user_ip); } @@ -329,13 +329,13 @@ $sql = "DELETE FROM session where time_expire < " . $time_unix; - if (!mysql_query($sql, $con_session)){ + if (!xx_query($sql, $con_session)){ sql_err($con_session); - mysql_query ("UNLOCK TABLES", $con_session); + xx_query ("UNLOCK TABLES", $con_session); bailout(); } else { - mysql_query("UNLOCK TABLES", $con_session); + xx_query("UNLOCK TABLES", $con_session); } } // end of function } // end of class