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