-
Notifications
You must be signed in to change notification settings - Fork 0
/
description.php
160 lines (143 loc) · 6.36 KB
/
description.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
<?php
session_start();
if(!isset($_SESSION['username']))
header("location: login.php?Message=Login To Continue");
?>
<!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">
<meta name="description" content="Books">
<meta name="author" content="Shivangi Gupta">
<title> Description</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/my.css" rel="stylesheet">
<style>
@media only screen and (width: 768px) { body{margin-top:150px;}}
@media only screen and (max-width: 760px) { #books .row{margin-top:10px;}}
.tag {display:inline;float:left;padding:2px 5px;width:auto;background:#F5A623;color:#fff;height:23px;}
.tag-side{display:inline;float:left;}
#books {border:1px solid #DEEAEE; margin-bottom:20px;padding-top:30px;padding-bottom:20px;background:#fff; margin-left:10%;margin-right:10%;}
#description {border:1px solid #DEEAEE; margin-bottom:20px;padding:20px 50px;background:#fff;margin-left:10%;margin-right:10%;}
#description hr{margin:auto;}
#service{background:#fff;padding:20px 10px;width:112%;margin-left:-6%;margin-right:-6%;}
.glyphicon {color:#D67B22;}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse">
</nav>
<div id="top" >
<div id="searchbox" class="container-fluid" style="width:112%;margin-left:-6%;margin-right:-6%;">
<div>
<form role="search" action="Result.php" method="post">
<input type="text" name="keyword" class="form-control" placeholder="Search for a Book , Author Or Category" style="width:80%;margin:20px 10% 20px 10%;">
</form>
</div>
</div>
</div>
<?php
include "config.php";
$PID=$_GET['ID'];
$query = "SELECT * FROM products WHERE PID='$PID'";
$result = mysqli_query ($conn,$query)or die(mysql_error());
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_assoc($result))
{
$path="img/books/".$row['PID'].".jpg";
$target="cart.php?ID=".$PID."&";
echo '
<div class="container-fluid" id="books">
<div class="row">
<div class="col-sm-10 col-md-6">
<div class="tag">'.$row["Discount"].'%OFF</div>
<div class="tag-side"><img src="img/orange-flag.png">
</div>
<img class="center-block img-responsive" src="'.$path.'" height="550px" style="padding:20px;">
</div>
<div class="col-sm-10 col-md-4 col-md-offset-1">
<h2> '. $row["Title"] . '</h2>
<span style="color:#00B9F5;">
#'.$row["Author"].'    #'.$row["Publisher"].'
</span>
<hr>
<span style="font-weight:bold;"> Quantity : </span>';
echo'
<select id="quantity">';
for($i=1;$i<=$row['Available'];$i++)
echo '<option value="'.$i.'">'.$i.'</option>';
echo ' </select>';
echo' <br><br><br>
<a id="buyLink" href="'.$target.'" class="btn btn-lg btn-danger" style="padding:15px;color:white;text-decoration:none;">
ADD TO CART for Rs '.$row["Price"] .' <br>
<span style="text-decoration:line-through;"> RS'.$row["MRP"].'</span>
| '.$row["Discount"].'% discount
</a>
</div>
</div>
</div>
';
echo '
<div class="container-fluid" id="description">
<div class="row">
<h2> Description </h2>
<p>'.$row['Description'] .'</p>
<pre style="background:inherit;border:none;">
PRODUCT CODE '.$row["PID"].' <hr>
TITLE '.$row["Title"].' <hr>
AUTHOR '.$row["Author"].' <hr>
AVAILABLE '.$row["Available"].' <hr>
PUBLISHER '.$row["Publisher"].' <hr>
EDITION '.$row["Edition"].' <hr>
LANGUAGE '.$row["Language"].' <hr>
PAGES '.$row["page"].' <hr>
WEIGHT '.$row["weight"].' <hr>
</pre>
</div>
</div>
';
}
}
echo '</div>';
?>
<div class="container-fluid" id="service">
<div class="row">
<div class="col-sm-6 col-md-3 text-center">
<span class="glyphicon glyphicon-heart"></span> <br>
24X7 Care <br>
Happy to help 24X7, call us on 0120-3062244 or click here
</div>
<div class="col-sm-6 col-md-3 text-center">
<span class="glyphicon glyphicon-ok"></span> <br>
Trust <br>
Your money is yours! All refunds come with no question asked guarantee.
</div>
<div class="col-sm-6 col-md-3 text-center">
<span class="glyphicon glyphicon-check"></span> <br>
Assurance <br>
We provide 100% assurance. If you have any issue, your money is immediately refunded. Sit back and enjoy your shopping.
</div>
<div class="col-sm-6 col-md-3 text-center">
<span class="glyphicon glyphicon-tags"></span> <br>
24X7 Care <br>
Happiness is guaranteed. If we fall short of your expectations, give us a shout.
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(function () {
var link = $('#buyLink').attr('href');
$('#buyLink').attr('href', link + 'quantity=' + $('#quantity option:selected').val());
$('#quantity').on('change', function () {
$('#buyLink').attr('href', link + 'quantity=' + $('#quantity option:selected').val());
});
});
</script>
</body>
</html>