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: annuaire.fonct.php,v 1.3 2005-03-24 08:24:29 alex Exp $
|
22 |
// CVS : $Id: annuaire.fonct.php,v 1.4 2005-06-03 11:26:51 alex Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Fonctions du module annuaire
|
24 |
* Fonctions du module annuaire
|
25 |
*
|
25 |
*
|
26 |
* Fonctions du module annuaire
|
26 |
* Fonctions du module annuaire
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Aucun
|
32 |
*@author Aucun
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.3 $
|
34 |
*@version $Revision: 1.4 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 84... |
Line 84... |
84 |
// si une lettre est selectionne
|
84 |
// si une lettre est selectionne
|
85 |
if (!empty($_REQUEST['lettre'])) {
|
85 |
if (!empty($_REQUEST['lettre'])) {
|
86 |
$requete = "SELECT ".ANN_ANNUAIRE.".* from ".ANN_ANNUAIRE." WHERE";
|
86 |
$requete = "SELECT ".ANN_ANNUAIRE.".* from ".ANN_ANNUAIRE." WHERE";
|
87 |
if ($_REQUEST['lettre'] != "tous") $requete .= " ".ANN_CHAMPS_NOM." LIKE \"".$_REQUEST['lettre']."%\"" ;
|
87 |
if ($_REQUEST['lettre'] != "tous") $requete .= " ".ANN_CHAMPS_NOM." LIKE \"".$_REQUEST['lettre']."%\"" ;
|
88 |
$requete .= " ORDER BY ".ANN_CHAMPS_NOM ;
|
88 |
$requete .= " ORDER BY ".ANN_CHAMPS_NOM ;
|
89 |
|
- |
|
- |
|
89 |
isset ($_POST['titre']) ? $titre = $_POST['titre'] : $titre = '' ;
|
- |
|
90 |
isset ($_POST['corps']) ? $corps = $_POST['corps'] : $corps = '' ;
|
90 |
$res .= listes_inscrit ($requete, $GLOBALS['ann_url']->getURL(), $select, '', $GLOBALS['ann_db'], $niveau = 'pays').carto_texte_cocher().
|
91 |
$res .= listes_inscrit ($requete, $GLOBALS['ann_url']->getURL(), '', '', $GLOBALS['ann_db'], $niveau = 'pays').carto_texte_cocher().
|
91 |
carto_formulaire($_POST['titre'], $_POST['corps']) ;
|
92 |
carto_formulaire($titre, $corps) ;
|
92 |
}
|
93 |
}
|
93 |
return $res ;
|
94 |
return $res ;
|
94 |
}
|
95 |
}
|
Line 95... |
Line 96... |
95 |
|
96 |
|
Line 147... |
Line 148... |
147 |
}
|
148 |
}
|
Line 148... |
Line 149... |
148 |
|
149 |
|
149 |
|
150 |
|
150 |
function carto_formulaire ($titre_mail="", $corps = "") {
|
151 |
function carto_formulaire ($titre_mail="", $corps = "") {
|
151 |
global $HTTP_USER_AGENT ;
|
152 |
global $HTTP_USER_AGENT ;
|
152 |
$res .= "<div class=\"chapo\">".ANN_ENVOYER_MAIL."</div>\n";
|
153 |
$res = "<div class=\"chapo\">".ANN_ENVOYER_MAIL."</div>\n";
|
153 |
$res .= "<div>\n<table border=\"0\">\n"
|
154 |
$res .= "<div>\n<table border=\"0\">\n"
|
154 |
.'<tr><td class="texte">'.ANN_SUJET.' :</td>'."\n"
|
155 |
.'<tr><td class="texte">'.ANN_SUJET.' :</td>'."\n"
|
155 |
.'<td><input class="forml" type="text" name="titre_mail" size="60" value="'.$GLOBALS['titre_mail'].'"></td>'."\n"
|
156 |
.'<td><input class="forml" type="text" name="titre_mail" size="60" value="'.$titre_mail.'"></td>'."\n"
|
156 |
.'</tr><tr><td class="texte" valign="top">'.ANN_MESSAGE.' : </td>'."\n"
|
157 |
.'</tr><tr><td class="texte" valign="top">'.ANN_MESSAGE.' : </td>'."\n"
|
157 |
.'<td><textarea class="forml" name="corps" rows="5" cols="60">'.$GLOBALS['corps'].'</textarea></td>'."\n"
|
158 |
.'<td><textarea class="forml" name="corps" rows="5" cols="60">'.$corps.'</textarea></td>'."\n"
|
158 |
.'</tr><tr><td></td><td align="center">';
|
159 |
.'</tr><tr><td></td><td align="center">';
|
159 |
if (ereg ("Gecko",$HTTP_USER_AGENT)) {
|
160 |
if (ereg ("Gecko",$HTTP_USER_AGENT)) {
|
160 |
$res.='<input class="spip_bouton" type="submit" value="'.ANN_ENVOYER.'">';
|
161 |
$res.='<input class="spip_bouton" type="submit" value="'.ANN_ENVOYER.'">';
|
Line 171... |
Line 172... |
171 |
*
|
172 |
*
|
172 |
* @return string HTML
|
173 |
* @return string HTML
|
173 |
*/
|
174 |
*/
|
Line 174... |
Line 175... |
174 |
|
175 |
|
175 |
function carto_texte_cocher () {
|
176 |
function carto_texte_cocher () {
|
176 |
$res .= '<div class="texte">'.ANN_CHECK_UNCHECK ;
|
177 |
$res = '<div class="texte">'.ANN_CHECK_UNCHECK ;
|
177 |
$res .= " <input type=\"checkbox\" name=\"selecttotal\" onclick=\"javascript:setCheckboxes('formmail');\"></div>";
|
178 |
$res .= " <input type=\"checkbox\" name=\"selecttotal\" onclick=\"javascript:setCheckboxes('formmail');\"></div>";
|
178 |
return $res ;
|
179 |
return $res ;
|
Line 204... |
Line 205... |
204 |
}
|
205 |
}
|
Line 205... |
Line 206... |
205 |
|
206 |
|
206 |
$_POST['corps'] .= "\n----------------------------------------------------------------------------";
|
207 |
$_POST['corps'] .= "\n----------------------------------------------------------------------------";
|
Line 207... |
Line 208... |
207 |
$_POST['corps'] .= "\n".ANN_MESSAGE_ENVOYE_A." :\n $liste" ;
|
208 |
$_POST['corps'] .= "\n".ANN_MESSAGE_ENVOYE_A." :\n $liste" ;
|
208 |
|
209 |
|
209 |
mail (CAR_MAIL_ADMIN, stripslashes($_POST['titre_mail']), $_POST['corps'], $entete);
|
210 |
mail (ANN_MAIL_ADMIN, stripslashes($_POST['titre_mail']), $_POST['corps'], $entete);
|
210 |
$_POST['corps'] = '';
|
211 |
$_POST['corps'] = '';
|
211 |
$_POST['titre_mail'] = '';
|
212 |
$_POST['titre_mail'] = '';
|
Line 212... |
Line 213... |
212 |
return '<div>'.ANN_MAIL_ENVOYER.'</div>' ;
|
213 |
return '<div>'.ANN_MAIL_ENVOYER.'</div>' ;
|
213 |
}
|
214 |
}
|
214 |
|
215 |
|
- |
|
216 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
217 |
*
|
- |
|
218 |
* $Log: not supported by cvs2svn $
|
215 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
219 |
* Revision 1.3 2005/03/24 08:24:29 alex
|
216 |
*
|
220 |
* --
|
217 |
* $Log: not supported by cvs2svn $
|
221 |
*
|
218 |
* Revision 1.2 2005/01/06 15:18:31 alex
|
222 |
* Revision 1.2 2005/01/06 15:18:31 alex
|
219 |
* modification de la fonction de formulaire d'authentification
|
223 |
* modification de la fonction de formulaire d'authentification
|