diff options
author | neoraider <devnull@localhost> | 2006-03-04 15:41:05 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-03-04 15:41:05 +0100 |
commit | 75057f07edfe2fd8cad316701555b7a56dc01da6 (patch) | |
tree | ce5b3d47874d2eeebfd8f000f828259f722263af /code/user.inc.php | |
parent | cea3e4c0de51683979fdad6868c9e383e9039f10 (diff) | |
download | neon-75057f07edfe2fd8cad316701555b7a56dc01da6.tar neon-75057f07edfe2fd8cad316701555b7a56dc01da6.zip |
Unnoetige DB-Klasse entfernt + alle Aufrufe auf AdoDB umgestellt;
Unquote-Funktion hinzugefuegt
Diffstat (limited to 'code/user.inc.php')
-rw-r--r-- | code/user.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/code/user.inc.php b/code/user.inc.php index 7bd1e99..3cd39bf 100644 --- a/code/user.inc.php +++ b/code/user.inc.php @@ -2,7 +2,7 @@ if(!defined('USER_INC')) { define('USER_INC', 1); - include('code/db.inc.php'); + require_once('code/db.inc.php'); class User { var $uid = 0, $gid = 0; @@ -10,7 +10,7 @@ function User() { if($_COOKIE['login']) { - $res = $GLOBALS['db']->Query('SELECT id, gid, sid FROM users WHERE id = ? AND sid = ?', + $res = $GLOBALS['db']->Execute('SELECT id, gid, sid FROM users WHERE id = ? AND sid = ?', array(substr($_COOKIE['login'], 32), substr($_COOKIE['login'], 0, 32))); @@ -24,7 +24,7 @@ } if($this->uid == 0 && $_GET['login']) { - $res = $GLOBALS['db']->Query('SELECT id, gid, sid FROM users WHERE id = ? AND sid = ?', + $res = $GLOBALS['db']->Execute('SELECT id, gid, sid FROM users WHERE id = ? AND sid = ?', array(substr($_GET['login'], 32), substr($_GET['login'], 0, 32))); @@ -39,13 +39,13 @@ } function Login($name, $pass) { - $res = $GLOBALS['db']->Query('SELECT id, gid FROM users WHERE user = ? AND password = ?', array($name, $pass)); + $res = $GLOBALS['db']->Execute('SELECT id, gid FROM users WHERE user = ? AND password = ?', array($name, $pass)); if($res->RecordCount()) { $id = $res->fields[0]; $sid = md5(uniqid($name . " * " . $pass . " * " . rand())); - $GLOBALS['db']->Query('UPDATE users SET sid = ? WHERE id = ?', array($sid, $id)); + $GLOBALS['db']->Execute('UPDATE users SET sid = ? WHERE id = ?', array($sid, $id)); $this->uid = $id; $this->gid = $res->fields[1]; @@ -62,7 +62,7 @@ } function Logout() { - $GLOBALS['db']->Query('UPDATE users SET sid = \'\' WHERE id = ?', $this->uid); + $GLOBALS['db']->Execute('UPDATE users SET sid = \'\' WHERE id = ?', $this->uid); $this->uid = 0; $this->gid = 0; |