3 * A-Select class for FusionForge
5 * This file is part of FusionForge
7 * This class, like FusionForge, is free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * FusionForge is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 var $attributes = array();
28 function __construct() {
30 if (isset($_COOKIE['aselectuid'])) {
31 $this->username = $_COOKIE['aselectuid'];
36 if (isset($_COOKIE['aselectorganization'])) {
37 $this->organization = $_COOKIE['aselectorganization'];
39 $this->organization = '';
42 if (isset($_COOKIE['aselectattributes'])) {
43 $a = explode('&', $_COOKIE['aselectattributes']);
45 while ($i < count($a)) {
46 $b = explode('=', $a[$i]);
47 $this->attributes[htmlspecialchars(urldecode($b[0]))] = htmlspecialchars(urldecode($b[1]));
51 //nothing to be done here yet.
54 if (isset($_COOKIE['aselectticket'])) {
55 $this->ticket = $_COOKIE['aselectticket'];
61 function getUserName () {
62 return $this->username;
65 function getOrganization () {
66 return $this->organization;
69 function getAttributes () {
70 return $this->attributes;
73 function getAttribute ($attribute) {
74 return $this->attributes[$attribute];
77 function getTicket () {