<?php echo "<a href='inventory.php'><span class='glyphicon glyphicon-chevron-left'></span> Back to Inventory</a>"; ?> <br /><br /> <div class="panel panel-default"> <div class="panel-heading text-center">Gear Details</div> <div class="panel-body text-center"> <p> <?php echo "<strong>Gear ID:</strong> " . $gear_id . "<br /><br />"; echo "<strong>Name:</strong> " . $gearObject->getName() . "<br /><br />"; echo "<strong>Type:</strong> " . gearTypeWithID($gearObject->getType()) . "<br /><br />"; echo "<strong>Quantity:</strong> " . $gearObject->getQty() . "<br /><br />"; if (!$gearObject->isDisabled()) { echo "<strong>Enabled </strong><span class='glyphicon glyphicon-ok color-green'></span><br /><br />"; echo "<strong>Status:</strong> " . $gearObject->status(date('Y-m-d h:m:s')) . "<br /><br />"; } else { echo "<strong>Disabled </strong><span class='glyphicon glyphicon-remove color-red'></span><br /><br />"; } if (!empty($gearObject->getNotes())) { echo "<strong>Notes:</strong> <pre>" . $gearObject->getNotes() . "</pre><br />"; } //only show to admins if ($loggedInUser->checkPermission(array(2))) { echo "<a class='btn btn-primary' href='edit-gear.php?gear_id=" . $gear_id . "'>Edit</a> "; echo "<a class='btn btn-danger' href='gear-item.php?gear_id=" . $gear_id . "&deleteGearItem=" . $gear_id . "'>Delete</a>"; } ?> </p> </div> </div>
<tr> <!-- <th class="hidden-xs hidden-sm">ID</th> --> <th>Name</th> <th>Status</th> <th>Last Checkout</th> <th class="text-center">Quantity</th> </tr> </thead> <tbody> <?php foreach ($gearList as $gear) { $gearObject = new Gear(); $gearObject->fetch($gear['gear_id']); printf("<tr>"); printf("<td><a href='gear-item.php?gear_id=%s'>%s</a></td>", $gear['gear_id'], $gear['name']); echo "<td>" . $gearObject->status(date('Y-m-d h:m:s')) . "</td>"; $co_id = $gearObject->lastCheckoutID(); //fetchLastCheckout($gear['gear_id']); if (!empty($co_id)) { $co = new Checkout(); $co->retrieveCheckout($co_id); printf("<td><a href='checkout.php?co_id=%s'>%s</a></td>", $co_id, getPersonName($co->getPerson())); } else { //no last checkout printf("<td>n/a</td>"); } printf("<td class='text-center'>%s</td>", $gearObject->getQty()); //$gear['qty'] printf("</tr>"); } ?>