forked from Justmalhar/weshare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payment.php
226 lines (212 loc) · 10.5 KB
/
payment.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
<?php
include("connecttoaws.php");
session_start();
$userid=$_SESSION['user_id'];
$sql1 = "SELECT * FROM `payment_history` WHERE payer_id='$userid'";
$result1 = mysqli_query($db,$sql1);
$sql2="SELECT balance FROM user where id='$userid'";
$balance = mysqli_query($db,$sql2)->fetch_object()->balance;
$i=0;
if ($result1->num_rows > 0) {
// output data of each row
while($row = $result1->fetch_assoc()) {
$row_array[$i]['id']=$row['id'];
$row_array[$i]['payee_id']=$row['payee_id'];
$row_array[$i]['job_id']=$row['job_id'];
$row_array[$i]['create_time']=$row['create_time'];
$row_array[$i]['amount']=$row['amount'];
$row_array[$i]['status']=$row['status'];
$row_array[$i]['transaction_id']=$row['transaction_id'];
$i++;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>WeWork</title>
<link rel="shortcut icon" href="assets/img/favicon.png">
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jasny-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jasny-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/material-kit.css" type="text/css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="assets/fonts/line-icons/line-icons.css" type="text/css">
<link rel="stylesheet" href="assets/fonts/line-icons/line-icons.css" type="text/css">
<link rel="stylesheet" href="assets/css/main.css" type="text/css">
<link rel="stylesheet" href="assets/extras/animate.css" type="text/css">
<link rel="stylesheet" href="assets/extras/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/extras/owl.theme.css" type="text/css">
<link rel="stylesheet" href="assets/css/responsive.css" type="text/css">
<link rel="stylesheet" href="assets/css/slicknav.css" type="text/css">
<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="assets/fav/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/fav/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/fav/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/fav/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/fav/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/fav/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/fav/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/fav/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/fav/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/fav/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/fav/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/fav/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/fav/favicon-16x16.png">
<link rel="manifest" href="assets/fav/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="assets/fav/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div class="header">
<nav class="navbar navbar-default main-navigation" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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 logo" href="index.php"><img src="assets/img/w_logo.png" width="60px" height="60px" alt=""></a>
</div>
<ul class="nav navbar-nav top-nav-text" style="font-family: 'Ubuntu',sans-serif; text-transform: uppercase; font-weight: 500; font-size: 40px;">
<li class="active"><a href="view_profile.php">Profile</a></li>
<li><a href="myjobs.php">My Jobs</a></li>
<li><a href="applied_jobs.php">Applied Jobs</a></li>
<li><a href="#">Messages</a></li>
</ul>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
<li class="postadd">
<a class="btn btn-common btn-text" href="post-job.php"><span class="fa fa-plus-circle"></span> Post an Ad</a>
</li>
<li><a href="payment.php"><i class="fa fa-credit-card"></i> Balance: <?php echo $balance;?></a></li>
<li><a href="logout.php"><i class="lnr lnr-user"></i> Logout</a></li>
</ul>
</div>
</div>
</nav>
</div>
<!-- Header Section End -->
<!-- Enter your code here -->
<div class="container">
<h1 class="text-center" style="margin-top: 40px;">Transaction History</h1>
<table class="table table-striped" style="margin-top: 30px;">
<h3>
<thead>
<tr style="background-color: #fec239;">
<h3>
<td><h3>Time</h3></td>
<td><h3>Details</h3></td>
<td><h3>Paid To</h3></td>
<td><h3>Amount</h3></td>
</tr>
</thead>
<tbody>
</h3>
<h4>
<?php
for ($j=0; $j < $i; $j++) {
# code...
?>
<tr>
<td><h4><?php echo $row_array[$j]['create_time']; ?></h4></td>
<td><h4><?php
$jid=$row_array[$j]['job_id'];
$sql3="SELECT * from job where id='$jid'"; $title=mysqli_query($db,$sql3)->fetch_object()->title; echo $title; ?></h4></td>
<td><h4><?php $pid=$row_array[$j]['payee_id']; $sql3="SELECT * FROM user LEFT JOIN user_detail ON user.user_detail_id=user_detail.id WHERE user.id='$pid'";
$paidto_fname=mysqli_query($db,$sql3)->fetch_object()->first_name;
$paidto_lname=mysqli_query($db,$sql3)->fetch_object()->last_name;
echo $paidto_fname." ".$paidto_lname;?></h4></td>
<td><h4><?php echo $row_array[$j]['amount']; ?></h4></td>
</tr>
</div>
<?php
}
?>
</h4>
</tbody>
</table>
</div>
<!-- Close your code here-->
<!-- Footer Section Start -->
<footer>
<!-- Footer Area Start -->
<section class="footer-Content">
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay="0">
<div class="widget">
<h3 class="block-title">About us</h3>
<div class="textwidget">
<img src="assets/img/logo.png" width="40px" height="40px">
<p>WeWork is a new Job Portal platform that helps you find work from!</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay="0.5">
<div class="widget">
<h3 class="block-title">Quik Links</h3>
<ul class="menu">
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="tnc.php">Terms of Use</a></li>
<li><a href="privacy.php">Privacy Policy</a></li>
</ul>
</div>
</div>
<div>
<div class="footer-widget social-widget">
<h3 class="block-title">Follow us on</h3>
<ul>
<li><a href="#"><i class="fa fa-facebook-official"></i>Facebook</a></li>
<li><a href="#"><i class="fa fa-twitter-square"></i>Twitter</a></li>
<li><a href="#"><i class="fa fa-google-plus-square"></i>Google+</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Footer area End -->
<!-- Copyright Start -->
<div id="copyright">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="site-info pull-left">
<p>Designed by WeWork.com</p>
</div>
</div>
</div>
</div>
</div>
<!-- Copyright End -->
</footer>
<!-- Footer Section End -->
<!-- Go To Top Link -->
<a href="#" class="back-to-top">
<i class="fa fa-angle-up"></i>
</a>
<!-- Main JS -->
<script type="text/javascript" src="assets/js/jquery-min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/material.min.js"></script>
<script type="text/javascript" src="assets/js/material-kit.js"></script>
<script type="text/javascript" src="assets/js/jquery.parallax.js"></script>
<script type="text/javascript" src="assets/js/owl.carousel.min.js"></script>
<script type="text/javascript" src="assets/js/wow.js"></script>
<script type="text/javascript" src="assets/js/main.js"></script>
<script type="text/javascript" src="assets/js/jquery.counterup.min.js"></script>
<script type="text/javascript" src="assets/js/waypoints.min.js"></script>
<script type="text/javascript" src="assets/js/jasny-bootstrap.min.js"></script>
<script src="assets/js/bootstrap-select.min.js"></script>
</body>
</html>