Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 804 → Rev 805

/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.13 2006-03-21 10:25:33 alexandre_tb Exp $
// CVS : $Id: inscription.fonct.php,v 1.13 2006-03-21 10:25:33 alexandre_tb Exp $
// 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 $
/**
* Fonctions du module inscription
*
30,10 → 30,10
//Auteur original :
*@author Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@author Florian Schmitt <florian@ecole-et-nature.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.13 $ $Date: 2006-03-21 10:25:33 $
*@version $Revision: 1.13 $ $Date: 2006-03-21 10:25:33 $
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $
// +------------------------------------------------------------------------------------------------------+
*/
 
42,10 → 42,11
// +------------------------------------------------------------------------------------------------------+
 
include_once 'inscription.fonct.wiki.php' ;
include_once 'inscription.class.php' ;
if (INS_UTILISE_SPIP) include_once 'inscription.fonct.spip.php' ;
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm.php' ;
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/checkbox.php' ;
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/password.php' ;
require_once 'HTML/QuickForm.php' ;
require_once 'HTML/QuickForm/checkbox.php' ;
require_once 'HTML/QuickForm/password.php' ;
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
199,7 → 200,7
$requete = 'update '.INS_ANNUAIRE.' set '.
requete_annuaire ($valeur).
'where '.INS_CHAMPS_ID.'="'.$id.'"';
$resultat = $GLOBALS['ins_db']->query ($requete) ;echo $requete;
$resultat = $GLOBALS['ins_db']->query ($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
225,7 → 226,7
if (!isset ($valeur[$val])) $valeur[$val] = '' ;
}
 
$req .= INS_CHAMPS_NOM_WIKINI.'="'.$valeur['nom_wiki'].'", ' ;
//$req .= INS_CHAMPS_NOM_WIKINI.'="'.$valeur['nom_wiki'].'", ' ;
$req .= INS_CHAMPS_MAIL.'="'.addslashes($valeur['email']).'", ' ;
$req .= INS_CHAMPS_PASSE.'="'.md5($valeur['mot_de_passe']).'", '.
INS_CHAMPS_PAYS.'="'.addslashes($valeur['pays']).'", '.
303,7 → 304,7
$valeurs_par_defaut['fax'] = $ligne[INS_CHAMPS_FAX] ;
if (INS_CHAMPS_STRUCTURE != '') {
$valeurs_par_defaut['structure'] = $ligne[INS_CHAMPS_STRUCTURE] ;
$valeurs_par_defaut['type_structure'] = $ligne['a_type_structure'];
//$valeurs_par_defaut['type_structure'] = $ligne['a_type_structure'];
}
$valeurs_par_defaut['site'] = $ligne[INS_CHAMPS_SITE_INTERNET] ;
$valeurs_par_defaut['lettre'] = $ligne[INS_CHAMPS_LETTRE] ;
318,9 → 319,10
*
* @return text Code HTML de la fiche
*/
function info() {
function info($id=-1) {
if ($id==-1) $id=$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);
$requete = 'SELECT * FROM '.INS_ANNUAIRE.' WHERE '.INS_ANNUAIRE.'.'
.INS_CHAMPS_ID.'="'.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID).'"' ;
.INS_CHAMPS_ID.'="'.$id.'"' ;
$resultat = $GLOBALS['ins_db'] -> query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
330,13 → 332,13
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) {
$res = '<h1>'.INS_FICHE_STRUCTURE.'</h1>'."\n" ;
$res .= '<h2>'.$ligne[INS_CHAMPS_NOM].'</h2>'."\n";
$res .= '<dl class="affiche_infos">'."\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 .= '<dl class="affiche_infos">'."\n";
$res .= '<ul class="affiche_infos">'."\n";
}
$res .= ligne_inscription(INS_ADRESSE_1, $ligne[INS_CHAMPS_ADRESSE_1]) ;
347,30 → 349,32
$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]) ;
$res .= ligne_inscription('&nbsp;', '&nbsp;') ;
if (INS_UTILISE_WIKINI) {
$res .= ligne_inscription (INS_NOM_WIKI, $ligne[INS_CHAMPS_NOM_WIKINI]) ;
}
$res .= ligne_inscription(INS_EMAIL, $ligne[INS_CHAMPS_MAIL]);
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 .= '</dl>'."\n";
$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";
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";
}
return $res ;
}
 
386,9 → 390,9
return;
}
if (($label == '')or($label == '&nbsp;')) {
return '<dt>&nbsp;</dt>'."\n".'<dd>'.$valeur.'</dd>'."\n" ;
return '<li>'."\n".$valeur."\n".'</li>'."\n" ;
} else {
return '<dt>'.$label.' : </dt>'."\n".'<dd>'.$valeur.'</dd>'."\n" ;
return '<li>'."\n".'<strong>'.$label.' : </strong>'."\n".$valeur."\n".'</li>'."\n" ;
}
}
 
662,6 → 666,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.13 2006/03/21 10:25:33 alexandre_tb
* ajout d'un template pour le mail de confirmation
*
* Revision 1.12 2006/03/15 11:02:35 alexandre_tb
* ajout de l'insertion du prénom qui avait disparu
*