. */ class User { public $id; public $accounts; public $categories; public $preferences; function GetCategory($id) { if ($id == "" || $id == "0") { $cat["id"] = "0"; $cat["forecolor"] = "black"; $cat["backcolor"] = "#3DEB3D"; $cat["font"] = ""; ExtractStyle($cat); return $cat; } foreach($this->categories as $i => $category) if ($category["id"] == "$id") return $category; return LoadCategory($this, $id); } function IsAccountBlocked($id) { foreach($this->accounts as $i => $account) if ($account["id"] == "$id") return $account["blocked"] == "1"; return false; } function GetAccountName($id) { foreach($this->accounts as $i => $account) if ($account["id"] == "$id") return $account["name"]; return ""; } } ?>