-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathselectmgmt1.php
86 lines (69 loc) · 1.9 KB
/
selectmgmt1.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
<html>
<head> <link rel="stylesheet" type="text/css" href="style2.css"/></head>
<body>
<center><br><br>
<h1>Current Budget Proposal </h1>
<?php
$date=$_GET["sub"];
$connection=mysql_connect("localhost","root");
mysql_select_db("budget");
$sql="select * from req where sdate ='$date';";
$record=mysql_query($sql);
?>
<center><br><br>
<table width ="800" border="1" cellpadding="5" cellspacing="1">
<tr>
<th>S.NO</th>
<th>DESCRIPTION</th>
<th>PROJECT COORDINATOR</th>
<th>EXPECTED DATE OF DELIVERY OF ITEM</th>
<th>PRIORITY</th>
<th>CLASSIFICATION OF WORK</th>
<th>REAMRKS</th>
<th>JUSTIFICATION</th>
<th>SUBMISSION DATE</th>
<th>STATUS</th>
<tr>
<?PHP
while($req=mysql_fetch_assoc($record))
{
echo "<tr>";
echo "<td>".$req['ID']."</td>";
echo "<td>".$req['DESCRIPTION']."</td>";
echo "<td>".$req['PROJECT_COORDINATOR']."</td>";
echo "<td>".$req['EXPECTED_DATE']."</td>";
echo "<td>".$req['PRIORITY']."</td>";
echo "<td>".$req['CLASSIFICATION']."</td>";
echo "<td>".$req['REMARK']."</td>";
echo "<td>".$req['JUSTIFICATION']."</td>";
echo "<td>".$req['SDATE']."</td>";
echo "<td>".$req['STATUS']."</td>";
echo "</tr>";
}
?>
<form action="" method="post">
<input type = "submit" value ="Accept" name="accept" />
<input type = "submit" value ="Reject" name="reject" /></form></BR></BR>
</center>
<?php
$date=$_GET["sub"];
$connection=mysql_connect("localhost","root");
mysql_select_db("budget");
if(isset($_POST['accept']))
{
$sqlquery="UPDATE req SET STATUS='ACCEPTED BY MANAGEMENT' WHERE SDATE='$date';";
$result=mysql_query($sqlquery,$connection);
echo "ACCEPTED BY MANAGEMENT ";
}
else if(isset($_POST['reject']))
{
echo "REJECTED BY MANAGEMENT";
$sqlquery="UPDATE req
SET STATUS='REJECTED BY MANAGEMENT'
WHERE SDATE='$date';";
$result=mysql_query($sqlquery,$connection);
}
?>
</BR></BR>
</body>
</html>