aboutsummaryrefslogtreecommitdiff
path: root/Html/mailer.php
diff options
context:
space:
mode:
authorcitizenz7 <citizenz7@protonmail.com>2017-04-20 18:50:55 +0200
committercitizenz7 <citizenz7@protonmail.com>2017-04-20 18:50:55 +0200
commit5fd9fa480f302902328b81f912dd67ce378284f8 (patch)
tree66234843ae2857fda12442e4f7577c527d48977c /Html/mailer.php
parentebe731862c7c741171138b1083906f391fc35aff (diff)
downloadfreetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.tar.xz
freetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.zip
V.1.4.6
Diffstat (limited to '')
-rw-r--r--Html/mailer.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/Html/mailer.php b/Html/mailer.php
new file mode 100644
index 0000000..88230c9
--- /dev/null
+++ b/Html/mailer.php
@@ -0,0 +1,28 @@
+<?php
+
+require_once('includes/config.php');
+
+$name = $_REQUEST["name"];
+$subject = $_REQUEST["subject"];
+$message = strip_tags($_REQUEST["message"]);
+$from = $_REQUEST["from"];
+$verif_box = $_REQUEST["verif_box"];
+
+$name = stripslashes($name);
+$message = stripslashes(strip_tags($message));
+$subject = stripslashes($subject);
+$from = stripslashes($from);
+
+
+if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
+ $message = "Nom: ".$name."\n".$message;
+ $message = "De: ".$from."\n".$message;
+ mail(SITEMAIL, 'Message: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
+ header("Location: contact.php?action=ok");
+ setcookie('tntcon','');
+} else {
+ header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true");
+ //header("Location: contact.php");
+}
+?>
+