-
Notifications
You must be signed in to change notification settings - Fork 0
/
inventory.php
152 lines (143 loc) · 4.72 KB
/
inventory.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
<?php
session_start();
if (!isset($_SESSION["username"])) {
header("location:admin_login.php");
exit;
}
include "include/connect.php";
include "include/gensettings.php";
include "user.php";
//include("dump.php");
//e-books count
$sql = 'SELECT * from card_cat WHERE (pdb!="" or pdf!="" or help!="")';
$result = mysql_query($sql);
$pdf_books = mysql_num_rows($result);
//.........number of books in lib............................//
//books in
$sql1 = 'SELECT sum(qty) from card_cat ';
$result1 = mysql_query($sql1);
while ($row = mysql_fetch_array($result1)) {
$books = $row['sum(qty)'];
}
//books out
$sql = "SELECT sum(qty) from books_bar";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$book = $row['sum(qty)'];
}
//add out and in
$books += $book;
//books available
$sql = "SELECT sum(qty) from card_cat WHERE status1='in'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$final_count_in = $row['sum(qty)'];
}
?>
<!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>
<script type="text/JavaScript" src="js/function.js">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $system_title . "--" . $footer; ?></title>
<link rel="stylesheet" type="text/css" href="css/<?php echo $css; ?>" />
</head>
<body>
<div class="header">
<div class="logo"><?php echo " " . $header_title; ?> </div>
<div id="Layer1"><img src="images/<?php echo $logo; ?>" width="117" height="110" />
<div id="Layer2"></div>
</div>
</div>
<div class="navbg">
<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="home.php" id="current" title="Home">Home</a></li>
<li><a href="admin.php" title="Search">Search</a></li>
<li><a href="admin_add_new.php" title="Add book">Add book</a></li>
<li><a href="barrower.php" title="Borrower">Borrower</a></li>
<li><a href="inventory.php" title="Inventory">Inventory</a></li>
<li><a href="settings.php" title="Settings">Settings</a></li>
<li><a href="help1.php" title="Help">Help</a></li>
<li><a href="logout.php" title="Logout">Logout</a></li>
</ul>
</div>
</div>
<div class="maincontent">
<div class="floatelft">
<h2>Inventory</h2>
<?php if ($uri == "admin") {?>
<table width="100%" border="0">
<tr>
<td width="16%" align="center"><?php if ($uri == "admin") {
echo '<a href="show_book_borrow.php?action=borrowed">
<img src="images/books.jpg" width="107" height="111" /><br />
Books borrowed</a>';
} else {
echo ' <img src="images/books.jpg" width="107" height="111" /><br />
Books borrowed';
}
?> </td>
<td width="16%" align="center"><?php if ($uri == "admin") {
echo '<a href="overdue.php?action=overdue"><img src="images/clock_book.jpg" width="107" height="111" /><br />
Overdue books</a>';
} else {
echo '<img src="images/clock_book.jpg" width="107" height="111" /><br />
Overdue books';
}
?></td>
<td width="18%" align="center"><?php if ($uri == "admin") {
echo '<a href="show_deleted_record.php?action=Deleted Records"><img src="images/overdue_books.jpg" width="107" height="111" /><br />
Deleted Records </a>';
} else {
echo '<img src="images/overdue_books.jpg" width="107" height="111" /><br />
Deleted Records';
}
?></td>
<td width="18%" align="center"><?php if ($uri == "admin") {
echo '<a href="show_collection.php"><img src="images/overdue_books.jpg" width="107" height="111" /><br />
Collected Fees</a>';
} else {
echo '<img src="images/overdue_books.jpg" width="107" height="111" /><br/>
Collected Fees';
}
?></td>
<td width="50%" ><?php if ($uri == "admin") {
echo '<a href="history.php?action=history"><img src="images/overdue_books.jpg" width="107" height="111" /><br />
Library Resources</a>';
} else {
echo '<img src="images/overdue_books.jpg" width="107" height="111" /><br />
Library Resources';
}
?></td>
</tr>
<tr>
<td></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table><?php } else {
echo "You are not allowed to access this page!";
}
?>
<hr />
<p> </p>
<p> </p>
</div>
</div>
<div class="lowercontent"></div>
<div class="footer1">
<table align="center">
<tr>
<td><img src="logo/anilag systems logo 300x155 trnsparent.png" /></td>
<td> </td>
<td><img src="images/isch.gif" width="200" height="70"/></td>
</tr>
</table></div>
<div class="footer">
<?php echo $system_title; ?><br /><?php echo $footer; ?>
</div>
</body>
</html>