summaryrefslogtreecommitdiff
path: root/www/class.user.php
diff options
context:
space:
mode:
authormoehm2014-04-28 11:12:38 +0200
committermoehm2014-04-28 11:12:38 +0200
commit7c1299521f31d6eb733e29455ccad8c92cbc0a7b (patch)
tree572c80ad16cea71b79aad7d3291e06a03265c7c0 /www/class.user.php
parent11ed3a4c720d9379beaf7f5770f297677da5d9a7 (diff)
downloadfiles.iamfabulous.de-7c1299521f31d6eb733e29455ccad8c92cbc0a7b.tar.gz
Unimportant changes #2
Diffstat (limited to 'www/class.user.php')
-rw-r--r--www/class.user.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/www/class.user.php b/www/class.user.php
new file mode 100644
index 0000000..2de15e2
--- /dev/null
+++ b/www/class.user.php
@@ -0,0 +1,40 @@
+<?php
+
+class user {
+
+ public $name;
+ public $id;
+ public $login = false;
+ public $banned = false;
+
+ private $db = $GLOBALS["db"];
+
+ __construct(){
+ $db=$this->$db;
+ $query = $db->prepare("SELECT * FROM user WHERE name=?");
+ $query->set("s", $_GET["name"]);
+ $result = $query->exec();
+
+ $this->name=
+ $this->id=
+
+ if(!isset($_SESSION["login"])){
+ $_SESSION["login"] = false;
+ $this->login=false;
+ } else {
+ $this->login=$_SESSION["login"];
+ }
+ }
+
+ getName(){
+ return $this->name;
+ }
+
+ getId(){
+ return $this->id;
+ }
+
+ checkLogin(){
+ return $this->login;
+ }
+}