-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreview-2.php
executable file
·177 lines (135 loc) · 4 KB
/
preview-2.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
<?php
// [INCLUDE] //
include('./common/session.php');
?>
<!-- [HTML] ------------------------------------------------------->
<?php include('header.php'); ?>
<!-- [INPUT] Hidden -->
<input type="hidden" id="vin" value="<?php echo $_GET['vin'] ?>">
<!-- [SPACER] -->
<section class="w3l-about-breadcrumb position-relative text-center">
<div class="breadcrumb-bg breadcrumb-bg-about py-sm-5 py-4"></div>
</section>
<!-- Checkout -->
<section id="checkout-section" class="w3l-content-6 checkout">
<div class="container">
<div class="content-info-in loading row">
<!-- [IMG] col lg 3 -->
<div class="col-lg-3">
<div class="image-banner">
<img
src="assets/images/checkoutrefundleft.png"
alt=""
class="img-fluid"
style="margin-bottom: 20px;"
>
<img src="assets/images/ab1.jpg" alt="" class="img-fluid">
</div>
</div>
<!-- [MAIN] Col 6 -->
<div class="col-lg-6 mt-lg-0 mt-5 pl-lg-4 about-right-faq align-self">
<!-- [COMPONENTS] -->
<?php include('./components/preview-2/BuyWithConfidence.php'); ?>
<!-- [DISPLAY] Your Vin Number Here -->
<h5 class="mb-3 text-secondary">
Your Vin Number: <?php echo $_GET['vin']; ?>
</h3>
<?php if ($loggedin): ?>
<!-- [SUBMIT] -->
<a href="./payments-loggedin.php?vin=<?php echo $_GET['vin']; ?>">
<button
type="submit"
class="btn btn-primary w-100 mb-3"
>Proceed to Checkout</button>
</a>
<?php else: ?>
<!-- [SUBMIT] -->
<a href="./payments.php?vin=<?php echo $_GET['vin']; ?>">
<button
type="submit"
class="btn btn-primary w-100 mb-3"
>Proceed to Checkout</button>
</a>
<?php endif; ?>
</div>
<!-- [IMG] Col 3 -->
<div class="col-lg-3">
<img src="assets/images/placecheckoutonright.png" class="img-fluid">
</div>
</div>
</div>
</section>
<!-- [PRODUCTION][LOADING-SCREEN] -->
<?php if (PRODUCTION == 'true'): ?>
<div id="loading-section" class="container my-5">
<div class="card card-body shadow">
<h1 class="mb-3 text-center font-weight-light text-danger">
We Are Generating Your Report..
</h1>
<h4 id="loading" class="text-center text-warning font-weight-light">
Loading...
</h4>
<br>
<div class="bar">
<div class="progress"></div>
</div>
<div class="text-center font-weight-light small percentage"></div>
</div>
</div>
<style>
.bar {
background: silver;
border-radius: 30px;
margin: 0 0 10px;
width: 100%;
height: 2px;
overflow: hidden;
position: relative;
}
.progress {
background: #568259;
position: absolute;
top: 0;
left: 0;
height: 100%;
transition: 0.1s;
}
.percentage:after { content: "%"; }
</style>
<script>
function check_percentage() {
document.getElementById('checkout-section').classList.add('d-none')
let percentage = document.querySelector('.percentage')
let title = document.querySelector('#loading')
let percentageValue =+ percentage.textContent
setTimeout(function () {
if (percentageValue < 100) { update_percentage() }
else {
percentage.textContent = 100
title.textContent = 'Done!'
title.classList.add('text-success')
document.getElementById('loading-section').classList.add('d-none')
document.getElementById('checkout-section').classList.add('d-block')
}
}, 100)
}
function update_percentage() {
let percentage = document.querySelector('.percentage')
let percentageValue = +percentage.textContent
let progress = document.querySelector('.progress')
percentage.textContent = percentageValue + Math.ceil(Math.random() * .5)
progress.setAttribute(
'style',
`width: ${percentageValue + Math.ceil(Math.random() * .5)}%`
)
check_percentage()
}
check_percentage()
</script>
<?php endif; ?>
<!-- [FOOTER] -->
<?php include('footer.php'); ?>
<?php include('./common/bottom_script.php'); ?>
<!-- [SCRIPT] ------------------------------------------------------->
</body>
</html>