-
Notifications
You must be signed in to change notification settings - Fork 0
/
view_fer_req_cus.php
199 lines (138 loc) · 5.8 KB
/
view_fer_req_cus.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
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
<!doctype html>
<html>
<head>
<meta charset = "utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>View Your fertilizer Requests</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- start of the navigation bar -->
<nav class="navbar navbar-inverse navbar-static-top no-margin" roll="navigation"> <!-- navigation bar -->
<div class="container-fluid"> <!-- reserve area for css fluid-for moved to left corner -->
<div class="navbar-header">
<!-- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> -->
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href=""><img src="images/icon1.png"></a> <!-- for replace with image: <img src="path of the image file"> -->
</div>
<!--</div>-->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1"> <!-- style="float:right; -->
<ul class="nav navbar-nav nav-tabs"><!-- ul=url --><!-- and Tabs -->
<li><a href="mainwindow.php"><font color="green">Home</font></a></li><!--home nav-->
<li class="dropdown"><!--Request nav-->
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><font color="green">Requests</font> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="fertilizer_req.php"><font color="green">Fertilizer request</font></a></li>
<li><a href="advance_payment_req.php"><font color="green">Advance payment request</font></a></li>
<li role="separator" class="divider"></li>
<li><a href="view_fer_req_cus.php"><font color="green">View sent requests</font></a></li>
<li role="separator" class="divider"></li>
<li><a href="view_ad_req_cus.php"><font color="green">View sent requests</font></a></li>
</ul>
</li>
<li><a href="contact.html"><font color="green">Contact</font></a></li>
<li><a href="about.html"><font color="green">About us</font></a></li>
<!--Start of the log out form-->
<ul class="nav navbar-nav navbar-right">
<li><p class="navbar-text"><font color="green">Are you want to logout ?</font></p></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b><font color="green">Logout</font></b> <span class="caret"></span></a>
<ul id="login-dp" class="dropdown-menu">
<li>
<div class="row">
<div class="col-md-12">
<font color="green">Are you sure you want to log-out?</font>
<form class="form" role="form" method="post" action="index.php">
<li>
<button class="btn btn-success" data-toggle="modal" data-target=".bs-example-modal-sm">Logout</button>
</li>
</form>
</div>
</div>
</li>
</ul>
</li>
</ul>
<!--End of the log out form-->
</ul>
</div>
</div>
</nav>
<!-- End of the navigation bar -->
<?php
require_once("includes/initialize.php");
require_once("includes/request.php");
echo "<div class=\"row\">
<div class=\"col-md-12\">
<div class=\"panel panel-default\">
<div class=\"panel-body\">";
echo "<div class=\"container\">
<h2>Fertilizer Requests</h2>
<table class=\"table\">
<thead>
<tr>
<th>Request ID</th>
<th>Fertilizer Catagory</th>
<th>Name of Fertilizer</th>
<th>Quantity</th>
<th>Requested date</th>
</tr>
</thead>
<tbody>";
$arr=Request::find_all();
foreach ($arr as $st){
echo "<tr><td>";
echo $st->req_id."</td>"."<td>";
echo $st->fer_type."</td><td>";
echo $st->name."</td><td>";
echo $st->quantity."</td><td>";
echo $st->date."</td><td>";
$idn=$st->req_id;
echo "<a href='edit_fer_req_cus.php?id=$idn'><h4>Edit Request</h4></a></td><td>";
echo "<a href='del_fer_req_cus.php?id=$idn'><h4>Cancel Request</h4></a></td>";
echo "<br/></tr>";
}
echo "</tbody>
</table>
</div>";
echo "</div>
</div>
</div>
</div>";
?>
<!-- End of the Forms -->
<!-- start of the footer -->
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-md-5">
<h4><font color="green">Contact Address</font></h4>
<address>
<font color="green">Thilanka Tea Collecting Center,<br> Warakapalahena,<br> Nakiyadeniya,<br> Galle.</font>
</address>
</div>
</div>
<div class="bottom-footer">
<div class="col-md-5"><font color="green">@ Copyright Thilanka Tea Center 2015.</font></div>
<div class="col-md-7">
<ul class="footer-nav">
<li><a href="#"><font color="green">Index</font></a></li>
<li><a href="#"><font color="green">Contact</font></a></li>
<li><a href="#"><font color="green">About Us</font></a></li>
</ul>
</div>
</div>
</div>
</footer>
<!-- End of the footer -->
<script type="text/javascript" src = "js/jquery.js"> </script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>