-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
42 lines (34 loc) · 1.04 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
<?php
define("INCLUDED", true); //This is for returning a die message if INCLUDED is not defined on any of the template
$AJAX_PAGE = false;
//################ Required Resources ################
$REQUIRED_RESOURCES = array();
//################ Required Files ################
require_once("init.php");
//################ PAGE ACCESS ################
$cms->BannedAccess(true);
eval($cms->SetPageAccess(ACCESS_REGISTERED));
//################ General Variables ################
$page_name[] = array("Contact Us"=>$_SERVER['REQUEST_URI']);
//################ Page Functions ################
if(isset($_POST['submit']))
{
$userstr = null;
foreach($USER as $ukey => $udata)
{
$userstr .= "[$ukey] => $udata\r\n";
}
$body = $_POST['body'];
$body .= "\r\n\r\nDetails:\r\n".$userstr;
$result = SendEmail($email['adminemail'], "{$USER['username']} contacted for '{$_POST['reason']}'", $body, array($_POST['from'] => $USER['username']));
if($result['result'])
{
$success = true;
}
else
{
$error = true;
}
}
eval($templates->Output("contact"));
?>