-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstock_free.php
103 lines (87 loc) · 3.31 KB
/
stock_free.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
<?php require 'inc/_global/config.php'; ?>
<?php require 'inc/backend/config.php'; ?>
<?php require 'inc/_global/views/head_start.php';
if ($gen_free == 0){
header('Location: home.php');
die();
}?>
<!-- Page JS Plugins CSS -->
<?php $dm->get_css('js/plugins/magnific-popup/magnific-popup.css'); ?>
<?php require 'inc/_global/views/head_end.php'; ?>
<?php require 'inc/_global/views/page_start.php'; ?>
<!-- Hero -->
<div class="bg-body-light">
<div class="content content-full">
<div class="d-flex flex-column flex-sm-row justify-content-sm-between align-items-sm-center">
<h1 class="flex-sm-fill font-size-h2 font-w400 mt-2 mb-0 mb-sm-2">Stock</h1>
<nav class="flex-sm-00-auto ml-sm-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">Free dispenser</li>
<li class="breadcrumb-item active" aria-current="page">Stock</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- END Hero -->
<!-- Page Content -->
<div class="content">
<!-- Simple -->
<h2 class="content-heading">Stock of different free dispensers</h2>
<div class="row">
<?php
$RecupType = $odb->query('SELECT * FROM `type_free`');
foreach ($RecupType as $RecupType) {
$checkstock = $odb->prepare('SELECT COUNT(type) FROM accounts_free WHERE type = ?');
$checkstock->execute(array($RecupType['name']));
$cstock = $checkstock->fetchColumn();
if ($RecupType['lien'] == "") {
$lien = "href='javascript:void(0)'";
}
else {
$lien = "href='".$RecupType['lien']."' target='_blank'";
}
?>
<div class="col-md-6 col-xl-4">
<a class="block block-rounded bg-gd-sea-op" <?=$lien?>>
<div class="block-content block-content-full d-flex align-items-center justify-content-between">
<div class="item">
<img class="img-avatar img-avatar96 img-avatar-thumb" style="max-width:45px;max-height:45px" src="<?=$RecupType['img']?>" alt="">
</div>
<div class="ml-3 text-right">
<p class="text-white font-size-lg font-w600 mb-0">
<?=$RecupType['name']?>
</p>
<p class="text-white-75 mb-0">
<?php
if ($cstock == 0) {
if (empty($RecupType['raison'])) {
echo "Sold out";
}
else {
echo "".$RecupType['raison']."";
}
}
else {
echo "In stock ($cstock)";
}
?>
</p>
</div>
</div>
</a>
</div>
<?php } ?>
</div>
<!-- END Simple -->
</div>
<!-- END Page Content -->
<?php require 'inc/_global/views/page_end.php'; ?>
<?php require 'inc/_global/views/footer_start.php'; ?>
<!-- Page JS Plugins -->
<?php $dm->get_js('js/plugins/magnific-popup/jquery.magnific-popup.min.js'); ?>
<?php $dm->get_js('js/plugins/raty-js/jquery.raty.js'); ?>
<?php $dm->get_js('js/pages/be_comp_rating.min.js'); ?>
<!-- Page JS Helpers (Magnific Popup Plugin) -->
<script>jQuery(function(){ Dashmix.helpers('magnific-popup'); });</script>
<?php require 'inc/_global/views/footer_end.php'; ?>