This repository has been archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
of.php
52 lines (42 loc) · 1.8 KB
/
of.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
<?PHP
require 'includes/master.inc.php';
error_log(print_r($_POST, true));
$db = Database::getDatabase();
foreach($_POST as $key => $val)
$_POST[$key] = mysql_real_escape_string($val, $db->db);
$dt = date('Y-m-d H:i:s');
$query = "INSERT INTO shine_feedback (appname, appversion, systemversion, email, reply, `type`, message, importance, critical, dt, ip, `new`, reguser, regmail) VALUES
('{$_POST['appname']}',
'{$_POST['appversion']}',
'{$_POST['systemversion']}',
'{$_POST['email']}',
'{$_POST['reply']}',
'{$_POST['type']}',
'{$_POST['message']}',
'{$_POST['importance']}',
'{$_POST['critical']}',
'$dt',
'{$_SERVER['REMOTE_ADDR']}',
'1',
'{$_POST['reguser']}',
'{$_POST['regmail']}')";
mysql_query($query, $db->db) or die('error');
$link = 'http://shine.clickontyler.com/feedback-view.php?id=' . $db->insertId();
$message = "$link\n\n";
$message .= "From: {$_POST['email']}\n";
$message .= "Version: {$_POST['appversion']}\n";
$message .= "System Version: {$_POST['systemversion']}\n";
$message .= "Importance: {$_POST['importance']}\n";
$message .= "Criticality: {$_POST['critical']}\n\n";
$message .= "Message: " . str_replace("\\n", "\n", $_POST['message']) . "\n\n";
// Login to Shine and visit your settings to set of_email...
$of_email = get_option('of_email', '');
if(strlen($of_email) > 0)
{
Mail_Postmark::compose()
->addTo($of_email)
->subject($_POST['appname'] . ' ' . ucwords($_POST['type']))
->messagePlain($message)
->send();
}
echo "ok";