Subversion-Projekte lars-tiefland.em_wm

Revision

Revision 64 | Revision 92 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 64 Revision 71
Zeile 2... Zeile 2...
2
	class User
2
	class User
3
	{
3
	{
4
		var $u_id;
4
		var $u_id;
5
		var $u_name;
5
		var $u_name;
6
		var $u_password;
6
		var $u_password;
-
 
7
		var $u_key;
-
 
8
		var $u_active;
7
		var $u_type;
9
		var $u_type;
8
		var $u_email;
10
		var $u_email;
9
		var $u_lang;
11
		var $u_lang;
Zeile 10... Zeile 12...
10
 
12
 
Zeile 15... Zeile 17...
15
			{
17
			{
16
				$this->u_name="";
18
				$this->u_name="";
17
				$this->u_type=0;
19
				$this->u_type=0;
18
				$this->u_email="";
20
				$this->u_email="";
19
				$this->u_password=md5("");
21
				$this->u_password=md5("");
-
 
22
				$this->u_key="";
-
 
23
				$this->u_active=1;
20
				$this->u_lang="en";
24
				$this->u_lang="en";
21
			}
25
			}
22
			else
26
			else
23
			{
27
			{
24
				$this->u_name=$user;
28
				$this->u_name=$user;
Zeile 37... Zeile 41...
37
					$this->u_id=$row["u_id"];
41
					$this->u_id=$row["u_id"];
38
					$this->u_name=$row["u_name"];
42
					$this->u_name=$row["u_name"];
39
					$this->u_type=$row["u_type"];
43
					$this->u_type=$row["u_type"];
40
					$this->u_email=$row["u_email"];
44
					$this->u_email=$row["u_email"];
41
					$this->u_password=$row["u_password"];
45
					$this->u_password=$row["u_password"];
-
 
46
					$this->u_active=$row["u_active"];
-
 
47
					$this->u_key=$row["u_key"];
42
					$this->u_lang=$row["u_lang"];
48
					$this->u_lang=$row["u_lang"];
43
					return $this;
49
					return $this;
44
				}
50
				}
45
			}
51
			}
46
		} 
52
		} 
Zeile 64... Zeile 70...
64
				$db_meld=$res->getUserInfo();
70
				$db_meld=$res->getUserInfo();
65
			}
71
			}
66
			return $res;
72
			return $res;
67
		}
73
		}
Zeile 68... Zeile 74...
68
 
74
 
69
		function update($u_id, $u_name, $u_email, $u_type, $u_lang)
75
		function update($u_id, $u_name, $u_email, $u_type, $u_lang, $u_active, $u_key)
70
		{
76
		{
71
			$this->u_name=$u_name;
77
			$this->u_name=$u_name;
72
			$this->u_email=$u_email;
78
			$this->u_email=$u_email;
73
			$this->u_type=$u_type;
79
			$this->u_type=$u_type;
74
			$this->u_lang=$u_lang;
80
			$this->u_lang=$u_lang;
-
 
81
			$this->u_id=$u_id;
-
 
82
			$this->u_active=$u_active;
75
			$thi->u_id=$u_id;
83
			$this->u_key=$u_key;
Zeile 76... Zeile 84...
76
		}
84
		}
77
 
85
 
78
		function save()
86
		function save()
79
		{
87
		{
80
			global $db;
88
			global $db;
81
			$sql="UPDATE auth_user SET u_name='$this->u_name', u_email='$this->u_email', u_type=$this->u_type, u_lang='$this->u_lang' WHERE u_id=$this->u_id";
89
			$sql="UPDATE auth_user SET u_name='$this->u_name', u_email='$this->u_email', u_type=$this->u_type, u_lang='$this->u_lang', u_active=$this->u_active, u_key='$this->u_key' WHERE u_id=$this->u_id";
82
			return $db->query($sql);
90
			return $db->query($sql);
83
		}
91
		}
84
		function UserData($u_name)
92
		function UserData($u_name)
Zeile 99... Zeile 107...
99
				$this->u_id=$row["u_id"];
107
				$this->u_id=$row["u_id"];
100
				$this->u_name=$row["u_name"];
108
				$this->u_name=$row["u_name"];
101
				$this->u_email=$row["u_email"];
109
				$this->u_email=$row["u_email"];
102
				$this->u_type=$row["u_type"];
110
				$this->u_type=$row["u_type"];
103
				$this->u_password=$row["u_password"];
111
				$this->u_password=$row["u_password"];
-
 
112
				$this->u_active=$row["u_active"];
-
 
113
				$this->u_key=$row["u_key"];
104
				$this->u_lang=$row["u_lang"];
114
				$this->u_lang=$row["u_lang"];
105
				return $this;
115
				return $this;
106
			}
116
			}
107
		}
117
		}
108
	}
118
	}