Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 809 → Rev 810

/trunk/client/bottin/bibliotheque/inscription.fonct.php
19,8 → 19,8
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: inscription.fonct.php,v 1.14 2006-04-04 12:23:05 florian Exp $
// CVS : $Id: inscription.fonct.php,v 1.14 2006-04-04 12:23:05 florian Exp $
// CVS : $Id: inscription.fonct.php,v 1.15 2006-04-10 14:01:36 florian Exp $
// CVS : $Id: inscription.fonct.php,v 1.15 2006-04-10 14:01:36 florian Exp $
/**
* Fonctions du module inscription
*
32,8 → 32,8
//Autres auteurs :
*@author Florian Schmitt <florian@ecole-et-nature.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $
*@version $Revision: 1.15 $ $Date: 2006-04-10 14:01:36 $
*@version $Revision: 1.15 $ $Date: 2006-04-10 14:01:36 $
// +------------------------------------------------------------------------------------------------------+
*/
 
44,9 → 44,9
include_once 'inscription.fonct.wiki.php' ;
include_once 'inscription.class.php' ;
if (INS_UTILISE_SPIP) include_once 'inscription.fonct.spip.php' ;
require_once 'HTML/QuickForm.php' ;
require_once 'HTML/QuickForm/checkbox.php' ;
require_once 'HTML/QuickForm/password.php' ;
//require_once 'HTML/QuickForm.php' ;
//require_once 'HTML/QuickForm/checkbox.php' ;
//require_once 'HTML/QuickForm/password.php' ;
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
86,7 → 86,7
$url = str_replace ('&amp;', '&', $GLOBALS['ins_url']->getURL()) ;
}
require_once "HTML/Template/IT.php";
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/Template/IT.php';
$tpl = new HTML_Template_IT() ;
// Le gabarit du mail est dans un template
// template 2
127,12 → 127,12
function AUTH_formulaire_login() {
 
require_once "HTML/Template/IT.php";
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/Template/IT.php';
$tpl = new HTML_Template_IT() ;
// Le formulaire pour se logguer est dans un template
// template 1
$requete = 'select it_template from inscription_template where it_id_template=1'.
' and it_i18n like "%'.INS_LANGUE_DEFAUT.'"' ;
$requete = 'SELECT it_template FROM inscription_template WHERE it_id_template=1'.
' AND it_i18n LIKE "%'.INS_LANGUE_DEFAUT.'"' ;
if (!$tpl -> setTemplate($GLOBALS['ins_db']->getOne ($requete))) {
echo 'erreur' ;
319,7 → 319,7
*
* @return text Code HTML de la fiche
*/
function info($id=-1) {
function info($id=-1, $type_info='fiche') {
if ($id==-1) $id=$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);
$requete = 'SELECT * FROM '.INS_ANNUAIRE.' WHERE '.INS_ANNUAIRE.'.'
.INS_CHAMPS_ID.'="'.$id.'"' ;
329,51 → 329,71
}
 
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) {
$res = '<h1>'.INS_FICHE_STRUCTURE.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
$res .= '<ul class="affiche_infos">'."\n";
$res .= ligne_inscription(INS_SIGLE_DE_LA_STRUCTURE, $ligne[INS_CHAMPS_SIGLE_STRUCTURE]) ;
if (INS_CHAMPS_NUM_AGREMENT != '') $res .= ligne_inscription(INS_NUM_AGREMENT, $ligne[INS_CHAMPS_NUM_AGREMENT]) ;
} else {
$res = '<h1>'.INS_FICHE_PERSONNELLE.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
$res .= '<ul class="affiche_infos">'."\n";
}
$res .= ligne_inscription(INS_ADRESSE_1, $ligne[INS_CHAMPS_ADRESSE_1]) ;
$res .= ligne_inscription(INS_ADRESSE_2, $ligne[INS_CHAMPS_ADRESSE_2]) ;
$res .= ligne_inscription(INS_CODE_POSTAL, $ligne[INS_CHAMPS_CODE_POSTAL]) ;
$res .= ligne_inscription(INS_VILLE, $ligne[INS_CHAMPS_VILLE]) ;
$pays = new ListeDePays($GLOBALS['ins_db']) ;
$res .= ligne_inscription(INS_PAYS, $pays->getNomPays($ligne[INS_CHAMPS_PAYS], INS_LANGUE_DEFAUT)) ;
$res .= ligne_inscription(INS_TELEPHONE, $ligne[INS_CHAMPS_TELEPHONE]) ;
$res .= ligne_inscription(INS_FAX, $ligne[INS_CHAMPS_FAX]) ;
if (INS_UTILISE_WIKINI) {
$res .= ligne_inscription (INS_NOM_WIKI, $ligne[INS_CHAMPS_NOM_WIKINI]) ;
}
if ($GLOBALS['AUTH']->getAuth()) $res .= ligne_inscription(INS_EMAIL, '<a href="mailto:'.$ligne[INS_CHAMPS_MAIL].'">'.$ligne[INS_CHAMPS_MAIL].'</a>');
else $res .= '<br /><p class="zone_info">'.INS_PAS_IDENTIFIE.'</p>'."\n";
if ($ligne[INS_CHAMPS_SITE_INTERNET]!='') {
$res .= ligne_inscription(INS_SITE_INTERNET, '<a href="'.$ligne[INS_CHAMPS_SITE_INTERNET].'" onclick="javascript:window.open(this.href);return false;">'.$ligne[INS_CHAMPS_SITE_INTERNET].'</a>');
}
$res .= '</ul>'."\n";
if ($id==$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID)) {
$res .= '<br />'."\n";
$res .= '<ul>'."\n";
if ($ligne[INS_CHAMPS_VISIBLE] == 1) {
$res .= '<li>'.INS_VOUS_APPARAISSEZ.'</li>'."\n";
} else $res .= '<li>'.INS_VOUS_APPARAISSEZ_PAS.'</li>'."\n";
if ($ligne[INS_CHAMPS_LETTRE] == 1) {
$res .= '<li>'.INS_VOUS_RECEVEZ_LETTRE.'</li>'."\n";
} else $res .= '<li>'.INS_VOUS_RECEVEZ_PAS_LETTRE.'</li>'."\n";
//cas de la présentation de la fiche
if ($type_info=='fiche') {
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) {
$res = '<h1>'.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
$res .= '<h2>'.INS_FICHE_STRUCTURE.'</h2>'."\n" ;
$res .= '<ul class="affiche_infos">'."\n";
$res .= ligne_inscription(INS_SIGLE_DE_LA_STRUCTURE, $ligne[INS_CHAMPS_SIGLE_STRUCTURE]) ;
if (INS_CHAMPS_NUM_AGREMENT != '') $res .= ligne_inscription(INS_NUM_AGREMENT, $ligne[INS_CHAMPS_NUM_AGREMENT]) ;
} else {
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
$res .= '<h2>'.INS_FICHE_PERSONNELLE.'</h2>'."\n" ;
$res .= '<ul class="affiche_infos">'."\n";
}
$res .= ligne_inscription(INS_ADRESSE_1, $ligne[INS_CHAMPS_ADRESSE_1]) ;
$res .= ligne_inscription(INS_ADRESSE_2, $ligne[INS_CHAMPS_ADRESSE_2]) ;
$res .= ligne_inscription(INS_CODE_POSTAL, $ligne[INS_CHAMPS_CODE_POSTAL]) ;
$res .= ligne_inscription(INS_VILLE, $ligne[INS_CHAMPS_VILLE]) ;
$pays = new ListeDePays($GLOBALS['ins_db']) ;
$res .= ligne_inscription(INS_PAYS, $pays->getNomPays($ligne[INS_CHAMPS_PAYS], INS_LANGUE_DEFAUT)) ;
$res .= ligne_inscription(INS_TELEPHONE, $ligne[INS_CHAMPS_TELEPHONE]) ;
$res .= ligne_inscription(INS_FAX, $ligne[INS_CHAMPS_FAX]) ;
if (INS_UTILISE_WIKINI) {
$res .= ligne_inscription (INS_NOM_WIKI, $ligne[INS_CHAMPS_NOM_WIKINI]) ;
}
if ($ligne[INS_CHAMPS_SITE_INTERNET]!='') {
$res .= ligne_inscription(INS_SITE_INTERNET, '<a href="'.$ligne[INS_CHAMPS_SITE_INTERNET].'" onclick="javascript:window.open(this.href);return false;">'.$ligne[INS_CHAMPS_SITE_INTERNET].'</a>');
}
if ($GLOBALS['AUTH']->getAuth()) $res .= ligne_inscription(INS_EMAIL, '<a href="mailto:'.$ligne[INS_CHAMPS_MAIL].'">'.$ligne[INS_CHAMPS_MAIL].'</a>');
else $res .= '<br /><p class="zone_info">'.INS_PAS_IDENTIFIE.'</p>'."\n";
$res .= '</ul>'."\n";
$res .= '<br />'."\n";
$res .= '<ul>'."\n";;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=modifier&amp;form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=supprimer&amp;form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ;
$res .= '</ul>'."\n";
if ($id==$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID)) {
$res .= '<br />'."\n";
$res .= '<ul>'."\n";
if ($ligne[INS_CHAMPS_VISIBLE] == 1) {
$res .= '<li>'.INS_VOUS_APPARAISSEZ.'</li>'."\n";
} else $res .= '<li>'.INS_VOUS_APPARAISSEZ_PAS.'</li>'."\n";
if ($ligne[INS_CHAMPS_LETTRE] == 1) {
$res .= '<li>'.INS_VOUS_RECEVEZ_LETTRE.'</li>'."\n";
} else $res .= '<li>'.INS_VOUS_RECEVEZ_PAS_LETTRE.'</li>'."\n";
$res .= '</ul>'."\n";
$res .= '<br />'."\n";
$res .= '<ul>'."\n";;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=modifier&amp;form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=supprimer&amp;form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ;
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&amp;action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ;
$res .= '</ul>'."\n";
}
} elseif ($type_info=='abonnement') {
$res = '<h1>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h1>'."\n";
$res .= '<h2>'.INS_GESTION_DES_ABONNEMENTS.'</h2>'."\n" ;
include_once PAP_CHEMIN_RACINE.'client/bazar/configuration/baz_config.inc.php' ;
include_once PAP_CHEMIN_RACINE.'client/bazar/bibliotheque/bazar.fonct.php' ;
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
$res .= baz_s_inscrire();
} elseif ($type_info=='actus') {
$res = '<h1>'.INS_ACTUALITES_DEPOSEES.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
} elseif ($type_info=='ressources') {
$res = '<h1>'.INS_RESSOURCES_ASSOCIEES.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
} elseif ($type_info=='competences') {
$res = '<h1>'.INS_COMPETENCES_ASSOCIEES.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
}
return $res ;
}
666,6 → 686,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.14 2006/04/04 12:23:05 florian
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
*
* Revision 1.13 2006/03/21 10:25:33 alexandre_tb
* ajout d'un template pour le mail de confirmation
*