-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeedback.php
204 lines (157 loc) · 5.64 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('max_execution_time', 300);
// show all errors
error_reporting(E_ALL);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="Benchmarks" property="og:title">
<meta content="Benchmarks and comparison of cloud game streaming providers" property="og:description">
<meta content="https://bench.benji.link" property="og:url">
<meta content="/assets/controller.png" property="og:image">
<meta content="#5a43b5" data-react-helmet="true" name="theme-color">
<title>Benchmarks of Game Streaming Providers - Feedback</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="assets/dark-min.css" />
<link rel="stylesheet" type="text/css" href="assets/custom.css" />
<script async src="https://arc.io/widget.min.js#a24jhCmw"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-50TJ289NGW"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-50TJ289NGW');
</script>
</head>
<body>
<?php
include('conn.php');
if(isset($_POST['submit'])) {
$discord = $_POST['discord'];
$email = $_POST['email'];
$message = $_POST['message'];
$question = $_POST['question'];
// check if fields are empty
if(empty($discord)) {
$discord = "Not Specified";
}
if(empty($email)) {
$email = "Not Specified";
}
echo "Thank you, your Feedback was submitted!";
// discord webhook
$json_data = json_encode([
"content" => "<@499865877945253888>",
"embeds" => [
[
"title" => "New Feedback!",
"description" => "",
"color" => 8585048,
"fields" => [
[
"name" => "Message",
"value" => $message,
],
[
"name" => "Discord",
"value" => $discord,
"inline" => true
],
[
"name" => "Email",
"value" => $email,
"inline" => true
],
[
"name" => "Contact?",
"value" => $question,
"inline" => true
]
]
]
]
]);
$ch = curl_init( $webhook_url );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
curl_close( $ch );
}
?>
<section class="section">
<div class="container">
<h1 class="title">
Benchmarks of Game Streaming Providers
</h1>
<br>
<p class="subtitle">
<!-- button to hourly and monthly -->
<a href="/" class="button is-primary">Back</a>
<a href="hourly.php" class="button is-primary">Hourly</a>
<a href="monthly.php" class="button is-primary">Monthly</a>
<br>
<br>
<form action="feedback.php" method="post">
<div class="field">
<label class="label">Name</label>
<div class="control">
<input class="input" name="discord" id="discord" type="text" placeholder="Benji#1652">
</div>
</div>
<div class="field">
<label class="label">Email</label>
<div class="control">
<input class="input" name="email" id="email" type="email" placeholder="[email protected]">
</div>
</div>
<div class="field">
<label class="label">Message *</label>
<div class="control">
<textarea class="textarea" name="message" id="message" placeholder="Your Message" required></textarea>
</div>
</div>
<div class="field">
<label class="label">Are you willing to be contacted by me?</label>
<div class="control">
<label class="radio">
<input type="radio" value="YES" name="question" checked>
Yes
</label>
<label class="radio">
<input type="radio" value="NO" name="question">
No
</label>
</div>
</div>
<div class="field is-grouped">
<div class="control">
<input name="submit" type='submit' value="Submit" class="button is-link"/>
</div>
</div>
</form>
</p>
</div>
</section>
<footer class="footer">
<div class="content has-text-centered">
<p>
<strong>Benchmarks</strong> by <a href="https://benji.link">Benji</a>.<br>
If you have any problems or suggestions, please contact me on discord: Benji#1652 <br>
Email: [email protected]
</p>
</div>
</footer>
</body>
</html>