Line 19... |
Line 19... |
19 |
// | |
|
19 |
// | |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: iw_integrateur.fonct.php,v 1.9 2005-11-02 21:51:44 ddelon Exp $
|
24 |
// CVS : $Id: iw_integrateur.fonct.php,v 1.10 2005-11-08 16:29:35 ddelon Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Fonctions de l'integrateur de page Wikini
|
26 |
* Fonctions de l'integrateur de page Wikini
|
27 |
*
|
27 |
*
|
28 |
* Application permettant d'intégrer des pages wikini dans Papyrus.
|
28 |
* Application permettant d'intégrer des pages wikini dans Papyrus.
|
29 |
*
|
29 |
*
|
Line 31... |
Line 31... |
31 |
//Auteur original :
|
31 |
//Auteur original :
|
32 |
*@author David Delon <david.delon@clapas.net>
|
32 |
*@author David Delon <david.delon@clapas.net>
|
33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
34 |
*@author Aucun
|
34 |
*@author Aucun
|
35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@version $Revision: 1.9 $ $Date: 2005-11-02 21:51:44 $
|
36 |
*@version $Revision: 1.10 $ $Date: 2005-11-08 16:29:35 $
|
37 |
*
|
37 |
*
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
// | ENTETE du PROGRAMME |
|
39 |
// | ENTETE du PROGRAMME |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 254... |
Line 254... |
254 |
|
254 |
|
255 |
function SetUser($user, $remember) {
|
255 |
function SetUser($user, $remember) {
|
256 |
// Appel à partir de Papyrus
|
256 |
// Appel à partir de Papyrus
|
257 |
if ($user=='') {
|
257 |
if ($user=='') {
|
- |
|
258 |
$remember=1;
|
258 |
$remember=1;
|
259 |
// Faire une fonction ...
|
259 |
$wiki_prenom=$GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom);
|
- |
|
260 |
$wiki_prenom = strtolower(trim(strtr($wiki_prenom, "àâéêèëîïôöùûüç", "aaeeeeiioouuuc")));
|
- |
|
261 |
$wiki_prenom = ucfirst($wiki_prenom);
|
260 |
$wiki_prenom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom));
|
262 |
$wiki_nom=$GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom);
|
- |
|
263 |
$wiki_nom = strtolower(trim(strtr($wiki_nom, "àâéêèëîïôöùûüç", "aaeeeeiioouuuc")));
|
- |
|
- |
|
261 |
$wiki_nom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom));
|
264 |
$wiki_nom = ucfirst($wiki_nom);
|
262 |
|
265 |
$_SESSION["user"]["name"] = $wiki_prenom.$wiki_nom;
|
263 |
$_SESSION["user"]["name"] = $wiki_prenom.$wiki_nom;
|
266 |
$_SESSION["user"]["password"] = "wikini";
|
264 |
$_SESSION["user"]["password"] = "wikini";
|
267 |
$_SESSION["user"]["changescount"] = 100;
|
265 |
$_SESSION["user"]["changescount"] = 100;
|
268 |
$this->SetPersistentCookie("name", $user["name"], $remember);
|
266 |
$this->SetPersistentCookie("name", $user["name"], $remember);
|
Line 273... |
Line 271... |
273 |
parent::Setuser($user,$remember);
|
271 |
parent::Setuser($user,$remember);
|
274 |
}
|
272 |
}
|
Line 275... |
Line 273... |
275 |
|
273 |
|
Line -... |
Line 274... |
- |
|
274 |
}
|
- |
|
275 |
|
- |
|
276 |
function LogoutUser() {
|
- |
|
277 |
$_SESSION["user"]="";
|
- |
|
278 |
$this->DeleteCookie("remember");
|
- |
|
279 |
parent::LogoutUser();
|
- |
|
280 |
}
|
- |
|
281 |
|
- |
|
282 |
function versChatMot($entree) {
|
- |
|
283 |
$sortie = strtolower(trim(strtr($entree, "àâéêèëîïôöùûüç-", "aaeeeeiioouuuc ")));
|
- |
|
284 |
$sortie = ucwords($sortie);
|
- |
|
285 |
$sortie = str_replace(" ", "",$sortie);
|
Line 276... |
Line 286... |
276 |
}
|
286 |
return $sortie;
|