60 lines
2.1 KiB
PHP
60 lines
2.1 KiB
PHP
<h2>Contact</h2>
|
|
<p>Vous voulez me spammer ? Heu, me contacter ? Laissez-moi un gentil mot :)</p>
|
|
|
|
|
|
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="POST">
|
|
<div>
|
|
<!-- Token CSRF -->
|
|
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($_SESSION['csrf_token']); ?>">
|
|
<!-- pour les bots -->
|
|
<input type="hidden" name="try" value="send">
|
|
<input type="hidden" name="nobotv" value="<?php echo $nobot; ?>">
|
|
<!-- Si j'ajoute "required", ça foire pour demander à changer de question... donc on va faire sans, de toute façon c'est ensuite testé par php. -->
|
|
<div>
|
|
<label for="name"><?php echo $txt['name']; ?></label>
|
|
<input type="text" id="name" name="name" placeholder="Nom">
|
|
</div>
|
|
<div>
|
|
<label for="email"><?php echo $txt['mail']; ?></label>
|
|
<input type="email" id="email" name="email" placeholder="Courriel">
|
|
</div>
|
|
<div>
|
|
<label for="subject"><?php echo $txt['subject']; ?></label>
|
|
<input type="text" id="subject" name="subject" placeholder="Titre du message">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="message"><?php echo $txt['message']; ?></label>
|
|
<textarea id="message" name="message" rows="6" cols="50" placeholder="Entrer votre message"></textarea>
|
|
</div>
|
|
<!-- Antibot -->
|
|
<div>
|
|
<input id="nobotc" type="checkbox" name="nobotc" value="<?php echo md5($nobot); ?>" />
|
|
|
|
<label for="nobotc"><?php echo $txt['human']; ?></label>
|
|
<p style="position: absolute; visibility: hidden; left: -5000; top: -5000">
|
|
<input id="nobots" type="checkbox" name="nobots" value="<?php echo time(); ?>" />
|
|
<label for="nobots"><?php echo $txt['bot']; ?></label>
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Questions -->
|
|
<div>
|
|
<div>
|
|
<label for="answer"><?php echo htmlspecialchars($current_question); ?></label>
|
|
</div>
|
|
<div>
|
|
<input type="text" id="answer" name="answer">
|
|
</div>
|
|
</div>
|
|
<!-- Envoyer -->
|
|
<div>
|
|
<ul class="actions">
|
|
<li><input type="submit" name="new_question" value="Demander une autre question"></li>
|
|
<li><input type="submit" name="submit_form" class="primary" value="<?php echo $txt['submit_button']; ?>"></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|