-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreturnbookscheck.php
More file actions
287 lines (221 loc) · 9.36 KB
/
returnbookscheck.php
File metadata and controls
287 lines (221 loc) · 9.36 KB
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?php
$title1 ="";
$author1 ="";
$publisher1 ="";
$isbn1 ="";
$price1 =0;
$quantity1 =0;
$user1="";
$no_of_books=0;
$available1=0;
if(isset($_GET['titleout'])) {
$title1= $_GET['titleout'];
}
if(isset($_GET['authorout'])) {
$author1= $_GET['authorout'];
}
if(isset($_GET['isbnout'])) {
$isbn1= $_GET['isbnout'];
}
if(isset($_GET['publisherout'])) {
$publisher1= $_GET['publisherout'];
}
if(isset($_GET['priceout'])) {
$price1= $_GET['priceout'];
}
if(isset($_GET['quantityout'])) {
$quantity1= $_GET['quantityout'];
}
if(isset($_GET['availableout'])) {
$available1= $_GET['availableout'];
}
if(isset($_GET['user'])) {
$user1= $_GET['user'];
}
if(isset($_GET['booksisuedyet'])) {
$no_of_books= $_GET['booksisuedyet'];
}
//$title=$_POST['title'];
?>
<?php
if(isset($_GET['error'])) {
$error_id = $_GET['error'];
switch($error_id) {
case 4:
$error = "Congrats! Your book has been returned";
echo "<script type='text/javascript'>alert('$error');</script>";
break;
}
}?>
<?php
if(isset($_GET['error'])) {
$error_id = $_GET['error'];
switch($error_id) {
case 5:
$error = "Sorry";
echo "<script type='text/javascript'>alert('$error');</script>";
break;
}
}?>
<?php
if(isset($_GET['error'])) {
$error_id = $_GET['error'];
switch($error_id) {
case 6:
$error = "All pending fines paid";
echo "<script type='text/javascript'>alert('$error');</script>";
break;
}
}?>
<?php
session_start();
$Username= $user1;
$conn = oci_connect('cse_15101028','15101028','172.16.61.126/dbtest');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$query='SELECT * FROM studentdb WHERE user_name = \''.$Username.'\' ';
//echo $query;
$stid = oci_parse($conn, $query);
$result=oci_execute($stid);
//echo($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if(($row = oci_fetch_row($stid)) != false){
$username = $row[0];
$name=$row[2];
// echo $row[0];
//echo $row[1];
//echo $row[2];
//echo $row[3];
//echo "<a href='member.php'>Click</a> here to enter";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>IIITNR|Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
</head>
<body>
<div class="main" >
<div class="header">
<div class="header_resize">
<div class="logo">
<h1><a href="#">IIIT-NR|<span>|Library</span></a> <small>Welcome to IIIT-NR's Library</small></h1>
</div>
<div class="clr"></div>
<div class="menu_nav">
<ul>
<li class="active"><a href="indexstaff.php">Home</a></li>
<li><a href="support.html">Support </a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="blog.html">Blog </a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
<div class="dropdown">
<button class="dropbtn"><font size="5">Hello,<?php echo $name; ?> ⮟</font></button>
<div class="dropdown-content">
<a href="#">Change Password</a>
<a href="logout.php">LOGOUT</a>
</div>
</div>
<div class="clr"></div>
<?php
if($no_of_books<=4){
$bookscanissuemore=$no_of_books;
}
?>
<h2><?php echo $name;?> has issued <?php echo $bookscanissuemore;?> books</h2>
<form method="POST" action="finalcalc.php?&name1=<?php echo $user1;?>" id="searchbook" class="search_book">
<input type ="submit" class="search" value="Pending Fine">
</form>
<div class="clr"></div>
<div class ="search_book">
<div class="searchhead">Search Books</div>
<form method="POST" action="findbookreturn.php?no=<?php echo $no_of_books;?>&name=<?php echo $user1;?>" id="searchbook" class="search_book">
<div class="container">
<div class="row">
<h3>Select Your Filter</h3>
<div class="col-sm-6">
<div class="radio reg">
<input type="radio" name="Selected" id="radio1" value="Title" checked="">
<label for="radio1">
Title
</label>
</div>
<div class="radio reg">
<input type="radio" name="Selected" id="radio2" value="ISBN_NO" >
<label for="radio2">
ISBN-NO
</label>
</div>
<div class="radio reg">
<input type="radio" name="Selected" id="radio3" value="Author" >
<label for="radio3">
Author
</label>
</div>
<div class="radio reg">
<input type="radio" name="Selected" id="radio4" value="Magazine" >
<label for="radio4">
Magazine
</label>
</div>
</div>
<input class="search_bar" placeholder="Enter Title/Author/ISBN-NO of the book" name="SearchBook" required="">
<input type ="submit" class="search" value="Enter Search">
</div>
</div>
</form>
</div>
<form method="POST" action="returnfinal.php?&name1=<?php echo $user1;?>& updatedbookscanissuemore=<?php echo $no_of_books;?>" id="searchbook" class="search_book">
<div class="searchhead">Return Book</div>
ISBN-NO:<input class="search_bar" style="width:150px" name="isbn_" placeholder="ISBN_NO" value="<?php echo $isbn1; ?>" readonly />
Title:<input class="search_bar" style="width:150px" name="title_" placeholder="Title" value="<?php echo $title1; ?>" readonly />
Author:<input class="search_bar" style="width:150px" name="author_" placeholder="Author" value="<?php echo $author1; ?>" readonly /><br>
Publisher:<input class="search_bar"style="width:150px" name="publisher_" placeholder="Publisher" value="<?php echo $publisher1; ?>" readonly />
Quantity:<input class="search_bar"style="width:150px" name="quantity_" placeholder="Quantity" value="<?php echo $quantity1; ?>" readonly />
Price:<input class="search_bar" style="width:150px" name="price_"placeholder="Price" value="<?php echo $price1; ?>" readonly /><br>
Available:<input class="search_bar" style="width:150px; margin: 6px 80px 22px 325px;" name="available_"placeholder="Quantity Available" value="<?php echo $available1; ?>" readonly /><br>
<input type ="submit" class="search" value="Return">
</form>
<div class="clr"></div>
</div>
</div>
<div class="fbg">
<div class="fbg_resize">
<div class="col c1">
<h2><span>Image Gallery</span></h2>
<a href="#"><img src="images/pix1.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images/pix2.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images/pix3.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images/pix4.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images/pix5.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images/pix6.jpg" width="58" height="58" alt="" /></a> </div>
<div class="col c2">
<h2><span>Lorem Ipsum</span></h2>
<p>Lorem ipsum dolor<br />
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum. Cras id urna. <a href="#">Morbi tincidunt, orci ac convallis aliquam</a>, lectus turpis varius lorem, eu posuere nunc justo tempus leo. Donec mattis, purus nec placerat bibendum, dui pede condimentum odio, ac blandit ante orci ut diam.</p>
</div>
<div class="col c3">
<h2><span>Contact</span></h2>
<p>Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue.</p>
<p><a href="#">support@yoursite.com</a></p>
<p>+1 (123) 444-5677<br />
+1 (123) 444-5678</p>
<p>Address: 123 TemplateAccess Rd1</p>
</div>
<div class="clr"></div>
</div>
</div>
<div class="footer">
<div class="footer_resize">
<p class="lf">© Copyright <a href="#">MyWebSite</a>.</p>
<p class="rf">Layout by Rocket <a href="http://www.rocketwebsitetemplates.com/">Website Templates</a></p>
<div class="clr"></div>
</div>
</div>
</div>
<div align=center>This template downloaded form <a href='http://all-free-download.com/free-website-templates/'>free website templates</a></div></body>
</html>