-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser_purchase.php
191 lines (165 loc) · 7.02 KB
/
user_purchase.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
<?php include('include/connect.php');
include('include/session.php');
function formatMoney($number, $fractional=false) {
if ($fractional) {
$number = sprintf('%.2f', $number);
}
while (true) {
$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
if ($replaced != $number) {
$number = $replaced;
} else {
break;
}
}
return $number;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="img/aalogo.jpg">
<title>Jersey Developers Ltd.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Less styles
<link rel="stylesheet/less" type="text/css" href="less/bootsshop.less">
<script src="less.js" type="text/javascript"></script>
-->
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet"/>
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"/>
<link href="assets/css/docs.css" rel="stylesheet"/>
<link href="style.css" rel="stylesheet"/>
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"/>
<script type='text/javascript'>
function numbers(){
//var CheckPassword = /^[A-Za-z]\w{7,14}$/; - numbers and characters and uppercase
var letterexp = /^[a-zA-Z]+$/;
var quanti = 32;
if(document.getElementById('quantity').value.match(letterexp)){
alert('Please input numbers only');
document.getElementById('quantity').value='';
}
}
</script>
<script>
function confirmDelete(delUrl) {
if (confirm("Are you sure you want to update product status?")) {
document.location = 'update_stat.php';
}
}
</script>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script src="js/incrementing.js"></script>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
body {
background-image: url("background1.JPG");
background-repeat: no-repeat;
}
</style>
<!-- Le fav and touch icons -->
</head>
<body>
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a id="logoM" href="user_index.php"></a>
<a data-target="#sidebar" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse">
<ul class="nav">
<li class=""><a href="user_index.php"><i class="icon-home icon-large"></i> Home</a></li>
<li class=""><a href="user_properties.php"><i class=" icon-th-large icon-large"></i> Properties</a></li>
<li class=""><a href="user_contact.php"><i class="icon-signal"></i> Contact Us</a></li>
<li class=""><a href="user_aboutus.php"><i class="icon-flag"></i> About Us</a></li>
<li class="active"><a href="user_purchase.php"><i class="icon-shopping-cart"></i> Paid/Pending</a></li>
<li class=""><a href="Email.php"><i class="icon-envelope"></i> Email</a></li>
</ul>
<ul class="nav pull-right">
<li>
<a href="user_account2.php"><?php $query = mysql_query("select * from customers where CustomerID='$ses_id'") or die(mysql_error());
$row = mysql_fetch_array($query);
$id = $row['CustomerID']; ?> <b>Welcome! </b> <?php echo $row['Firstname'];?> <?php echo $row['Lastname'];?> <span class="badge badge-info"> <?Php include('announce.php');?></span></a>
</li>
<li>
<a href="logout.php"><i class="icon-off"></i> Log Out</a>
</li>
</ul>
</div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div>
<!-- ======================================================================================================================== -->
<div id="mainBody" class="container"><div class="well">
<?php include ('user_header.php'); ?></div>
<!-- ==================================================Header End====================================================================== -->
<?php
$query3=mysql_query("select * from payment_details where customerID='$ses_id' and PaymentID=''") or die (mysql_error());
$count2=mysql_num_rows($query3);
?>
<font color="black">
<form method="post" action="process_order.php">
<input type="hidden" id="username" name="id" value="<?php
$id = mysql_query("select MAX(PaymentID) as max_PaymentID from payment");
$row5 = mysql_fetch_array($id);
echo $row5['max_PaymentID'] + 1;
?>" class="input-xlarge" required/>
<h3> PAID/PENDING [ <b><?php echo $count2;?> </b>]
</h3>
<hr class="soft"/>
<table class="table table-bordered">
<thead>
<tr>
<th>Property ID</th>
<th>Date Paid</th>
<th>Total</th>
<th>Status</th>
<th>Tr. No. </th>
<th>Date Paid Confirm</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query=mysql_query("select * from payment where customerID='$ses_id'") or die (mysql_error());
while($row=mysql_fetch_array($query)){
?>
<tr>
<td><?php echo $row['PaymentID'];?> </td>
<td><?php echo $row['paymentdate'];?> </td>
<td><?php echo formatMoney($row['total']);?></td>
<td><?php echo $row['status'];?></td>
<td><?php echo $row['Transaction_code'];?></td>
<td><?php echo $row['Date_paid'];?><td>
</font>
<?php
$stats=$row['status'];
if ($stats=="Confirmed") {
?>
<a href="official_receipt.php?id=<?php echo $row['PaymentID']; ?>"><U>Receipt</U></a>
<!---------------------their is a receipt--->
<?php }else{ ?>
<a href="official_receipt1.php?id=<?php echo $row['PaymentID']; ?>"><font color="red"><U>Receipt</U></font></a></td>
<?php }
}
?>
</tbody>
</table>
</form>
<!-- Footer ------------------------------------------------------ -->
<hr class="soft">
<div class="well" id="footerSection">
<?php include('footer2.php');?></div></div>
</body>