forked from nwudoebuka/capitalcu
-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin.php
682 lines (505 loc) · 16.9 KB
/
admin.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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
<?php
// Start the session
session_start();
?>
<!--
Author: W3layouts
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="rent appartment, rent 2 bedroom flat, rent 2 bedroom flat portharcourt, rent 2 bedroom flat lagos,
rent 2 bedroom flat warri, rent 2 bedroom flat Oweri, rent 2 bedroom flat Abuja, rent 2 bedroom flat Calabar, rent 2 bedroom flat benin, rent self con portharcourt,buy
land, buy house, rent shop" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); }
</script>
<!-- Custom Theme files -->
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/popup-box.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/mislider.css" rel="stylesheet" type="text/css" />
<link href="css/mislider-custom.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/main-gallery.css" type="text/css" media="screen" /> <!-- flexslider-CSS -->
<link href="css/font-awesome.css" rel="stylesheet"> <!-- font-awesome icons -->
<!-- //Custom Theme files -->
<!-- web-fonts -->
<link href="//fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300i,400,400i,600,600i,700" rel="stylesheet">
<!-- //web-fonts -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myModal").modal('show');
$('#myModal').modal({
backdrop: 'static',
keyboard: false // to prevent closing with Esc button (if you want this too)
})
});
</script>
<script type="text/javascript">
$('#myModal').modal({
backdrop: 'static',
keyboard: false // to prevent closing with Esc button (if you want this too)
})
</script>
</head>
<?php
$servername = "localhost";
$username = "capitalc_001";
$password = "An0therrichard3303";
$dbname = "capitalc_001";
$date = date('d-m-Y H:m:s');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if (isset($_POST['otpl'])){
$otpl = $_POST['otpl'];
$sql = "SELECT * FROM register WHERE username = '".$_SESSION["username"]."' AND d = '$otpl'";
$result = $conn->query($sql);
if ($result->num_rows > 0 ) {
$_SESSION["otp"] = $otpl;
echo'<script>window.location =
"Dashboard/appzia"</script>';
}else{
$fail='<div class="alert alert-danger">Invalid Code</div>';
}
}
?>
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<div id="myModal" class="modal fade" data-keyboard="false" data-backdrop="static">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div align=center> <h4 class="modal-title"><br>Welcome to Bank Admin. <br><font size=2 color=#040359>Manage all bank account below.</font>.<br>
<?php
if (isset($success)){
echo $success;
}
if (isset($fail)){
echo $fail;
}
?> <style>
.blinking {
animation: mymove 2s infinite alternate;
}
@-webkit-keyframes mymove {
from {opacity:0;}
to {opacity: 1;}
}
</style>
<br>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
<table>
<tr>
<th>Name</th>
<th>Acc.number</th>
<th>Status</th>
<th>Action</th>
<?php
$servername = "localhost";
$username = "capitalc_001";
$password = "An0therrichard3303";
$dbname = "capitalc_001";
$date = date('d-m-Y H:m:s');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//performing CEO functions
if (isset($_POST['action'])){
$user = $_POST['acn'];
$action = $_POST['action'];
$sql = "UPDATE register SET account_status = '$action' WHERE username = '$user'";
if ($conn->query($sql) === TRUE) {
$success='<div class="alert alert-success">Operation Successful.</div>';
}else{
$fail='<div class="alert alert-danger">Operation Failed.</div>';
}
}
$sql = "SELECT * FROM register WHERE address !='1'";
$result = $conn->query($sql);
if ($result->num_rows > 0 ) {
$sql = "SELECT * FROM register WHERE address !='1'";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$name = $row['name'];
$accountnumber = $row['account_number'];
$accounttype = $row['account_type'];
$accountlimit = $row['account_limit'];
$accountbalance = $row['account_balance'];
$address = $row['address'];
$phone = $row['phone'];
$transferstatus = $row['transaction_status'];
$accountstatus = $row['account_status'];
$username = $row['username'];
$dp = $row['e'];
if($accountstatus === "3"){
echo'
</tr>
<tr>
<td>'.$name.'</td>
<td>'.$accountnumber.'</td>
<td>Pending</td>
<td><form action="" method="post">
<input name="action" type=hidden value="1">
<input name="acn" type=hidden value="'.$username.'">
<button type="submit" class="btn btn-warning">Authorize</button>
</form></td>
</tr>
';
}
if($accountstatus === "1"){
echo'
</tr>
<tr>
<td>'.$name.'</td>
<td>'.$accountnumber.'</td>
<td>Active</td>
<td><form action="" method="post">
<input name="action" type=hidden value="0">
<input name="acn" type=hidden value="'.$username.'">
<button type="submit" class="btn btn-danger">Suspend</button>
</form></td>
</tr>
';
}
if($accountstatus === "0"){
echo'
</tr>
<tr>
<td>'.$name.'</td>
<td>'.$accountnumber.'</td>
<td>Suspended</td>
<td><form action="" method="post">
<input name="action" type=hidden value="1">
<input name="acn" type=hidden value="'.$username.'">
<button type="submit" class="btn btn-success">Activate</button>
</form></td>
</tr>
';
}
}
}else{
$fail='<div class="alert alert-danger">You Have no bank accounts.</div>';
}
?>
</table>
<?php
if (isset($success)){
echo $success;
}
if (isset($fail)){
echo $fail;
}
?>
<div align=center> <font color=green><strong>MANAGE WIRE TRANSFER PROGRESS BELOW</strong> </font> </div>
<table>
<tr>
<th>Reciever</th>
<th>Country</th>
<th>Bank</th>
<th>Action</th>
<?php
$servername = "localhost";
$username = "capitalc_001";
$password = "An0therrichard3303";
$dbname = "capitalc_001";
$date = date('d-m-Y H:m:s');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//performing CEO functions
if (isset($_POST['actionw'])){
$user = $_POST['acn'];
$action = $_POST['actionw'];
if($action == "3"){
$sql = "SELECT * FROM wire WHERE sender = '$user'";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$senderu = $row['sender'];
$country = $row['country'];
$bank = $row['bank'];
$amountu = $row['amount'];
$status = $row['status'];
}
$sql = "UPDATE wire SET status = '$action' WHERE sender = '$user'";
if ($conn->query($sql) === TRUE) {
$sql = "SELECT * FROM register WHERE username = '$user'";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$accountbalance = $row['account_balance'];
}
$updatebalance = $accountbalance-$amountu;
$sql = "UPDATE register SET account_balance = '$updatebalance' WHERE username = '$user'";
if ($conn->query($sql) === TRUE) {
}
}
}
$sql = "UPDATE wire SET status = '$action' WHERE sender = '$user'";
if ($conn->query($sql) === TRUE) {
$success='<div class="alert alert-success">Operation Successful.</div>';
}else{
$fail='<div class="alert alert-danger">Operation Failed.</div>';
}
}
$sql = "SELECT * FROM wire WHERE e!='1'";
$result = $conn->query($sql);
if ($result->num_rows > 0 ) {
$sql = "SELECT * FROM wire WHERE e!='1'";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$sender = $row['sender'];
$country = $row['country'];
$bank = $row['bank'];
$amount = $row['amount'];
$accountbalance = $row['account_balance'];
$status = $row['status'];
if($status === "0"){
echo'
</tr>
<tr>
<td>'.$sender.'</td>
<td>'.$country.'</td>
<td>'.$bank.'</td>
<td><form action="" method="post">
<input name="actionw" type=hidden value="1">
<input name="acn" type=hidden value="'.$sender.'">
<button type="submit" class="btn btn-success">to 50%</button>
</form></td>
</tr>
';
}
if($status === "1"){
echo'
</tr>
<tr>
<td>'.$sender.'</td>
<td>'.$country.'</td>
<td>'.$bank.'</td>
<td><form action="" method="post">
<input name="actionw" type=hidden value="2">
<input name="acn" type=hidden value="'.$sender.'">
<button type="submit" class="btn btn-success">to 80%</button>
</form></td>
</tr>
';
}
if($status === "2"){
echo'
</tr>
<tr>
<td>'.$sender.'</td>
<td>'.$country.'</td>
<td>'.$bank.'</td>
<td><form action="" method="post">
<input name="actionw" type=hidden value="3">
<input name="acn" type=hidden value="'.$sender.'">
<button type="submit" class="btn btn-danger">to 100%</button>
</form></td>
</tr>
';
}
}
if($status === "3"){
echo'
</tr>
<tr>
<td>'.$sender.'</td>
<td>'.$country.'</td>
<td>'.$bank.'</td>
<td>Complete
</form></td>
</tr>
';
}
}else{
$fail='<div class="alert alert-danger">You Have no bank accounts.</div>';
}
?>
</table>
<?php
if (isset($success)){
echo $success;
}
if (isset($fail)){
echo $fail;
}
?>
</div>
</div>
<div class="modal-body">
<!-- search-jQuery -->
<!-- pop-up-box -->
<script src="js/jquery.magnific-popup.js" type="text/javascript"></script>
<!--//pop-up-box -->
<script>
$(document).ready(function() {
$('.popup-with-zoom-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in'
});
});
</script>
<!-- Map-JavaScript -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
<script type="text/javascript">
google.maps.event.addDomListener(window, 'load', init);
function init() {
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(40.6700, -73.9400),
styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},
{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},
{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":
[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},
{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},
{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":
[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},
{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},
{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":
[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]
};
var mapElement = document.getElementById('map');
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(40.6700, -73.9400),
map: map,
});
}
</script>
<!-- stats -->
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.countup.js"></script>
<script>
$('.counter').countUp();
</script>
<!-- //stats -->
<!-- //Map-JavaScript -->
<script src="js/mislider.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(function ($) {
var slider = $('.mis-stage').miSlider({
// The height of the stage in px. Options: false or positive integer. false = height is calculated using maximum slide
heights. Default: false
stageHeight: 320,
// Number of slides visible at one time. Options: false or positive integer. false = Fit as many as possible. Default: 1
slidesOnStage: false,
// The location of the current slide on the stage. Options: 'left', 'right', 'center'. Defualt: 'left'
slidePosition: 'center',
// The slide to start on. Options: 'beg', 'mid', 'end' or slide number starting at 1 - '1','2','3', etc. Defualt: 'beg'
slideStart: 'mid',
// The relative percentage scaling factor of the current slide - other slides are scaled down. Options: positive number 100 or
higher. 100 = No scaling. Defualt: 100
slideScaling: 150,
// The vertical offset of the slide center as a percentage of slide height. Options: positive or negative number. Neg value =
up. Pos value = down. 0 = No offset. Default: 0
offsetV: -5,
// Center slide contents vertically - Boolean. Default: false
centerV: true,
// Opacity of the prev and next button navigation when not transitioning. Options: Number between 0 and 1. 0 (transparent) - 1
(opaque). Default: .5
navButtonsOpacity: 1,
});
});
</script>
<script type="text/javascript">
$(window).load(function() {
$("#flexiselDemo1").flexisel({
visibleItems:3,
animationSpeed: 1000,
autoPlay: true,
autoPlaySpeed: 3000,
pauseOnHover: true,
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint:480,
visibleItems: 1
},
landscape: {
changePoint:640,
visibleItems: 2
},
tablet: {
changePoint:768,
visibleItems: 2
}
}
});
});
</script>
<script type="text/javascript" src="js/jquery.flexisel.js"></script>
<!-- start-smoth-scrolling -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- start-smoth-scrolling -->
<script src="js/bootstrap.js"></script>
<!-- //for bootstrap working -->
<!-- here stars scrolling icon -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<!-- //here ends scrolling icon -->
</body>
</html>