Procedural File: auth.php
Source Location: /lodel/scripts/auth.php
Page Details
Fichier utilitaire pour gérer l'authentification de Lodel
Ce script définit les méthodes de base pour l'authentification. Il se charge aussi d'initialiser le context, ainsi que le jeu de caractère utilisé *IMPORTANT* : ce script devrait être transformé en classe. PHP versions 4 et 5 LODEL - Logiciel d'Edition ELectronique. Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse Copyright (c) 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot Home page: http://www.lodel.org E-Mail: lodel@lodel.org All Rights Reserved This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
| Author: | Pierre-Alain Mignot |
| Author: | Ghislain Picard |
| Author: | Jean Lamy |
| Author: | Sophie Malafosse |
| Version: | CVS:$Id: |
| Copyright: | 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou |
| Copyright: | 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot |
| Copyright: | 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse |
| Filesource: | Source Code for this file |
Constants
INTERFACE_ADVANCED [line 62]
INTERFACE_DEBUG [line 61]
INTERFACE_NORMAL [line 63]
INTERFACE_SIMPLE [line 64]
LEVEL_ADMINLODEL [line 58]
LEVEL_RESTRICTEDUSER [line 53]
Fichier utilitaire pour gérer l'authentification de Lodel
Ce script définit les méthodes de base pour l'authentification. Il se charge aussi d'initialiser le context, ainsi que le jeu de caractère utilisé *IMPORTANT* : ce script devrait être transformé en classe. PHP versions 4 et 5 LODEL - Logiciel d'Edition ELectronique. Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse Copyright (c) 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot Home page: http://www.lodel.org E-Mail: lodel@lodel.org All Rights Reserved This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. API Tags:
Information Tags:
| Author: | Pierre-Alain Mignot |
| Author: | Ghislain Picard |
| Author: | Jean Lamy |
| Author: | Sophie Malafosse |
| Version: | CVS:$Id: |
| Copyright: | 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou |
| Copyright: | 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot |
| Copyright: | 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse |
Functions
void authenticate(
[integer $level = 0], [ $mode = ""]
)
|
|
Gestion de l'authentification.
Cette fonction gère l'authentification suivant le niveau de l'utilisateur. Le niveau de l'utilsateur est un entier parmis : LEVEL_RESTRICTEDUSER : 5, LEVEL_VISITOR : 10, LEVEL_REDACTOR : 20, LEVEL_EDITOR : 30, LEVEL_ADMIN : 40, LEVEL_ADMINLODEL : 128.
Parameters:
|
integer |
$level: |
Le niveau de l'utilisateur. Par défaut 0 |
|
|
$mode: |
|
getacceptedcharset [line 253]
void getacceptedcharset(
string $charset
)
|
|
Récuperer les charsets acceptés par un navigateur
Test des jeux de caractères supportés par un navigateur. Ce test est fait grâce aux informations fournis par le navigateur dans la requête HTTP (utilisation de la superglobale $_SERVER)
Parameters:
|
string |
$charset: |
le charset |
Le site est-il en maintenance ?
Vérifie le status d'un site. Si status == -64 ou -65 et qu'on est pas loggé en admin lodel et qu'on est pas dans la partie administration générale de Lodel alors on redirige vers la page maintenance.html
string mkurl(
string $url, string $extraarg
)
|
|
ATTENTION! FONTION A DEPLACER DANS UN MEILLEUR SCRIPT Rajoute des arguments dans une URL
Cette fonction permet de rajouter un argument à une URL donnée. Elle teste si l'URL contient déjà des arguments et ajoute alors l'argument supplémentaire en fin
Parameters:
|
string |
$url: |
l'URL |
|
string |
$extraarg: |
l'argument supplémentaire |
API Tags:
| Return: | l'url avec l'argument supplémentaire |
Enregistre l'url pour la session donnée
Cette fonction enregistre l'url courante (url du script) pour une session donnée. Cela est utile pour la navigation dans l'interface
|
|