-
Notifications
You must be signed in to change notification settings - Fork 1
/
single.php
171 lines (128 loc) · 4.54 KB
/
single.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
<html>
<?php
session_start();
require_once "header1.php";
?>
<!--Single Page starts Here-->
<div class="product-main">
<div class="container">
<ol class="breadcrumb">
<li><a href="index.php" class="home_link">Home</a></li>
<li class="active">Single</li>
</ol>
<div class="ctnt-bar cntnt">
<div class="content-bar">
<div class="single-page">
<!--Include the Etalage files-->
<link rel="stylesheet" href="css/etalage.css">
<script src="js/jquery.etalage.min.js"></script>
<!-- Include the Etalage files -->
<script>
jQuery(document).ready(function($){
$('#etalage').etalage({
thumb_image_width: 300,
thumb_image_height: 400,
source_image_width: 700,
source_image_height: 800,
show_hint: true,
click_callback: function(image_anchor, instance_id){
alert('Callback example:\nYou clicked on an image with the anchor: "'+image_anchor+'"\n(in Etalage instance: "'+instance_id+'")');
}
});
// This is for the dropdown list example:
$('.dropdownlist').change(function(){
etalage_show( $(this).find('option:selected').attr('class') );
});
});
</script>
<!--//details-product-slider-->
<?php
// if(isset($_REQUEST['id'])){
// $id = $_REQUEST['id'];
// $id = $_SESSION['id'];
// echo $id;
if(isset($_GET["data"]))
{
$id = $_GET["data"];
$qimpo = $conn->query("SELECT * FROM `i_new_product` WHERE id = '$id'") or die(mysqli_error($conn));
while($fimpo = $qimpo->fetch_array()){
$qty = $fimpo['qty'];
?>
<div class="details-left-slider">
<ul id="etalage">
<li>
<a href="optionallink.html">
<div class="etalage_thumb_image">
<?php
echo '<img src="data:image/jpeg;base64,'.base64_encode( $fimpo['image'] ).'" />';
$id = $fimpo['id'];
$price = $fimpo['price'];
?>
</div>
<?php echo '<img class="etalage_source_image" src="data:image/jpeg;base64,'.base64_encode( $fimpo['image'] ).'" />';
?>
<img class="etalage_source_image" src="" />
</a>
</li>
<div class="clearfix"></div>
</ul>
</div>
<div class="details-left-info">
<h3><?php echo $fimpo['name'];?></h3>
<h9>Product id:<?php echo $fimpo['id'];?></h9>
<p><?php echo "Rs.".$fimpo['price'];?><a href="#"></a></p>
<p class="qty"><b>Qty Available ::</b></p><?php
if($qty>0){
echo $qty." Pieces Left ";
?>
<form action="u_cart.php" method="post">
<input type="hidden" name="p_id" value=" <?php echo $id; ?> ">
<input type="hidden" name="price" value=" <?php echo $price; ?> ">
<button class="btns">ADD TO CART</button>
</form>
<?php
} else {
echo "OUT OF STOCK";
//<button class="btns"></button>
?>
<?php
}
?>
<div class="flower-type">
<p class = "model_num">Model ::<?php echo $fimpo['model'];?></p>
<p>Brand ::<?php
// Created On 19-04-2018, Prabhat Chandra
$sql = $conn->query("SELECT * FROM i_new_product, brand_list
WHERE i_new_product.id = '$id' AND i_new_product.brand=brand_list.id ")
or die(mysqli_error($conn)) ;
while($details = $sql->fetch_array()){
echo $details['name']; } ?>
</p>
<p class = "cateogory">Category ::<?php
$sql = $conn->query("SELECT * FROM i_new_product, cat_list
WHERE i_new_product.id = '$id' AND i_new_product.cat=cat_list.id ")
or die(mysqli_error($conn)) ;
while($detail = $sql->fetch_array()){
echo $detail['name']; } ?>
</p>
</div>
<h5>Description ::</h5>
<p class="desc"><?php echo $fimpo['des'];?></p>
</div>
<?php }} else {
echo "back";
// header('Location: index.php');
} ?>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<?php
require_once "men_footer.php";
?>
</div>
</body>
</html>