-
Notifications
You must be signed in to change notification settings - Fork 0
/
deepbrookwithdraw.php
453 lines (332 loc) · 17.3 KB
/
deepbrookwithdraw.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
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
<?php
session_start();
include "../config/db.php";
include "../config/config.php";
$msg = "";
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
if(isset($_SESSION['email'])){
$email = $_SESSION['email'];
$sql = "UPDATE users SET session='1' WHERE email='$email'";
mysqli_query($link, $sql) or die(mysqli_error($link));
}
else{
header("location:../login.php");
}
$pdbalance = 0;
$pdprofit = 0;
$percentage = 0;
$wbtc1 = 0;
$sql21= "SELECT * FROM users WHERE email= '$email'";
$result21 = mysqli_query($link,$sql21);
if(mysqli_num_rows($result21) > 0){
$row1 = mysqli_fetch_assoc($result21);
$pdbalance = $row1['walletbalance'];
$pdprofit = $row1['profit'];
$refcode = $row1['refcode'];
$referred = $row1['referred'];
$username = $row1['username'];
$password = $row1['password'];
}
if(isset($_POST['submit'])){
$usd =$link->real_escape_string( $_POST['usd']);
$mode =$link->real_escape_string($_POST['mode']);
$wallet =$link->real_escape_string($_POST['wallet']);
$upassword =$link->real_escape_string($_POST['password']);
$j = $usd;
$tnx = uniqid('tnx');
$sql = "INSERT INTO wbtc (moni,mode,email,status,tnx,wal)
VALUES ('$j','$mode','$email','pending','$tnx','$wallet')";
if($password == $upassword){
if($pdbalance >= $j){
if($j < $wl){
$msg = "Minimum withdrawal is $wl USD";
}else {
if(mysqli_query($link, $sql)){
$balance = $row['walletbalance'];
$sq = "UPDATE users SET walletbalance = walletbalance - $j WHERE email='$email'";
mysqli_query($link, $sq);
$msg= " Your withdraw request of $j USD worth of $mode has been sent, your transaction ID is $tnx , your wallet will be credited once your request is approved ";
include_once "../PHPMailer/PHPMailer.php";
require_once '../PHPMailer/Exception.php';
$mail= new PHPMailer();
$mail->setFrom($emaila);
$mail->FromName = $name;
$mail->addAddress($email, $username);
$mail->Subject = "Withdrawal Request";
$mail->isHTML(true);
$mail->Body = '
<div style="background: #f5f7f8;width: 100%;height: 100%; font-family: sans-serif; font-weight: 100;" class="be_container">
<div style="background:#fff;max-width: 600px;margin: 0px auto;padding: 30px;"class="be_inner_containr"> <div class="be_header">
<div class="be_logo" style="float: left;"> <img src="https://'.$bankurl.'/admin/c2wad/logo/'.$logo.'"> </div>
<div class="be_user" style="float: right"> <p>Dear: '.$username.'</p> </div>
<div style="clear: both;"></div>
<div class="be_bluebar" style="background: #1976d2; padding: 20px; color: #fff;margin-top: 10px;">
<h1>Thank you for investing on '.$name.'</h1>
</div> </div>
<div class="be_body" style="padding: 20px;"> <p style="line-height: 25px; color:#000;">
Your withdraw request of '.$j.' USD worth of '.$mode.' has been sent, your transaction ID is '.$tnx.' , your wallet will be credited once your request is approved
</p>
<div class="be_footer">
<div style="border-bottom: 1px solid #ccc;"></div>
<div class="be_bluebar" style="background: #1976d2; padding: 20px; color: #fff;margin-top: 10px;">
<p> Please do not reply to this email. Emails sent to this address will not be answered.
Copyright ©2010 '.$name.'. </p> <div class="be_logo" style=" width:60px;height:40px;float: right;"> </div> </div> </div> </div></div>';
if($mail->send()){
}
}
}
} else {
$msg = "Insufficient balance";
}
} else {
$msg = "Incorrect Password";
}
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="assets/img/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Withdrawals | Crypto Elite</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<!-- Bootstrap core CSS -->
<link href="bootstrap.css" rel="stylesheet" />
<!-- Animation library for notifications -->
<link href="animate.css" rel="stylesheet"/>
<!-- Light Bootstrap Table core CSS -->
<link href="lightbootstrapdashboard.css" rel="stylesheet"/>
<!-- CSS for Demo Purpose, don't include it in your project -->
<link href="demo.css" rel="stylesheet" />
<!-- Fonts and icons -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
<link href="icon7stroke.css" rel="stylesheet" />
</head>
<body>
<div class="wrapper">
<div class="sidebar" style="color:#1d1d1d;">
<!--
Tip 1: you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple"
Tip 2: you can also add an image using data-image tag
-->
<div class="sidebar-wrapper">
<div class="logo">
<a href="../" class="simple-text">
<img class="img-responsive" alt="logo" src="../images/logo-dark.png">
</a>
</div>
<ul class="nav">
<li>
<a href="./">
<i class="pe-7s-graph" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Dashboard</p>
</a>
</li>
<li>
<a href="profile.php">
<i class="pe-7s-user" style="color: #fd961a;"></i>
<p style="color: #fd961a;">User Profile</p>
</a>
</li>
<li>
<a href="message.php">
<i class="pe-7s-mail" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Messages</p>
</a>
</li>
<li>
<a href="wallet.php">
<i class="pe-7s-wallet" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Wallet</p>
</a>
</li>
<li>
<a href="packages.php">
<i class="pe-7s-photo-gallery" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Upgrade</p>
</a>
</li>
<li class="active">
<a href="withdrawal.php">
<i class="pe-7s-cash" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Withdrawals</p>
</a>
</li>
<li>
<a href="mypackages.php">
<i class="pe-7s-photo-gallery" style="color: #fd961a;"></i>
<p style="color: #fd961a;">My Package</p>
</a>
</li>
<li class="active-pro">
<a href="logout.php">
<i class="pe-7s-user" style="color: #fd961a;"></i>
<p style="color: #fd961a;">Logout</p>
</a>
</li>
</ul>
</div>
</div>
<div class="main-panel">
<nav class="navbar navbar-default navbar-fixed">
<div class="container-fluid" style="background: #000;">
<div class="navbar-header" style="background: #000;">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" style="color: #fd961a;" href="#">Withdraw funds</a>
</div>
<div class="collapse navbar-collapse" style="color:black;">
</div>
</div>
</nav>
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Make new withdrawal</h4>
</div>
<div class="content">
<?php if($msg != "") echo "<div style='padding:20px;background-color:#dce8f7;color:black'> $msg</div class='btn btn-success'>" ."</br></br>"; ?>
<form action="" method="post">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Amount you want to withdraw (in American Dollars)</label>
<input required="" name="usd" type="numbers" class="form-control" placeholder="Amount (Integers only)">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Preferred withdrawal mode</label>
<select name="mode" class="form-control" id="plan">
<option value="">select an account type</option>
<option value="BTC">Bitcoin</option>
<option value="ETH">Ethereum</option>
<option value="PM">Perfect Money</option>
</select>
</div>
</div>
</div>
<div class="row">
<ul>
<li>If you selected bitcoin as your withdrawal mode, enter your correct bitcoin wallet.</li>
<li>If you selected ethereum as your withdrawal mode, enter your correct ethereum wallet.</li>
<li>If you selected perfect money as your withdrawal mode, enter your correct perfect money wallet.</li>
<li>If you entered wrong details and we send money to someone else's account, we won't be responsible for it.</li>
<li>If any issue is encountered while disbursing your money, and administrator will contact you via your email.</li>
</ul>
<div class="col-md-12">
<div class="form-group">
<label>Account details</label>
<textarea required="" name="wallet" class="form-control" placeholder="Enter correct details"></textarea>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Enter your password to confirm your withdrawal</label>
<input name="password" type="password" class="form-control" placeholder="Enter password">
</div>
</div>
</div>
<hr>
<button type="submit" name="submit" class="btn btn-info btn-fill pull-right">Withdraw funds</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="header">
<h4 class="title">Withdrawal history</h4>
<p class="category">A list of all your withdrawals.</p>
</div>
<div class="content table-responsive table-full-width">
<table class="table table-hover table-striped">
<thead>
<th>Email</th>
<th>Amount(USD)</th>
<th>Mode</th>
<th>Status</th>
<th>Tnx ID</th>
<th>Date</th>
</thead>
<tbody>
<?php $sql= "SELECT * FROM wbtc WHERE email='$email' ORDER BY id DESC ";
$result = mysqli_query($link,$sql);
if(mysqli_num_rows($result) > 0){
$is_yes = 1;
while($row = mysqli_fetch_assoc($result)){
$row['status'];
if(isset($row['status']) && $row['status']== 'completed'){
$sec = '<span class="badge" style="padding: 10px 15px; background-color: #29c088;">Completed</span>';
}else{
$sec ='<span class="badge" style="padding: 10px 15px; background-color: #dd2525;">Pending</span>';
}
?>
<tr class="primary">
<td><?php echo $row['email'];?></td>
<td>$<?php echo $row['moni'];?></td>
<td><?php echo $row['mode'];?></td>
<td><?php echo $sec;?></td>
<td><?php echo $row['tnx'];?></td>
<td><?php echo $row['date'];?></td>
</tr>
<?php
}
}else{
$is_yes = 0;
}
?>
</tbody>
</table>
</div>
<?php if($is_yes==0){ echo " <center><b>You have no withdrawal history</b></center><br>";} ?> </div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<p class="copyright pull-right">
© 2010 <a>Crypto Elite</a>
</p>
</div>
</footer>
</div>
</div>
</body>
<!-- Core JS Files -->
<script src="jquery3.2.1.min.js" type="text/javascript"></script>
<script src="bootstrap.min.js" type="text/javascript"></script>
<!-- Charts Plugin -->
<script src="chartslist.js"></script>
<!-- Notifications Plugin -->
<script src="light-bootstrapnotify.js"></script>
<!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
<script src="light-bootstrap-dashboard.js"></script>
<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
<script src="demo.js"></script>
</html>