-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeal-details.php
264 lines (246 loc) · 9.35 KB
/
deal-details.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
<?php
session_start();
require('Connection/connect.php');
require_once('fns.php');
if(!$_SESSION['facer']){
header('Location: ../');
exit;
}
$id = mysqli_real_escape_string($connect, multiexplode(array("/","/"),$_SERVER['REQUEST_URI'],'deals-details'));
$qsDeal = mysqli_query($connect, "select * from deals where id = '$id' && end_date > CURDATE() || end_date = '' && id = '$id'");
$rsDeal = mysqli_fetch_assoc($qsDeal);
if(mysqli_num_rows($qsDeal) == 0){
header('Location ../404');
exit;
}
$qsTask = mysqli_query($connect, "select * from tasks order by rand() limit 0,1");
$rsTask = mysqli_fetch_assoc($qsTask);
$qsCash = mysqli_query($connect, "select * from cashback order by rand() limit 0,1");
$rsCash = mysqli_fetch_assoc($qsCash);
$qs = mysqli_query($connect, "select * from deals where end_date > CURDATE() && id <> '{$rsDeal['id']}' || end_date = '' && id <> '{$rsDeal['id']}' order by rand() limit 0,4");
$ns = mysqli_num_rows($qs);
?>
<!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, shrink-to-fit=no">
<meta name="description" content="Faceflyer - A complete customer reward system, earn faceflyer coin each time you complete a task, shop deals at a store, or get cash back on every purchase from your favorite store">
<title>Faceflyer - Details on deal</title>
<!-- Favicon Icon -->
<link rel="icon" type="image/png" href="../assets/images/logo.png">
<!-- Custom fonts for this template-->
<link href="../assets/fontawesome/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="../assets/css/theme.css" rel="stylesheet">
<!-- Material Design Icons -->
<link href="../assets/css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" />
<!-- Select2 CSS -->
<link href="../assets/css/select2-bootstrap.css" />
<link href="../assets/css/select2.min.css" rel="stylesheet" />
<!-- icofont -->
<link href="../assets/css/icofont.min.css" rel="stylesheet">
<!-- Owl Carousel -->
<link rel="stylesheet" href="../assets/css/owl.carousel.css">
<link rel="stylesheet" href="../assets/css/owl.theme.css">
<!-- Custom styles for this template-->
<link href="../assets/css/style.css" rel="stylesheet">
<!-- Hotjar Tracking Code for www.faceflyer.com -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:1964395,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<?php include 'header2.php'; ?>
<!-- End of Topbar -->
<br><br>
<div class="container">
<div id="leadboard" align="center">
<img src="../assets/images/leaderboard.jpeg" alt="ads" class="img-fluid" />
</div>
</div>
<!-- Begin Page Content -->
<section class="offer-dedicated-body section-padding">
<div class="container">
<div class="row pt-lg-4">
<div class="col-xl-8 col-sm-12">
<div class="offer-dedicated-body-left">
<div class="shadow-sm rounded overflow-hidden mb-4">
<div class="bg-white coupon-deal-detail-main">
<div class="coupon-deal-detail-main-block">
<div class="got-badge">
<img class="" width="56" src="../assets/images/<?php echo merchantSignin($rsDeal['store'], 'logo'); ?>" alt="merchant logo" data-placement="top" data-toggle="tooltip" data-original-title="<?php echo merchantSignin($rsDeal['store'], 'store_name'); ?>">
</div>
</div>
<div class="coupon-deal-detail-main-body p-4">
<h3 class="pr-lg-5 mb-3 text-gray-900"><?php echo $rsDeal['name'] ?>
<span class="badge badge-danger ml-2"><?php echo $rsDeal['coin'] ?> FC
</span>
</h3>
<h6 class="coupon-deal-detail-main-body-p font-weight-light pr-lg-5 text-secondary">
<?php echo $rsDeal['description'] ?></h6>
<p class="mb-0 mt-4 font-weight-light text-gray-500"><i
class="icofont-users-alt-4 text-danger mr-2"></i> <?php echo $rsDeal['count'] ?> People completed task
<?php if($rsDeal['end_date'] && $rsDeal['end_date'] > date('Y-m-d')){ ?>
<i class="ml-4 icofont-clock-time text-danger mr-2"></i> Ends <?php echo date('m.d.Y', strtotime($rsDeal['end_date']))?></p>
<?php }elseif($rsDeal['end_date'] == ""){ ?>
<i class="ml-4 icofont-clock-time text-danger mr-2"></i> anytime
<?php }else{ ?>
<i class="ml-4 icofont-clock-time text-danger mr-2"></i> This deal has ended
<?php } ?><br>
<i class="icofont-map-pins text-danger mr-2"></i> <?php echo merchantSignin($rsDeal['store'], 'location'); ?>
</p>
</div>
</div>
<div
class="custom-nav coupon-deal-detail-main-footer bg-white border-top d-flex align-items-center px-4">
<ul class="nav">
<li class="nav-item">
<a href="#pc" class="nav-link active">Popular Deals</a>
</li>
</ul>
<span class="ml-auto">
<button type="button" onclick="window.location.href='../coin'" class="btn btn-primary btn-sm shadow-sm"> Claim Coin </button>
</span>
</div>
</div>
<div id="pc" class="bg-white shadow-sm rounded mb-4 popular-stores-accordion">
<h5 class="mb-4 pt-4 pl-4 pr-4 text-gray-900">Popular Deals</h5>
<div class="accordion" id="accordionExample">
<div class="popular-stores-card">
<div id="collapsetwo" class="collapse show" aria-labelledby="headingtwo"
data-parent="#accordionExample">
<div class="popular-stores-card-body p-4">
<div class="row">
<?php for($d=0;$d<$ns;$d++){
$rs = mysqli_fetch_assoc($qs);
?>
<div class="col-lg-6 col-sm-12 my-2">
<div class="border-radius bg-white popular-stores-card-offer p-3">
<a href="../deal-details/<?php echo $rs['id']; ?>">
<div class="media align-items-center">
<img alt="merchant" src="../assets/images/<?php echo merchantSignin($rs['store'], 'logo'); ?>" class="mr-3">
<div class="media-body">
<div class="custom-card-body">
<h6 class="mb-0">
<a class="text-gray-900" href="../deal-details/<?php echo $rs['id']; ?>"><?php echo $rs['name']; ?></a></h6>
<p class="text-gray-500 mb-2"> <?php echo $rs['headline']; ?></p>
</div>
<div class="custom-card-badge">
<span class="badge badge-warning"><i
class="icofont-sale-discount"></i> OFFER</span> <?php echo $rs['coin']; ?> FC
</div>
</div>
</div>
</a>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-sm-12">
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h5 class="mb-4 text-gray-900">Useful Tips</h5>
<p>Deals are earned when you shop in a store that gives <b>faceflyer coin</b>. Read the description on how best to get a deal</p>
<ul class="dot-list">
<li>Once you fulfil this deal, upload an evidence in other to clain coin attach to this deal.</li>
<li>You will receive pending FC after proof has been confirmed</a>
</li>
<li>Please read the <a href="../terms">T&C</a> to learn more.</li>
</ul>
</div>
<div class="bg-white shadow-sm rounded mb-4">
<div class="gold-members p-4">
<a href="../task-details/<?php echo $rsTask['id']; ?>">
<div class="media">
<img class="mr-3" src="../assets/images/<?php echo $rsTask['banner']; ?>" alt="merchant">
<div class="media-body">
<div class="custom-card-body">
<h6 class="mb-3">
<a class="text-gray-900" href="../task-details/<?php echo $rsTask['id']; ?>"><?php echo $rsTask['name']; ?></a></h6>
<?php if($rsTask['end_date']){ ?>
<p class="text-gray-500"><i class="icofont-clock-time"></i> Ends in <?php timeLeft($rsTask['end_date']); ?>
</p>
<?php } ?>
</p>
</div>
<div class="custom-card-footer d-flex align-items-center">
<span class="text-gray-900"><i class="icofont-sale-discount"></i> <?php echo $rsTask['coin']; ?> FC</span>
<a class="btn btn-sm btn-white ml-auto" href="../task-details/<?php echo $rsTask['id']; ?>">Get Offer</a>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="bg-white shadow-sm rounded mb-4">
<div class="gold-members p-4">
<a href="../cashback-details/<?php echo $rsCash['id']; ?>">
<div class="media">
<img class="mr-3" src="../assets/images/<?php echo $rsCash['banner']; ?>" alt="merchant">
<div class="media-body">
<div class="custom-card-body">
<h6 class="mb-3">
<a class="text-gray-900" href="../cashback-details/<?php echo $rsCash['id']; ?>"><?php echo $rsCash['name']; ?></a></h6>
<p class="text-gray-500"><i class="icofont-building-alt"></i> <?php echo merchantSignin($rsCash['store'], 'store_name'); ?>
</p>
</div>
<div class="custom-card-footer d-flex align-items-center">
<a class="btn btn-sm btn-white ml-auto" href="../cashback-details/<?php echo $rsCash['id']; ?>">Get Offer</a>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include 'footer2.php'; ?>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
</div>
<!-- End of Content Wrapper -->
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded-circle" href="#page-top">
<i class="fa fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<!-- Bootstrap core JavaScript -->
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="../assets/js/jquery.easing.min.js"></script>
<!-- select2 Js -->
<script src="../assets/js/select2.min.js"></script>
<!-- Owl Carousel -->
<script src="../assets/js/owl.carousel.js"></script>
<!-- Custom -->
<script src="../assets/js/custom.js"></script>
</body>
</html>