-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallet.php
126 lines (97 loc) · 3.42 KB
/
wallet.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
<?php
include_once('app/init.php');
global $user;
if ($user->is_loggedin()) {
$user_is_logged_in = "yes";
} else {
$user_is_logged_in = "no";
}
?>
<head>
<meta charset="utf-8"/>
<link rel="apple-touch-icon" sizes="76x76" href="<?php load_asset('img/apple-icon.png') ?>">
<link rel="icon" type="image/png" sizes="96x96" href="<?php load_asset('img/favicon.png') ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>WhistleBlower.ng | Report Anything corrupt practice that we encounter in our daily lives, business, and
community</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'/>
<link href="<?php load_asset('css/bootstrap.css') ?>" rel="stylesheet"/>
<link href="<?php load_asset('css/gaia.css') ?>" rel="stylesheet"/>
<!-- Fonts and icons -->
<link href='https://fonts.googleapis.com/css?family=Cambo|Poppins:400,600' rel='stylesheet' type='text/css'>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php load_asset('css/fonts/pe-icon-7-stroke.css') ?>" rel="stylesheet">
<link href="assets/css/custom.css" rel="stylesheet"/>
<link href="assets/css/login-register.css" rel="stylesheet"/>
<script src="assets/js/login-register.js" type="text/javascript"></script>
</head>
<div class="section section-header section-header-small">
<div class="parallax filter filter-color-black">
<div class="image"
style="background-image:url('assets/img/how-it-works.png')">
</div>
<div class="container">
<div class="content">
<h1>My Wallet</h1>
<!-- <h3 class="subtitle">Here's how we start to kick out corruption from our nation</h3>-->
</div>
</div>
</div>
</div>
<?php
if($user_is_logged_in == "no"){
load_template('not_user_nav');
?>
<div class="section" style="margin-bottom:15em;">
<div class="container">
<div class="row">
<div class="col-lg-7 col-lg-offset-2">
<?php
$string = "You need to be a registered user before you can access this page, <a href='login.php'> signup/login here </a>";
echo "<div class='alert alert-danger'>".$string."<strong></strong></div>";
?>
</div>
</div>
</div>
</div>
<?php
} else{
?>
<?php
load_template("user_nav"); ?>
<?php
//
$email = $user->logged_in_user();
$data1 = "http://whistleblower.ng/api/get_wallet_balance.php?email=$email";
$response1 = file_get_contents($data1);
// var_dump($response1);
$json_response1 = json_decode($response1,true);
$num1= $json_response1['count'];
?>
<div class="container">
<h2>Wallet Details</h2>
<table class="table table-bordered">
<tbody>
<tr>
<td>Wallet Blance</td>
<td>NGN <?php echo $json_response1['balance']; ?></td>
</tr>
</tbody>
</table>
</div>
<?php
}
?>
<!---->
<div class="section">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-offset-3">
<!-- Wallet BALANCE HERE-->
</div>
</div>
</div>
</div>
<?php
include('inc/footer.php');
?>