This repository has been archived by the owner on Aug 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathstockdisplay.php
73 lines (66 loc) · 2.64 KB
/
stockdisplay.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
<?php ob_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
if($_SESSION['key']!='admin'){
session_destroy();
header( 'Location: ./index.php');
}
require('cnn.php');
require('calculate_class.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Stock List</title>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="900" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="900" colspan="3"><a href="main.php"><img src="images/title.jpg" width="1000" height="121" /></a></td>
</tr>
<tr bgcolor="#CC9933">
<td height="292" colspan="3">
<table width="39%" border="1" align="center" cellpadding="4" cellspacing="0">
<tr>
<th>Blood Group</th>
<th>Quantity</th>
</tr>
<?php
$sql = "SELECT Bloodgroup, COUNT(*) FROM registration WHERE Moderation = 1 GROUP BY Bloodgroup";
$rst = mysql_query($sql);
while ($row = mysql_fetch_array($rst)) {
?>
<tr>
<td width="53%" style="padding-top:5px" ><div align="center"><?php echo $row["Bloodgroup"]; ?></div></td>
<td width="29%" style="padding-top:5px" ><div align="center"><?php echo $row["COUNT(*)"]; ?></div></td>
</tr>
<?php } ?>
<tr>
<td width="53%" style="padding-top:5px"><div align="center"><b>Total</b></div></td>
<td width="53%" style="padding-top:5px"><div align="center">
<b>
<?php
$sql = "SELECT COUNT(*) FROM `registration` WHERE Moderation=1";
$rst = mysql_query($sql);
$row = mysql_fetch_array($rst);
echo $row["COUNT(*)"];
?>
</b></div>
</td>
</tr>
<?php mysql_close($link); ?>
</table>
</td>
</tr>
<tr bgcolor="#990000">
<td height="15" colspan="3"><div align="right"><span class="style4"><a href="main.php">HOME</a> </span> </div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>