-
Notifications
You must be signed in to change notification settings - Fork 7
/
catshop.php
154 lines (152 loc) · 6.71 KB
/
catshop.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
<?php require_once 'init.php'; ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Pichaya Morimoto">
<title> Pwnladin's Cat Shop </title>
<script src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<style type="text/css">
#buy-box{ margin-top: 100px; }
.navbar{ background-color: #F2F2F2; }
</style>
</head>
<body>
<div class="navbar navbar-custom navbar-fixed-top">
<div class="navbar-header"><a class="navbar-brand" href="#">Pwnladin's Cat Shop</a>
<a class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php">Home</a></li>
<li><a href="catshop.php">Catalog</a></li>
<li><a href="../about.php">About us</a></li>
<li> </li>
</ul>
</div>
</div>
<div class="container">
<div class="row">
<div id="buy-box" class="col-sm-12 col-md-10 col-md-offset-1">
<table class="table table-hover">
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th class="text-center">Price</th>
<th class="text-center">Total</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr id="as">
<td class="col-sm-8 col-md-6">
<div class="media">
<a class="thumbnail pull-left" href="#"> <img class="media-object" src="assets/images/as.jpg" style="width: 72px; height: 72px;"> </a>
<div class="media-body">
<h4 class="media-heading"><a href="#">American Shorthair</a></h4>
<h5 class="media-heading"> by <a href="#">Xelenonz</a></h5>
<span>Status: </span><span class="text-success"><strong>In Stock</strong></span>
</div>
</div></td>
<td class="col-sm-1 col-md-1" style="text-align: center">
<input type="email" class="form-control" id="quantity" value="3">
</td>
<td id="price" class="col-sm-1 col-md-1 text-center"><strong>500 ฿</strong></td>
<td id="total" class="col-sm-1 col-md-1 text-center"><strong>1500 ฿</strong></td>
<td class="col-sm-1 col-md-1">
<button type="button" class="btn btn-danger">
<span class="glyphicon glyphicon-remove"></span> Remove
</button></td>
</tr>
<tr id="sf">
<td class="col-md-6">
<div class="media">
<a class="thumbnail pull-left" href="#"> <img class="media-object" src="assets/images/sf.jpg" style="width: 72px; height: 72px;"> </a>
<div class="media-body">
<h4 class="media-heading"><a href="#">Scottish Fold</a></h4>
<h5 class="media-heading"> by <a href="#">LongCat</a></h5>
<span>Status: </span><span class="text-warning"><strong>Ships In 2-3 Weeks</strong></span>
</div>
</div></td>
<td class="col-md-1" style="text-align: center">
<input type="email" class="form-control" id="quantity" value="2">
</td>
<td id="price" class="col-md-1 text-center"><strong>300 ฿</strong></td>
<td id="total" class="col-md-1 text-center"><strong>600 ฿</strong></td>
<td class="col-md-1">
<button type="button" class="btn btn-danger">
<span class="glyphicon glyphicon-remove"></span> Remove
</button></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h5>Username</h5></td>
<td class="text-right"><h5><strong><?php echo $name; ?></strong></h5></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h5>Your Money</h5></td>
<td class="text-right"><h5><strong><?php echo $money; ?> Baht</strong></h5></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h3>Total</h3></td>
<td class="text-right"><h3><strong>2100 ฿</strong></h3></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>
<button id="checkout" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-shopping-cart"></span> Checkout
</button></td>
<td>
<button id="topup" type="button" class="btn btn-success">
Top Up<span class="glyphicon glyphicon-play"></span>
</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
$('#checkout').click(function(e){
e.preventDefault();
window.location='payment.php?total_cost=2100';
});
$('#topup').click(function(e){
e.preventDefault();
$.ajax({
url: 'catshop.php',
type: 'post',
data: 'topup=1',
success: function() {
location.reload();
}
});
});
});</script>
<!--
Bootstrap Snippet by amatellanes
Images Credit:
https://upload.wikimedia.org/wikipedia/commons/0/0c/American_Shorthair.jpg
http://wfiles.brothersoft.com/w/white-scottish-fold-lovely_95171-1280x800.jpg
https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/c061f5c31f43d420d7d9b20528939a72/tumblr_mkmoplv1k61qzrlhgo1_500.jpg
-->
</body>
</html>