Subversion Repositories eFlore/Applications.cel

Rev

Rev 423 | Rev 763 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 423 Rev 605
Line 75... Line 75...
75
 
75
 
Line 76... Line -...
76
 
-
 
77
 
76
 
78
	function getRessource(){
77
 
Line 79... Line 78...
79
 
78
	function getRessource(){
80
 
79
 
Line 100... Line 99...
100
			$retour= $this->GetUserName();
99
			$retour= $this->GetUserName();
101
			$connected=true;
100
			$connected=true;
102
		}
101
		}
Line 103... Line 102...
103
 
102
 
-
 
103
        $admin = $this->isAdmin($retour) ;
Line 104... Line 104...
104
        $admin = $this->isAdmin($retour) ;
104
        $licence_acceptee = $this->isLicenceAccepted($retour);
105
 
105
 
Line 106... Line 106...
106
		$output = json_encode(array($retour,$connected,$admin));
106
		$output = json_encode(array($retour,$connected,$admin,$licence_acceptee));
Line 136... Line 136...
136
			$retour = session_id();
136
			$retour = session_id();
137
			$connected=false;
137
			$connected=false;
138
		}
138
		}
Line 139... Line 139...
139
 
139
 
-
 
140
        $admin = $this->isAdmin($retour) ;
-
 
141
        
Line 140... Line 142...
140
        $admin = $this->isAdmin($retour) ;
142
        $licence_acceptee = $this->isLicenceAccepted($retour) ;
Line 141... Line 143...
141
 
143
 
Line 142... Line 144...
142
		$output = json_encode(array($retour,$connected,$admin));
144
		$output = json_encode(array($retour,$connected,$admin,$licence_acceptee));
143
 
145
 
Line 161... Line 163...
161
	    while ($row =& $res->fetchrow(DB_FETCHMODE_ASSOC)) {
163
	    while ($row =& $res->fetchrow(DB_FETCHMODE_ASSOC)) {
162
	    	$password=$row['password'];
164
	    	$password=$row['password'];
163
   	    }
165
   	    }
Line 164... Line 166...
164
 
166
 
-
 
167
        $admin = $this->isAdmin($name) ;
Line 165... Line 168...
165
        $admin = $this->isAdmin($name) ;
168
        $licence_acceptee = $this->isLicenceAccepted($name) ;
Line 166... Line 169...
166
 
169
 
Line 167... Line 170...
167
   	    $retour= array("name"=>$name,"password"=>$password,"admin"=>$admin);
170
   	    $retour= array("name"=>$name,"password"=>$password,"admin"=>$admin,"licence_acceptee"=>$licence_acceptee);
Line 237... Line 240...
237
            else {
240
            else {
238
           			return false;
241
           			return false;
239
            }
242
            }
240
		 }
243
		 }
241
	}
244
	}
-
 
245
	
-
 
246
	function isLicenceAccepted($utilisateur) {
-
 
247
		
-
 
248
		//print_r($_COOKIE);
-
 
249
		
-
 
250
		if($_COOKIE['cel_licence_'.md5($utilisateur)] == 1) {	
-
 
251
			return true;
-
 
252
		}
-
 
253
		
-
 
254
		if($_COOKIE['cel_licence_'.md5($utilisateur)] == true) {	
-
 
255
			return true;
-
 
256
		}
-
 
257
		
-
 
258
		return false;
-
 
259
	}
242
}
260
}
Line 243... Line 261...
243
 
261
 
244
/* +--Fin du code ---------------------------------------------------------------------------------------+
262
/* +--Fin du code ---------------------------------------------------------------------------------------+
245
* $Log$
263
* $Log$