forked from mik-laj/ambasadorzy.siecobywatelska.pl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
executable file
·97 lines (86 loc) · 3.72 KB
/
contact.php
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
91
92
93
94
95
96
97
<?php
include_once('functions.inc.php');
showHead("Kontakt");
if(isset($_POST['submit'])) {
if(csrf_validate($_POST['csrfprotection'])) {
$topic = htmlspecialchars($_POST['topic']);
$name = htmlspecialchars($_POST['name']);
$email = htmlspecialchars($_POST['email']);
$text = htmlspecialchars($_POST['msg']);
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: Biuro Watchdog <'.NET_MAIL.'>' . "\r\n";
$headers .= "From: $name <$email>" . "\r\n";
mail(NET_MAIL, "Wiadomość z formularza kontaktowego Ambasadorów Jawności", "Temat: <br/>".$topic."<br/><br/>Treść wiadomości: <br/>".$text."<br/><br/>IP: ".htmlspecialchars(get_client_ip_env()), $headers);
}
}
?>
<div id="contactInfoBlock">
<div id="contactInfo1" class="block grayBlock">
<div class="blockFoldHold">
<div class="blockFold"></div>
<div class="blockFoldClear"></div>
</div>
<div class="blockContent">
<h2>Kontakt</h2>
<h3>Koordynator projektu</h3>
<address>
<i class="fa fa-envelope fa-fw"></i>
<a class="fooBar" href="http://www.google.com/recaptcha/mailhide/d?k=0133IYp4KK6_WtYnLoma6bsg==&c=xkFwb7Xs0uxvl9Kz56Fp9GHpm9kZRxoc6SI4Du0zXyGFIJpvo_XHt-_ksaeX7i92"><span>roksana.maslankiewicz</span></a>
<br>
<i class="fa fa-phone fa-fw"></i> 22 844 73 55
</address>
<h3>Nasze biuro</h3>
<address>
<i class="fa fa-envelope fa-fw"></i>
<a class="fooBar" href="http://www.google.com/recaptcha/mailhide/d?k=019SfyeYoOBXz-HBQPiC1dMw==&c=7t4uleBGHACWoT6pq8zcubkAl0UxUqb94jcrqtFq5N0="><span>biuro</span></a>
<br>
<i class="fa fa-phone fa-fw"></i> 22 844 73 55
</address>
</div>
</div>
<div class="clearfix"></div>
<div id="contactInfo2" class="block grayBlock">
<div class="blockFoldHold">
<div class="blockFold"></div>
<div class="blockFoldClear"></div>
</div>
<div class="blockContent">
<h2>Adres</h2>
<address>
<b>Sieć obywatelska - Watchdog Polska</b>
<br>
ul. Ursynowska 22/2
<br>
02-605 Warszawa
</address>
</div>
</div>
</div>
<div id="contactForm" class="block redBlock">
<div class="blockFoldHold">
<div class="blockFold"></div>
<div class="blockFoldClear"></div>
</div>
<div class="blockContent">
<h2>Skontaktuj się z nami</h2>
<?php if(isset($_POST['submit'])) {
echo "Dziękujemy! Twoja wiadomość została przesłana!";
}
else { ?>
<div id="reqNote">Pola oznaczone gwiazdką (*) są wymagane</div>
<br/>
<form method=POST action=contact.php>
<input type=hidden name=csrfprotection value="<?php echo $_SESSION['csrf']; ?>"/>
Twój email *<br/><input class="textinput textInput form-control" maxlength="150" name="email" type="text" required /><br/>
Imię (i nazwisko) *<br/><input class="textinput textInput form-control" maxlength="150" name="name" type="text" required /><br/>
Temat *<br/><input class="textinput textInput form-control" maxlength="150" name="topic" type="text" required /><br/>
Wiadomość *<br/><textarea class="textinput textInput form-control" name=msg required></textarea><br/>
<div class="form-actions"><input type="submit" name="submit" value="Wyślij" class="btn btn-primary btn-lg btn-block" id="submit-id-submit"> </div>
</form>
<?php } ?>
</div>
</div>
<?php
showFooter();
?>