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.16 2006-04-11 08:41:41 alexandre_tb Exp $
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.17 2006-04-28 12:44:05 florian Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.16 2006-04-11 08:41:41 alexandre_tb Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.17 2006-04-28 12:44:05 florian 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 Florian Schmitt <florian@ecole-et-nature.org>
|
33 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
34 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@version $Revision: 1.16 $ $Date: 2006-04-11 08:41:41 $
|
35 |
*@version $Revision: 1.17 $ $Date: 2006-04-28 12:44:05 $
|
36 |
*@version $Revision: 1.16 $ $Date: 2006-04-11 08:41:41 $
|
36 |
*@version $Revision: 1.17 $ $Date: 2006-04-28 12:44:05 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 122... |
Line 122... |
122 |
/**
|
122 |
/**
|
123 |
* Renvoie l'accueil de l'inscription
|
123 |
* Renvoie l'accueil de l'inscription
|
124 |
*
|
124 |
*
|
125 |
* @return string HTML
|
125 |
* @return string HTML
|
126 |
*/
|
126 |
*/
|
127 |
function AUTH_formulaire_login() {
|
127 |
function AUTH_formulaire_login() {
|
128 |
|
- |
|
129 |
|
- |
|
130 |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/Template/IT.php';
|
128 |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/Template/IT.php';
|
131 |
$tpl = new HTML_Template_IT() ;
|
129 |
$tpl = new HTML_Template_IT() ;
|
132 |
// Le formulaire pour se logguer est dans un template
|
130 |
// Le formulaire pour se logguer est dans un template
|
133 |
// template 1
|
131 |
// template 1
|
134 |
$requete = 'SELECT it_template FROM inscription_template WHERE it_id_template=1'.
|
132 |
$requete = 'SELECT it_template FROM inscription_template WHERE it_id_template=1'.
|
Line 160... |
Line 158... |
160 |
return $res;
|
158 |
return $res;
|
161 |
}
|
159 |
}
|
Line 162... |
Line 160... |
162 |
|
160 |
|
163 |
|
161 |
|
164 |
function insertion($valeur) {
|
162 |
function insertion($valeur) {
|
165 |
// =========== Insertion dans l'annuaire gen_annuaire ===================
|
163 |
// =========== Insertion dans l'annuaire ===================
|
166 |
// Génération du nom wikini à partir du nom et du prénom
|
164 |
// Génération du nom wikini à partir du nom et du prénom
|
167 |
if (INS_UTILISE_WIKINI && INS_NOM_WIKINI_GENERE) {
|
165 |
if (INS_UTILISE_WIKINI && INS_NOM_WIKINI_GENERE) {
|
168 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
166 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
169 |
} else {
|
167 |
} else {
|
170 |
if (!INS_NOM_WIKINI_GENERE) {
|
168 |
if (!INS_NOM_WIKINI_GENERE) {
|
171 |
$valeur['nom_wiki'] = $valeur['nomwiki'];
|
169 |
$valeur['nom_wiki'] = $valeur['nomwiki'];
|
172 |
}
|
170 |
}
|
173 |
}
|
171 |
}
|
174 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
172 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
175 |
$requete = 'insert into '.INS_ANNUAIRE.' set '.
|
173 |
$requete = 'INSERT INTO '.INS_ANNUAIRE.' SET '.
|
Line 176... |
Line 174... |
176 |
INS_CHAMPS_ID.'="'.$id_utilisateur.'",'.
|
174 |
INS_CHAMPS_ID.'="'.$id_utilisateur.'",'.
|
177 |
requete_annuaire($valeur) ;
|
175 |
requete_annuaire($valeur) ;
|
Line 332... |
Line 330... |
332 |
if (DB::isError($resultat)) {
|
330 |
if (DB::isError($resultat)) {
|
333 |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
|
331 |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
|
334 |
}
|
332 |
}
|
Line 335... |
Line 333... |
335 |
|
333 |
|
- |
|
334 |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
|
336 |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
|
335 |
|
337 |
//cas de la présentation de la fiche
|
336 |
//voir la présentation de la fiche
|
338 |
if ($type_info=='fiche') {
|
337 |
if ($type_info=='fiche') {
|
339 |
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) {
|
338 |
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) {
|
340 |
$res = '<h1>'.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
339 |
$res = '<h1>'.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
341 |
$res .= '<h2>'.INS_FICHE_STRUCTURE.'</h2>'."\n" ;
|
340 |
$res .= '<h2>'.INS_FICHE_STRUCTURE.'</h2>'."\n" ;
|
Line 380... |
Line 379... |
380 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=modifier&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ;
|
379 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=modifier&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ;
|
381 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=supprimer&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ;
|
380 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=supprimer&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ;
|
382 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ;
|
381 |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ;
|
383 |
$res .= '</ul>'."\n";
|
382 |
$res .= '</ul>'."\n";
|
384 |
}
|
383 |
}
|
- |
|
384 |
|
- |
|
385 |
//voir les abonnements presents dans les applis clientes
|
385 |
} elseif ($type_info=='abonnement') {
|
386 |
} elseif ($type_info=='abonnement') {
|
386 |
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
387 |
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
387 |
$res .= '<h2>'.INS_GESTION_DES_ABONNEMENTS.'</h2>'."\n" ;
|
388 |
$res .= '<h2>'.INS_GESTION_DES_ABONNEMENTS.'</h2>'."\n" ;
|
- |
|
389 |
|
- |
|
390 |
// Appel des actions d'abonnement des applications clientes
|
- |
|
391 |
$d = dir(GEN_CHEMIN_CLIENT);
|
- |
|
392 |
$abonnement='';
|
- |
|
393 |
$abonnements='';
|
- |
|
394 |
while (false !== ($repertoire = $d->read())) {
|
388 |
include_once PAP_CHEMIN_RACINE.'client/bazar/configuration/baz_config.inc.php' ;
|
395 |
if (file_exists(GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.'bibliotheque'.GEN_SEP.$repertoire.'.abonnement.inc.php')) {
|
389 |
include_once PAP_CHEMIN_RACINE.'client/bazar/bibliotheque/bazar.fonct.php' ;
|
396 |
require_once GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.'bibliotheque'.GEN_SEP.$repertoire.'.abonnement.inc.php' ;
|
390 |
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
|
397 |
$abonnements .= $abonnement;
|
- |
|
398 |
}
|
- |
|
399 |
}
|
- |
|
400 |
$d->close();
|
391 |
$res .= baz_s_inscrire();
|
401 |
$res .= $abonnements;
|
392 |
|
402 |
|
- |
|
403 |
//voir les actus
|
393 |
} elseif ($type_info=='actus') {
|
404 |
} elseif ($type_info=='actus') {
|
- |
|
405 |
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
394 |
$res = '<h1>'.INS_ACTUALITES_DEPOSEES.'</h1>'."\n" ;
|
406 |
$res .= '<h2>'.INS_ACTUALITES_DEPOSEES.'</h2>'."\n" ;
|
- |
|
407 |
require_once GEN_CHEMIN_CLIENT.'bazar'.GEN_SEP.'configuration'.GEN_SEP.'baz_config.inc.php';
|
395 |
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
|
408 |
require_once GEN_CHEMIN_CLIENT.'bazar'.GEN_SEP.'bibliotheque'.GEN_SEP.'bazar.fonct.rss.php';
|
- |
|
409 |
$_GET['action']=1;
|
- |
|
410 |
$res .= RSSversHTML(gen_RSS('', '', $id, 1, ''), 0, 'jma', 0);
|
- |
|
411 |
|
- |
|
412 |
//voir les ressources
|
396 |
} elseif ($type_info=='ressources') {
|
413 |
} elseif ($type_info=='ressources') {
|
- |
|
414 |
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
397 |
$res = '<h1>'.INS_RESSOURCES_ASSOCIEES.'</h1>'."\n" ;
|
415 |
$res .= '<h2>'.INS_RESSOURCES_ASSOCIEES.'</h2>'."\n" ;
|
- |
|
416 |
$requete = 'SELECT bf_id_fiche, bf_titre FROM bazar_fiche, bazar_appropriation WHERE ba_ce_id_fiche=bf_id_fiche AND ba_ce_id_structure='.$id ;
|
- |
|
417 |
$resultat = $GLOBALS['ins_db'] -> query($requete) ;
|
- |
|
418 |
$res .= '<ul>'."\n";
|
398 |
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
|
419 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
- |
|
420 |
$res .= '<li><a href="'.INS_URL_BAZAR.'&action=8&id_fiche='.$ligne['bf_id_fiche'].'" onclick="window.open(this.href,\'_blank\');return false;">'.$ligne['bf_titre'].'</a></li>'."\n";
|
- |
|
421 |
}
|
- |
|
422 |
$res .= '</ul><br />'."\n";
|
- |
|
423 |
|
- |
|
424 |
//voir les competences
|
399 |
} elseif ($type_info=='competences') {
|
425 |
} elseif ($type_info=='competences') {
|
400 |
$res = '<h1>'.INS_COMPETENCES_ASSOCIEES.'</h1>'."\n" ;
|
426 |
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
|
401 |
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
|
427 |
$res .= '<h2>'.INS_COMPETENCES_ASSOCIEES.'</h2>'."\n" ;
|
402 |
}
|
428 |
}
|
403 |
return $res ;
|
429 |
return $res ;
|
404 |
}
|
430 |
}
|
Line 689... |
Line 715... |
689 |
}
|
715 |
}
|
Line 690... |
Line 716... |
690 |
|
716 |
|
691 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
717 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
692 |
*
|
718 |
*
|
- |
|
719 |
* $Log: not supported by cvs2svn $
|
- |
|
720 |
* Revision 1.16 2006/04/11 08:41:41 alexandre_tb
|
- |
|
721 |
* Ajout du champs nom wiki dans le formulaire si la constante INS_GENERE_NOM_WIKI n'est pas activé
|
693 |
* $Log: not supported by cvs2svn $
|
722 |
*
|
694 |
* Revision 1.15 2006/04/10 14:01:36 florian
|
723 |
* Revision 1.15 2006/04/10 14:01:36 florian
|
695 |
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
|
724 |
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
|
696 |
*
|
725 |
*
|
697 |
* Revision 1.14 2006/04/04 12:23:05 florian
|
726 |
* Revision 1.14 2006/04/04 12:23:05 florian
|