www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 1e821cba435487ea6db7c6333dafb76b9fbfed56
parent 6ec5fb736e377fc9e3c353f744fb9037cd2ff12c
Author: Yoann Bonavero <yoann.b87@voila.fr>
Date:   Wed, 23 Feb 2011 11:36:31 +0100

Continuation de la page de contact.

Diffstat:
Mcode/serveur/php/contact.php | 19+++++++++++--------
Mcode/serveur/php/ressources/simple.css | 14+++++++++-----
2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/code/serveur/php/contact.php b/code/serveur/php/contact.php @@ -2,6 +2,7 @@ session_start(); $displayForm = true; +$emailaddress = ""; if(isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'])) if(!empty($_POST['email']) && !empty($_POST['subject']) && !empty($_POST['message'])) @@ -11,7 +12,7 @@ if(isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'] $header = 'From: '.$from . "\r\n" . 'Reply-To: '.$from . "\r\n" . 'X-Mailer: PHP/' . phpversion(); - $dest = $EmailAddress; + $dest = $emailaddress; $message = str_replace("\r\n","\n",$_POST['message']); if(mail($dest,$subject,$message,$header)) @@ -42,17 +43,18 @@ if(isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'] <?php include("ressources/menu.html"); ?> </div> <div class="content"> + <?php if(isset($notif)) - if($dspForm == true) - echo '<span class="warning">'.$notif.'</span>'; + if($displayForm == true) + echo '<span class="message warning">'.$notif.'</span>'; else - echo '<span class="notifOK">'.$notif.'</span>'; + echo '<span class="message success">'.$notif.'</span>'; - if($dspForm == true) + if($displayForm == true) { ?> <form action="contact.php" method="POST"> - <table class="formTbl1"> + <table class="contacttbl"> <tr> <td> <label for="email">Votre e-mail : </label> @@ -63,10 +65,10 @@ if(isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'] </tr> <tr> <td> - <label for="sujet">Objet du mail : </label> + <label for="subject">Objet du mail : </label> </td> <td> - <input type="text" id="sujet" name="sujet" /> + <input type="text" id="subject" name="subject" /> </td> </tr> <tr> @@ -86,6 +88,7 @@ if(isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'] </form> <?php } + ?> </div> <div class="footer"> <?php include("ressources/footer.html"); ?> diff --git a/code/serveur/php/ressources/simple.css b/code/serveur/php/ressources/simple.css @@ -43,21 +43,26 @@ margin-left : 2%; } -.logintbl { +.logintbl, .contacttbl { margin-left : 4%; } -.logintbl td { +.logintbl td, .contactbl td { text-align : right; padding-left : 5px; padding-right : 5px; } -.logintbl input[type=submit]{ +.logintbl input[type=submit], .contacttbl input[type=submit]{ display : block; margin : auto; } +.contacttbl textarea { + width : 200%; + height : 200px; +} + html, body { padding: 0; margin: 0; @@ -138,4 +143,4 @@ h2#tache-description { .success { border : 1px dashed red; background-color : #90FF90 -} -\ No newline at end of file +}