diff options
author | citizenz7 <citizenz7@protonmail.com> | 2017-04-20 18:50:55 +0200 |
---|---|---|
committer | citizenz7 <citizenz7@protonmail.com> | 2017-04-20 18:50:55 +0200 |
commit | 5fd9fa480f302902328b81f912dd67ce378284f8 (patch) | |
tree | 66234843ae2857fda12442e4f7577c527d48977c /Html/contact.php | |
parent | ebe731862c7c741171138b1083906f391fc35aff (diff) | |
download | freetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.tar.xz freetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.zip |
V.1.4.6
Diffstat (limited to 'Html/contact.php')
-rw-r--r-- | Html/contact.php | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/Html/contact.php b/Html/contact.php new file mode 100644 index 0000000..58f7def --- /dev/null +++ b/Html/contact.php @@ -0,0 +1,152 @@ +<?php +require_once 'includes/config.php'; + +//Titre de la page +$pagetitle = 'Contactez-nous !'; + +//Stats : bbclone +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "bbclone/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); + +include_once 'includes/header.php'; +?> + +<body> + +<div id="container"> + + <?php + include_once 'includes/header-logo.php'; + include_once 'includes/nav.php'; + ?> + + <div id="body"> + <div id="content"> + + <?php + include_once 'includes/ariane.php'; + ?> + + +<?php +// Affichage : message envoyé ! +if(isset($_GET['action'])){ + echo '<div class="alert-msg rnd8 success">Votre message a bien été envoyé !<br />Nous y répondrons dès que possible !</div>'; +} +?> + +<?php +if(isset($_GET['wrong_code'])) { + echo '<br /><div class="alert-msg rnd8 error">Mauvais code anti-spam !</div>'; +} +?> + + +<?php +//if form has been submitted process it +if(isset($_POST['submit'])) { + + $name = html($_REQUEST["name"]); + $subject = html($_REQUEST["subject"]); + $message = nl2br(bbcode($_REQUEST["message"])); + $from = html($_REQUEST["from"]); + $verif_box = $_REQUEST["verif_box"]; + + + if($name ==''){ + $error[] = 'Veuillez entrer un pseudo.'; + } + + if($from ==''){ + $error[] = 'Veuillez entrer une adresse e-mail.'; + } + + if($subject ==''){ + $error[] = 'Veuillez préciser un sujet.'; + } + + if($message ==''){ + $error[] = 'Votre message est vide ?!?'; + } + + + if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']) { + if(!isset($error)) { + $message = "Nom: ".$name."\n".$message; + $message = "De: ".$from."\n".$message; + mail(SITEMAIL, 'Message depuis '.SITENAMELONG.' : '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from"); + header("Location: contact.php?action=ok"); + setcookie('tntcon',''); + } + } + + else { + $error[] = 'Mauvais code anti-spam!'; + } +} + + if(isset($error)) { + foreach($error as $error){ + echo '<div class="alert-msg rnd8 error">'.$error.'</div>'; + } + } +?> + +<h3>Nous contacter :</h3> +<p>Merci d'utiliser le formulaire ci-dessous pour nous contacter :</p> + +<form action="" method="post"> + +Votre nom :<br /> +<?php + $nom = isset($_POST['name']) ? $_POST['name'] : ''; +?> +<input name="name" type="text" value="<?php echo html($nom); ?>"/> +<br /> +<br /> + +Votre e-mail :<br /> +<?php + $de = isset($_POST['from']) ? $_POST['from'] : ''; +?> +<input name="from" type="text" value="<?php echo html($de); ?>"/> +<br /> +<br /> + +Sujet :<br /> +<?php + $sujet = isset($_POST['subject']) ? $_POST['subject'] : ''; +?> +<input name="subject" type="text" value="<?php echo html($sujet); ?>"/> +<br /> +<br /> + +Anti-spam : veuillez recopier le code ci-dessous<br /> +<input name="verif_box" type="text"/> + <img src="verificationimage.php?<?php echo rand(0,9999);?>" alt="verification" width="50" height="24" align="absbottom" /> + <br /> + <br /> + +Message :<br /> + +<textarea name="message" style="height:300px;width:915px;"></textarea> + +<p><input name="submit" class="searchsubmit formbutton" type="submit" value="Envoyer le message"/> <input type="reset" value="Annuler" /></p> +</form> + + </div> + + <?php require('sidebar.php'); ?> + + <div class="clear"></div> + </div> +</div> + +<div id="footer"> + <?php require('includes/footer.php'); ?> +</div> + +</body> +</html> |