contactphpantibot/form_struct.php

41 lines
2.1 KiB
PHP

<h2>Contact</h2>
<p>Vous voulez me spammer ? Heu, me contacter ? Laissez-moi un gentil mot :)</p>
<form action="form.php" method="POST">
<!-- Token CSRF -->
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($_SESSION['csrf_token']); ?>">
<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. -->
<label for="name"><?php echo $txt['name']; ?></label>
<input type="text" id="name" name="name"><br><br>
<label for="email"><?php echo $txt['mail']; ?></label>
<input type="email" id="email" name="email" ><br><br>
<label for="subject"><?php echo $txt['subject']; ?></label>
<input type="text" id="subject" name="subject" ><br><br>
<label for="message"><?php echo $txt['message']; ?></label><br>
<textarea id="message" name="message" rows="4" cols="50" ></textarea><br><br>
<h3>Mesure anti spambot</h3>
<p>Parce que je n'aime pas le spam, je n'aime pas les messages douteux, et j'aime pas trop qu'on me cause en fait. Attention à vos réponses, je vous bannis de mes serveurs si vous êtes méchants. </p>
<!-- Questions -->
<p><label for="answer"><?php echo htmlspecialchars($current_question); ?></label>
<input type="text" id="answer" name="answer"><input type="submit" name="new_question" value="Demander une autre question">
</p>
<!-- Antibot -->
<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">
<br><input id="nobots" type="checkbox" name="nobots" value="<?php echo time(); ?>" />
<label for="nobots"><?php echo $txt['bot']; ?></label>
</p>
<br><br>
<input type="submit" name="submit_form" value="<?php echo $txt['submit_button']; ?>">
</form>