This repository was archived by the owner on Jun 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.php
More file actions
90 lines (68 loc) · 2.02 KB
/
request.php
File metadata and controls
90 lines (68 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/* Copyright (C) 2012-2016 Stephan Kreutzer
*
* This file is part of refugee-it.de.
*
* refugee-it.de is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3 or any later version,
* as published by the Free Software Foundation.
*
* refugee-it.de is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License 3 for more details.
*
* You should have received a copy of the GNU Affero General Public License 3
* along with refugee-it.de. If not, see <http://www.gnu.org/licenses/>.
*/
require_once(dirname(__FILE__)."/config.inc.php");
if (isset($_POST['e_mail']) != true &&
isset($_POST['content']) != true)
{
return 0;
}
$success = false;
$message = "Time: ".date("c")."\n";
$message .= "Type: refugee-it.de contact\n";
if (isset($_POST['e_mail']) === true)
{
$message .= "E-Mail: ".htmlspecialchars($_POST['e_mail'], ENT_COMPAT | ENT_HTML401, "UTF-8")."\n";
}
if (isset($_POST['content']) === true)
{
$message .= "Message: ".htmlspecialchars($_POST['content'], ENT_COMPAT | ENT_HTML401, "UTF-8")."\n";
}
if (@mail(CONFIG_WEBMASTER_EMAIL,
"[refugee-it.de] Request",
$message,
"From: ".CONFIG_WEBMASTER_EMAIL."\n".
"MIME-Version: 1.0\n".
"Content-type: text/plain; charset=UTF-8\n") === true)
{
$success = true;
}
$message .= "------------------------------------------\n";
{
$fp = @fopen(dirname(__FILE__)."/logs/request.log", "ab");
if ($fp != false)
{
if (@fwrite($fp, $message) != false)
{
$success = true;
}
@fclose($fp);
}
}
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>".
"<response><result>";
if ($success === true)
{
echo "success";
}
else
{
echo "failure";
}
echo "</result></response>";
?>