Lots of additions.

git-svn-id: http://www.observium.org/svn/observer/trunk@108 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-06-24 14:56:47 +00:00
parent 2cd924d0dd
commit 9ca765c285
28 changed files with 519 additions and 398 deletions
+2 -1
View File
@@ -22,12 +22,13 @@ if($_GET['logout']) {
$encrypted=$_COOKIE['encrypted'];
}
$sql = "select username, level from users where username='$_SESSION[username]' and password='$encrypted'";
$sql = "select username, level, user_id from users where username='$_SESSION[username]' and password='$encrypted'";
$row = mysql_fetch_row(mysql_query($sql));
if ( $_SESSION['username'] != "" && $row[0] == $_SESSION['username'] ) {
$_SESSION['userlevel'] = $row[1];
$_SESSION['authenticated'] = true;
$_SESSION['user_id'] = $row[2];
setcookie("username", $username);
setcookie("encrypted", $encrypted);
}