//Autres auteurs : *@author Jean-Pascal MILCENT *@copyright Tela-Botanica 2000-2007 *@version $Id: annuaire.php,v 1.4 2005/03/24 08:24:39 alex Exp $ // +------------------------------------------------------------------------------------------------------+ */ // +------------------------------------------------------------------------------------------------------+ // | ENTETE du PROGRAMME | // +------------------------------------------------------------------------------------------------------+ include_once 'connect.php'; include_once 'configuration/car_config.inc.php' ; include_once CAR_CHEMIN_APPLI.'bibliotheque/annuaire.fonct.php' ; //================================================================================================ $GLOBALS['car_auth']->start(); /** * Renvoie le code HTML de l'application * * @return string HTML */ function afficherContenuCorps () { $res=""; if ($GLOBALS['car_auth']->getAuth()) { // Synchronisation avec l'identification d'origine if (!PARTICIPANT_EST_ADULTE) { $requete_participant = mysql_query("select PARTICIPANT_ID from PARTICIPANT where PARTICIPANT_PSEUDO LIKE '".addSlashes($_POST['username'])."' and PARTICIPANT_MOTDEPASSE LIKE '".$_POST['password']."' and PARTICIPANT_EN_ATTENTE=0 and PARTICIPANT_ADULTE=0"); } else { $requete_participant = mysql_query("select PARTICIPANT_ID from PARTICIPANT where PARTICIPANT_PSEUDO LIKE '".addSlashes($_POST['username'])."' and PARTICIPANT_MOTDEPASSE LIKE '".$_POST['password']."' and PARTICIPANT_EN_ATTENTE=0 and PARTICIPANT_ADULTE=1"); } $participant_ligne = mysql_fetch_row($requete_participant); if ($participant_ligne) { $_SESSION['participant'] = $participant_ligne[0]; } if($_GET[act] == 'logout') { // Synchronisation avec l'identification d'origine unset($_SESSION['participant']); // on déconnecte l'utilisateur $GLOBALS['car_auth']->logout(); $res .= 'Vous êtes présentement déconnecté. '."\n"; $res .= loginFunction(); } else { $check_pseudo=array_flip($GLOBALS['pseudo_annu']); if (isset($check_pseudo[$GLOBALS["car_auth"]->getUserName()])) { $res = '

'.CAR_TITRE.'

'."\n"; // on affiche la possibilité de se déconnecter $java ="\n"; $res .= $java; $res .= '

'.CAR_CLIQUEZ_LETTRE.'

'."\n"; // Nettoyage des variables du POST $cles = array('corps', 'titre_mail'); foreach ($cles as $cle) { if (isset($_POST[$cle]) && !empty($_POST[$cle])) { $_POST[$cle] = translittererCp1252VersIso88591(stripslashes($_POST[$cle])); } } // S'il y a un mail a envoyé, on l'envoie if (isset($_POST['select']) && is_array($_POST['select'])) { if (isset($_POST['corps']) && isset($_POST['titre_mail'])) { $res .= envoie_mail($_POST['select'], $_POST['titre_mail'], $_POST['corps']) ; } } $res .= parcourrirAnnu(); $res .= carto_texte_cocher(); $res .= carto_formulaire(); // On affiche la possibilité de se déconnecter //$res .= 'Connecté en tant que '.$GLOBALS['car_auth']->getUsername().'. '."\n"; //$res .= '
Se déconnecter
'."\n"; } else { $res .= "Non autorisé !"; } } } else { // Not authenticated $res .= loginFunction(); } return $res; } echo afficherContenuCorps(); ?>