blob: 00c735556438e5d3a3dde130a37b92b122cbcc23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
}
?>
|