Rev 805 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php//vim: set expandtab tabstop=4 shiftwidth=4:// +-----------------------------------------------------------------------------------------------+// | PHP version 4.0 |// +-----------------------------------------------------------------------------------------------+// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |// +-----------------------------------------------------------------------------------------------+// | This source file is subject to version 2.0 of the PHP license, |// | that is bundled with this package in the file LICENSE, and is |// | available at through the world-wide-web at |// | http://www.php.net/license/2_02.txt. |// | If you did not receive a copy of the PHP license and are unable to |// | obtain it through the world-wide-web, please send a note to |// | license@php.net so we can mail you a copy immediately. |// +-----------------------------------------------------------------------------------------------+/****Page permettant l'affichage des informations de cartographie des inscrits**@package cartographie//Auteur original :*@author Alexandre GRANIER <alexandre@tela-botanica.org>//Autres auteurs :*@copyright Tela-Botanica 2000-2004*@version 03 mai 2004// +-----------------------------------------------------------------------------------------------+//// $Id: cartographie.fonct.php,v 1.1 2005-09-22 14:02:49 ddelon Exp $// FICHIER : $RCSfile: cartographie.fonct.php,v $// AUTEUR : $Author: ddelon $// VERSION : $Revision: 1.1 $// DATE : $Date: 2005-09-22 14:02:49 $*//** function carto_texte_cocher ()*** @return string HTML*/function carto_texte_cocher() {$res = "<div class=\"texte\">".INS_CHECK_UNCHECK ;$res .= " <input type=\"checkbox\" name=\"selecttotal\" onclick=\"javascript:setCheckboxes('formmail');\" /></div>";return $res ;}/** function carto_formulaire ()**** @return string HTML*/function carto_formulaire($titre_mail="", $corps="") {$res = "<br /><h2>".INS_ENVOYER_MAIL."</h2><br />\n";$res .= INS_SUJET.' :<br /><input class="forml" type="text" name="titre_mail" size="60" value="'.$titre_mail.'" /><br /><br />'."\n".INS_MESSAGE.' :<br /><textarea class="forml" name="corps" rows="5" cols="60">'.$corps.'</textarea><br />'."\n";$res.='<br /><input class="bouton" type="submit" onclick="javascript:confirmer();" value="'.INS_ENVOYER.'" /></form>'."\n";return $res ;}/*** Renvoie le code HTML de la liste des inscrits* en fonction de la requete passé en parametre** @return Renvoie le code HTML de la liste des inscrits*/function listes_inscrit($requete, $select, $url) {$res = '<form action="'.preg_replace('/&/', '&', $url).'&mailer=1&select="'.$select.'" method="post" name="formmail">'."\n"."<table id=\"table_outilsreseaux\" width=\"100%\">\n<colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead>\n<tr><td> </td>\n<td>".INS_NOM."</td>\n<td>".INS_PRENOM."</td>\n<td>".INS_DATE_INS."</td>\n<td>".INS_CODE_POSTAL."</td>\n<td>".INS_VILLE."</td>\n</tr></thead>\n";$resultat= $GLOBALS['ins_db']->query($requete);if (DB::isError($resultat)) {die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;}$indic=0;$i=1;while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {if ($indic==0) {$res.="<tr class=\"ligne_impaire\">\n";$indic=1;}else {$res.="<tr class=\"ligne_paire\">\n";$indic=0;}$res.="<td><input type=\"checkbox\" name=\"select[]\" value=\"".$ligne[INS_CHAMPS_MAIL]."\" /></td>\n<td>".$ligne[INS_CHAMPS_NOM]." </td>\n<td>".$ligne[INS_CHAMPS_PRENOM]." </td>\n<td>".date("d.m.Y", strtotime($ligne[INS_CHAMPS_DATE_INSCRIPTION]))." </td>\n<td>".$ligne[INS_CHAMPS_CODE_POSTAL]." </td>\n<td>".$ligne[INS_CHAMPS_VILLE]." </td>\n" ;$res .= "</tr>\n";}$res .= "</table>\n";return $res ;}/** envoie_mail()*** @return envoie l'email*/function carto_envoie_mail() {$requete = 'SELECT '.INS_CHAMPS_MAIL.' FROM '.INS_ANNUAIRE.' WHERE '.INS_CHAMPS_ID.'='.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);$resultat = $GLOBALS['ins_db']->query($requete);if (DB::isError($resultat)) {die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo());}$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);$entete = "From: <".$ligne[INS_CHAMPS_MAIL].">\n";$GLOBALS['corps'] .= INS_TEXTE_FIN_MAIL;$GLOBALS['corps'] = stripslashes($GLOBALS['corps']) ;$liste = "" ;foreach ($GLOBALS['select'] as $key => $value) {mail ($value, stripslashes($GLOBALS['titre_mail']), $GLOBALS['corps'] , $entete) ;$liste .= $value."\n" ;}$GLOBALS['corps'] .= "\n----------------------------------------------------------------------------";$GLOBALS['corps'] .= "\n".INS_MESSAGE_ENVOYE_A." :\n $liste" ;mail(INS_MAIL_ADMIN, stripslashes(INS_SURVEILLANCE_ENVOI_MAIL.$GLOBALS['titre_mail']), $GLOBALS['corps'], $entete);$GLOBALS['corps'] = '';$GLOBALS['titre_mail'] = '';}//-- Fin du code source ------------------------------------------------------------/** $Log: not supported by cvs2svn $* Revision 1.2 2005/09/22 13:30:49 florian* modifs pour compatibilité XHTML Strict + corrections de bugs (mais ya encore du boulot!!)** Revision 1.1 2004/12/15 13:30:20 alex* version initiale***/?>