</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\">\n\t\t\n\n\t\t<div class=\"col-md-12\">\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t<div class=\"panel-body\">";
echo "<div class=\"container\">\n\t\t\t\t\t<h2>Fertilizer Requests</h2>\n\t\t\t\t\t\t            \n\t\t\t\t\t<table class=\"table\">\n\t\t\t\t<thead>\n\t\t\t\t\n\t\t\t\t <tr>\n\t\t\t\t\t<th>Request ID</th>\n\t\t\t\t\t<th>Fertilizer Catagory</th>\n\t\t\t\t\t<th>Name of Fertilizer</th>\n\t\t\t\t\t<th>Quantity</th>\n\t\t\t\t\t<th>Requested date</th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<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.php?id={$idn}'><h4>Edit Request</h4></a></td><td>";
    echo "<a href='del_fer_req.php?id={$idn}'><h4>Cancel Request</h4></a></td>";
    echo "<br/></tr>";
}
echo "</tbody>\n\t\t\t\t</table>\n\t\t\t\t</div>";
echo "</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>";
?>