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 pathallotted.php
119 lines (103 loc) · 3.79 KB
/
allotted.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
<?php ob_start(); ?>
<?php
session_start();
if($_SESSION['key']!='admin')
{ session_destroy();
header( 'Location: ./index.php');
}
Header("Cache-control: private, no-cache");
Header("Expires: Mon, 26 Jun 1997 05:00:00 GMT");
Header("Pragma: no-cache");
?>
<?php
include("./cnn.php");
$sql = "select * from request where Status='Y' order by Reqid";
?>
<!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>Allotted</title>
</head>
<body>
<?php
if(isset($_POST["jumpMenu"]))
if($_POST["jumpMenu"] != "NULL" && $_POST["jumpMenu"] != "" && $_POST["jumpMenu"] != "All")
{ $bgroup = trim($_POST["jumpMenu"]);
$sql = "select * from request where BGroup = '$bgroup' and Status='Y' order by ReqID";
}
if($_POST["jumpMenu"] != "NULL" && $_POST["jumpMenu"] == "All")
$sql = "select * from request where Status='Y' order by Reqid";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="848" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><a href="index.php"><img src="images/title.jpg" width="1000" height="121" border="0" /></a></td>
</tr>
<tr bgcolor="#CC9933">
<td width="867" height="34"><strong> List of donors Blood Group
<?php
echo $bgroup;
?>
</strong></td>
<td width="133"><form id="form1" name="form1" method="post" action="">
<select name="jumpMenu" size="1" id="jumpMenu" onchange="form1.submit();">
<option>Select</option>
<option>All</option>
<option>O+ve</option>
<option>A+ve</option>
<option>B+ve</option>
<option>AB+ve</option>
<option>O-Ve</option>
<option>A-ve</option>
<option>B-ve</option>
<option>AB-ve</option>
</select>
</form> </td>
</tr>
<tr bgcolor="#CC9933">
<td height="146" colspan="2"><table width="89%" border="1" align="center" cellpadding="4" cellspacing="0">
<tr>
<th>Req ID</th>
<th>Name</th>
<th>Contact P</th>
<th>Contact No</th>
<th>Blood Group</th>
<th>Quantity</th>
<th>Needed Date</th>
</tr>
<?php
if($rst = mysql_query($sql))
{
$i = 0;
$rcolor="#CC9933";
while ($row = mysql_fetch_array($rst))
{
if($rcolor == "#CC9933") $rcolor = "#FFFFFF";
else $rcolor = "#CC9933";
?>
<tr>
<td width="5%" style="padding-top:5px" bgcolor=" <?php echo $rcolor;?>"> <?php echo $row["ReqID"];?></td>
<td width="24%" style="padding-top:5px" bgcolor="<?php echo $rcolor;?>"> <?php echo $row["PName"];?></td>
<td width="25%" style="padding-top:5px" bgcolor="<?php echo $rcolor;?>"> <?php echo $row["ContactP"];?></td>
<td width="13%" style="padding-top:5px"bgcolor="<?php echo $rcolor;?>"><?php echo $row["ContactPh"]; ?></td>
<td width="8%" style="padding-top:5px" bgcolor="<?php echo $rcolor;?>"> <?php echo $row["BGroup"];?></td>
<td width="13%" style="padding-top:5px" bgcolor="<?php echo $rcolor;?>"><?php echo $row["Quantity"];?></td>
<td width="12%" style="padding-top:5px"bgcolor="<?php echo $rcolor;?>"><?php echo $row["NeedDate"]; ?></td>
</tr>
<?php
}
}else
echo "No Entries found....";
?>
</table></td>
</tr>
<tr bgcolor="#990000">
<td height="15" colspan="2"><div align="right"><span class="style4"><a href="main.php">HOME</a> </span> </div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>