diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 10:05:02 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 10:05:02 +0200 |
commit | 71b503f07007346eda3d1da71d4a64f31f13d846 (patch) | |
tree | 3d1aaa880857eb05e7e9c1f2d75f309507dd9c07 /appli_3_alpha_old/sendmail.php | |
parent | 756f0fa75c7d8e18188dffdfbdd4416651dca9fe (diff) | |
download | 2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.gz 2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.bz2 2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.zip |
Prmère version alpha 2007-02-03+09:07:04 - 2007-02-06+12:19:50
Diffstat (limited to 'appli_3_alpha_old/sendmail.php')
-rw-r--r-- | appli_3_alpha_old/sendmail.php | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/appli_3_alpha_old/sendmail.php b/appli_3_alpha_old/sendmail.php new file mode 100644 index 0000000..e739884 --- /dev/null +++ b/appli_3_alpha_old/sendmail.php @@ -0,0 +1,138 @@ +<?php +require('include/ludo/session_verify.inc.php'); +require_once('include/ludo/html_elements.inc.php'); +require_once('include/connect.inc.php'); + + + +generate_html_doctype_and_head("Envoi de courriel"); +echo "<body>\n"; +generate_html_divs_menu(); +?> + <div id="sous_menu"> + <p class="arbre"> + > <a href="index.php">Accueil</a> + > <a href="index.php">Réunions</a> + > Envoi de courriel + </p> + </div> +<?php generate_html_div_help(); +if( isset($_GET['envoi']) ) +{ + // TODO : code d'envoi + echo '<div id="contenu"><pre>'; + print_r($_REQUEST); + echo '</div></body></html>'; + exit(); +} + +if( isset($_GET['idR']) ) +{ + $idR=addslashes($_GET['idR']); +} +else +{ + $errmsg=""; +} + +$result = mysql_query("SELECT idL FROM Reunion WHERE idR='$idR'"); +if (mysql_num_rows($result)===1) +{ + list($idL) = mysql_fetch_array($result); +} +else +{ + $errmsg=""; +} + + +if ( isset($errmsg) ) + { + echo '<div id="contenu">' . $errmsg .'</div></body></html>'; + exit(); + } + +?> + + <div id="contenu"> + <form id="formmail" action="sendmail.php" method="get" onsubmit="return dataListe('participants','dataParticipants');"> + <table> + <tbody> + <tr> + <td>Contacts disponibles</td> + <td> </td> + <td>Destinataires</td> + </tr> + <tr> + <td> + <select name="contactDispo" size="10" id="contactDispo"> +<?php + $personnes = array(); + $req = 'SELECT P.idP , P.courrielP , P.nomP , P.prenomP FROM Personne P, Appartenir A WHERE P.idP=A.idP AND A.idL=' . $idL; + $result = mysql_query($req) ; + + if (mysql_num_rows($result)>0) + { + for($i=0;$i<mysql_num_rows($result);$i++) + { + list($idP, $courrielP, $nomP, $prenomP) = mysql_fetch_array($result); + $personnes[$idP]=array($courrielP, $nomP, $prenomP); + echo '<option value="'.$idP.'" onDblClick="addPers(this.form);">'; + echo $nomP . " " . $prenomP; + echo "</option>\n"; + } + } +?> + </select> + </td> + <td> + <input name="AjouterParticipant" id="AjouterParticipant" value="Ajouter" onclick="addPers(this.form);" type="button" /> + <br /> + <br /> + <input name="supprimerParticipant" id="supprimerParticipant" value="Retirer" onclick="removePers(this.form);" type="button" /> + </td> + <td> + <select name="participants" size="10" id="participants"> +<?php + foreach( $personnes as $idP=>$p) + { + if ( isset($_GET['mail_idP' . $idP] ) ) + { + echo '<option value="'.$idP.'" onDblClick="addPers(this.form);">'; + echo $p[1] . " " . $p[2]; + echo "</option>\n"; + } + } +?> + </select> + </td> + </tr> + </tbody> + </table> + <div> + Modèle : +<?php + echo '<select name="modelsList" id="modelsList" onchange="loadlist(\'include/ludo/mail_textarea.php?idR='; + echo $idR . "&model=','modelsList','divMsg');\">\n"; +?> + <option value="empty">Vierge</option> + <option value="cree">Nouvelle Réunion</option> + <option value="modif">Réunion modifiée</option> + <option value="annul">Réunion annulée</option> + <option value="fixee">Réunion fixée</option> + </select> + </div> + <div> + Objet : <input name="msgObject" type="text" size="40" value="AWOR : Courriel de notification" /> + <div id='divMsg'> +<?php include 'include/ludo/mail_textarea.php'; ?> + </div> + <div> + <input name="envoi" type="hidden" value="1" /> + <input type="submit" value="Envoyer" /> + </div> + </form> + </div> +</body> +</html> + |