-
Notifications
You must be signed in to change notification settings - Fork 3
/
feedback.php
executable file
·54 lines (44 loc) · 1.65 KB
/
feedback.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
<?php
define('SITE_PATH', './');
define('HACKFREE', 1);
//// INCLUDE INFO
include (SITE_PATH."common.php");
include ("config.php");
if ( $_POST )
{
if ( !$_POST['message'] ) $error = "Please enter your message";
if ( !$error)
{
$smarty->assign('successMessage', "Your feedback is valuable to us. Feel free to email us at [email protected] if you have more matters to discuss.");
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'CC: [email protected]' . "\r\n";
if (isset($_POST['email'])) $headers .= "To: " . $_POST['email'] ."\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = "Thank you for submitting feedback for Flourish Conference 2012! Here are the details that you have entered:<br />";
foreach ( $_POST as $key => $value )
{
if ( $key != "recaptcha_challenge_field" && $key != "submit" && $key != "recaptcha_response_field")
$message .= $key .": ". strip_tags($value)."<br />";
}
mail($_POST['email'], "Thank you for submitting feedback for Flourish Conference 2012!", $message, $headers);
$success = true;
}else{
$success = false;
}
if ( !$success && !$error )
{
$error ="There was an error getting your feedback for the conference, please email us at <a href=\"mailto:". CONTACT_EMAIL ."\">". CONTACT_EMAIL ."</a> to report the error.";
}
if ( $error ) $smarty->assign('message', $error);
}
$smarty->assign('POST', $_POST);
//We reached end, parse and end
include (SITE_PATH."footer.php");
if ( $success ) {
$smarty->display('thanks.tpl');
} else {
$smarty->display('feedback.tpl');
}
//We're out of here.
?>