summaryrefslogtreecommitdiffstats
path: root/code/user.inc.php
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-01-09 20:49:02 +0100
committerneoraider <devnull@localhost>2006-01-09 20:49:02 +0100
commit73d5e907a797e976e59f328d4f2fd0b8bfcebde6 (patch)
tree98108e9738db75d2688de5f7a68c72253c54c450 /code/user.inc.php
parent61f7b4cc39a399a16298453acbe5a8f49ad0513d (diff)
downloadneon-73d5e907a797e976e59f328d4f2fd0b8bfcebde6.tar
neon-73d5e907a797e976e59f328d4f2fd0b8bfcebde6.zip
Allgemein ist jetzt alles etwas weiter. Vieles ist jetzt durch Klassen gel?st, und einige andere Teile von Neon sind jetzt besser strukturiert.
Diffstat (limited to 'code/user.inc.php')
-rw-r--r--code/user.inc.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/code/user.inc.php b/code/user.inc.php
new file mode 100644
index 0000000..00c7355
--- /dev/null
+++ b/code/user.inc.php
@@ -0,0 +1,33 @@
+<?PHP
+ if(!defined('USER_INC')) {
+ define('USER_INC', 1);
+
+ include('code/db.inc.php');
+
+ class User {
+ var $uid = 0, $gid = 0;
+
+ function User() {
+ if($_GET['id'] && $_GET['sid']) {
+ $res = DBQuery('SELECT id, gid FROM users WHERE id = ? AND sid = ?',
+ array($_GET['id'],$_GET['sid']));
+
+ if($res->RecordCount()) {
+ $this->uid = $res->fields[0];
+ $this->gid = $res->fields[1];
+ }
+ }
+ }
+
+ function GetUid() {
+ return $this->uid;
+ }
+
+ function GetGid() {
+ return $this->gid;
+ }
+ }
+
+ $user = new User;
+ }
+?>