Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.9 2006-02-14 10:19:10 alexandre_tb Exp $
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.10 2006-02-28 14:02:20 alexandre_tb Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.9 2006-02-14 10:19:10 alexandre_tb Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.10 2006-02-28 14:02:20 alexandre_tb Exp $
|
24 |
/**
|
24 |
/**
|
25 |
* Fonctions du module inscription
|
25 |
* Fonctions du module inscription
|
26 |
*
|
26 |
*
|
27 |
* Fonctions du module inscription
|
27 |
* Fonctions du module inscription
|
28 |
*
|
28 |
*
|
Line 30... |
Line 30... |
30 |
//Auteur original :
|
30 |
//Auteur original :
|
31 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@author Aucun
|
33 |
*@author Aucun
|
34 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@version $Revision: 1.9 $ $Date: 2006-02-14 10:19:10 $
|
35 |
*@version $Revision: 1.10 $ $Date: 2006-02-28 14:02:20 $
|
36 |
*@version $Revision: 1.9 $ $Date: 2006-02-14 10:19:10 $
|
36 |
*@version $Revision: 1.10 $ $Date: 2006-02-28 14:02:20 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 147... |
Line 147... |
147 |
return $res;
|
147 |
return $res;
|
148 |
}
|
148 |
}
|
Line 149... |
Line 149... |
149 |
|
149 |
|
150 |
|
150 |
|
151 |
function insertion($valeur) {
|
151 |
function insertion($valeur) {
|
152 |
// =========== Insertion dans l'annuaire gen_annuaire ===================
|
152 |
// =========== Insertion dans l'annuaire gen_annuaire ===================
|
153 |
// Génération du nom wikini à partir du nom et du prénom
|
153 |
// Génération du nom wikini à partir du nom et du prénom
|
154 |
if (INS_UTILISE_WIKINI) {
|
154 |
if (INS_UTILISE_WIKINI) {
|
155 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
155 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
156 |
}
|
156 |
}
|
157 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
157 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
158 |
$requete = 'insert into '.INS_ANNUAIRE.' set '.
|
158 |
$requete = 'insert into '.INS_ANNUAIRE.' set '.
|
159 |
INS_CHAMPS_ID.'="'.$id_utilisateur.'",'.
|
- |
|
160 |
requete_annuaire($valeur) ;
|
- |
|
161 |
|
- |
|
162 |
$resultat = $GLOBALS['ins_db']->query($requete) ;
|
- |
|
163 |
if (DB::isError($resultat)) {
|
- |
|
Line -... |
Line 159... |
- |
|
159 |
INS_CHAMPS_ID.'="'.$id_utilisateur.'",'.
|
- |
|
160 |
requete_annuaire($valeur) ;
|
- |
|
161 |
|
- |
|
162 |
$resultat = $GLOBALS['ins_db']->query($requete) ;
|
- |
|
163 |
if (DB::isError($resultat)) {
|
164 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
164 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
165 |
}
|
165 |
}
|
166 |
|
166 |
|
167 |
// ================ Insertion dans SPIP =========================================
|
167 |
// ================ Insertion dans SPIP =========================================
|
168 |
if (INS_UTILISE_SPIP) {
|
168 |
if (INS_UTILISE_SPIP) {
|
169 |
inscription_spip($id_utilisateur, $valeur) ;
|
- |
|
170 |
}
|
- |
|
171 |
if (INS_UTILISE_WIKINI) inscription_interwikini_users('', $valeur) ;
|
- |
|
172 |
// TODO Créer un fichier bazar/bazar.inscription.inc.php et y mettre le code qui suit
|
- |
|
173 |
// Vérifier tous les noms des répertoires du répertoire client et s'il existe
|
- |
|
174 |
// un fichier nom/nom/inscription.inc.php l'inclure
|
- |
|
175 |
//inscription dans Bazar
|
- |
|
176 |
$requete = 'INSERT INTO bazar_droits VALUES ('.$id_utilisateur.',1,1),('.$id_utilisateur.',2,1),('.$id_utilisateur.',3,1),('.$id_utilisateur.',7,1)';
|
- |
|
177 |
if ($valeur['est_structure']==1) $requete.=',('.$id_utilisateur.',4,1),('.$id_utilisateur.',5,1),('.$id_utilisateur.',6,1)';
|
- |
|
178 |
$resultat = $GLOBALS['ins_db']->query($requete);
|
- |
|
179 |
if (DB::isError($resultat)) {
|
169 |
inscription_spip($id_utilisateur, $valeur) ;
|
180 |
die($resultat->getMessage().$resultat->getDebugInfo()) ;
|
- |
|
181 |
}
|
- |
|
182 |
unset($resultat) ;
|
170 |
}
|
Line 183... |
Line 171... |
183 |
|
171 |
if (INS_UTILISE_WIKINI) inscription_interwikini_users('', $valeur) ;
|
184 |
|
172 |
return $id_utilisateur ;
|
Line 654... |
Line 642... |
654 |
}
|
642 |
}
|
Line 655... |
Line 643... |
655 |
|
643 |
|
656 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
644 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
657 |
*
|
645 |
*
|
- |
|
646 |
* $Log: not supported by cvs2svn $
|
- |
|
647 |
* Revision 1.9 2006/02/14 10:19:10 alexandre_tb
|
- |
|
648 |
* Mise en place des templates
|
- |
|
649 |
* CREATE TABLE `inscription_template` (
|
- |
|
650 |
* `it_id_template` smallint(5) unsigned NOT NULL default '0',
|
- |
|
651 |
* `it_i18n` varchar(5) NOT NULL default '',
|
- |
|
652 |
* `it_template` text NOT NULL,
|
- |
|
653 |
* PRIMARY KEY (`it_id_template`)
|
- |
|
654 |
* ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
658 |
* $Log: not supported by cvs2svn $
|
655 |
*
|
659 |
* Revision 1.8 2006/01/02 09:51:38 alexandre_tb
|
656 |
* Revision 1.8 2006/01/02 09:51:38 alexandre_tb
|
660 |
* généralisation du code et intégration au bottin
|
657 |
* généralisation du code et intégration au bottin
|
661 |
*
|
658 |
*
|
662 |
* Revision 1.7 2005/12/19 13:19:07 alexandre_tb
|
659 |
* Revision 1.7 2005/12/19 13:19:07 alexandre_tb
|