-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcomplaint.php
45 lines (39 loc) · 1.11 KB
/
complaint.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
<?php
/**
* Handles Error Reporting.
*/
/**
* Get all required libraries.
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/complaint.lib.php';
require_once 'libraries/mailConstants.inc.php';
require_once 'libraries/swiftmailer/lib/swift_required.php';
$response = HAA_Response::getInstance();
$header = $response->getHeader();
// No need to display global message on this page.
$header->disableGlobalMessage();
$header->addFile('minified/complaint.css', 'css');
$header->setTitle('Support');
$html_output = '';
// If Form is submitted, process it.
if (isset($_REQUEST['submitted'])) {
// Parse and save form data.
$save = HAA_saveErrorReport($_REQUEST);
if ($save) {
$response->addHTML($GLOBALS['message']);
} else {
$response->addHTML(
'<div class="report_complaint gray_grad box">'
. HAA_generateErrorMessage($GLOBALS['error'])
. '</div>'
);
}
$response->response();
exit;
}
// Display Error Reporting form.
$html_output .= HAA_getHtmlErrorReportForm();
$response->addHTML($html_output);
$response->response();
?>