This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.php
161 lines (126 loc) · 5.76 KB
/
book.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
<?php session_start();
require_once 'connection.php';
$id=$_GET['isbn'];
$q="SELECT * FROM `books` WHERE `ISBN`='". $id ."'";
$res=mysqli_query($conn,$q) or die("Can't Execute Query..");
$row=mysqli_fetch_assoc($res);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Book - User Panel</title>
<link rel="stylesheet" href="ucp/assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
<link rel="stylesheet" href="ucp/assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="ucp/assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="ucp/assets/fonts/fontawesome5-overrides.min.css">
</head>
<body id="page-top">
<div id="wrapper">
<nav class="navbar navbar-dark align-items-start sidebar sidebar-dark accordion bg-gradient-primary p-0">
<div class="container-fluid d-flex flex-column p-0"><a class="navbar-brand d-flex justify-content-center align-items-center sidebar-brand m-0" href="#">
<div class="sidebar-brand-icon rotate-n-15"><i class="fas fa-laugh-wink"></i></div>
<div class="sidebar-brand-text mx-3"><span>Book Details</span></div>
</a>
<hr class="sidebar-divider my-0">
<ul class="navbar-nav text-light" id="accordionSidebar">
<li class="nav-item"><a class="nav-link" href="index.php"><i class="fas fa-tachometer-alt"></i><span>Home</span></a></li>
<li class="nav-item"><a class="nav-link" href="allbooks.php"><i class="fas fa-user"></i><span>All Books</span></a></li>
</ul>
<div class="text-center d-none d-md-inline"><button class="btn rounded-circle border-0" id="sidebarToggle" type="button"></button></div>
</div>
</nav>
<div class="d-flex flex-column" id="content-wrapper">
<div id="content">
<nav class="navbar navbar-light navbar-expand bg-white shadow mb-4 topbar static-top">
<div class="container-fluid"><button class="btn btn-link d-md-none rounded-circle mr-3" id="sidebarToggleTop" type="button"></button></div>
</nav>
<div class="container-fluid">
<h3 class="text-dark mb-4"><?php echo $row['Name'];?></h3>
<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<div class="entry">
<?php
echo ' <table border="0" width="100%">
<tr>
<td><hr color="purple"></td>
</tr>
<tr align="center" bgcolor="#EEE9F3">
<td>Item Details</td>
</tr>
<tr>
<td><hr color="purple"></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="15%" rowspan="3">
<img src="admin/'.$row['Img'].'" width="100">
</td>
</tr>
<tr>
<td width="50%" height="100%">
<table border="0" width="100%" height="100%">
<tr valign="top">
<td align="right" width="10%">NAME</td>
<td width="6%">: </td>
<td align="left">'.$row['Name'].'</td>
</tr>
<tr>
<td align="right">ISBN</td>
<td>: </td>
<td align="left">'.$row['ISBN'].'</td>
</tr>
<tr>
<td align="right">Publisher </td>
<td>: </td>
<td align="left">'.$row['Author'].'</td>
</tr>
<tr>
<td align="right"> PRICE</td>
<td>: </td>
<td align="left">'.$row['Price'].'</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td><hr color="purple"></td>
</tr>
<tr align="center" bgcolor="#EEE9F3">
<td>DESCRIPTION</td>
</tr>
<tr>
<td><hr color="purple"></td>
</tr>
</table>
'.$row['Description'].'
<tr><td colspan=2><hr color="purple"></td></tr>
<table border="0" width="100%">
<tr align="center" bgcolor="#EEE9F3">';
if(isset($_SESSION['userloggedin']))
{
echo ' <td><a href="ucp/process_cart.php?isbn='. $row['ISBN'] .'&nm='.$row['Name'].'&rate='.$row['Price'].'">
Add To Cart
</a></td>';
}
else
{
echo '<td><br><a href="index.php"> <h4>Login to Add to cart..</h4></a></td>';
}
echo '</tr>
</table>';
?>
</div>
</div>
</div>
<!-- end content -->
<!-- end footer -->
</body>
</html>