$the_asset = new Asset($connection); $the_asset->loadEntry($barcode); $the_asset->setCheckoutTo($connection->validate_string($_POST['checkoutTo'])); $the_asset->update(); } } else { if ($_GET['action'] == 'batchmove') { $location = new Location($connection); $location->loadEntry($_POST['location']); $barcodes = $_POST['barcodes']; foreach ($barcodes as $barcode) { $box->loadEntry($barcode); $box->setLocation($location->getIndex()); $box->update(); } $box->printForm('batchmove'); } } } } } } else { if ($_GET['action'] == 'find') { $box->printFindForm(); } else { if ($_GET['action'] == 'delete') { if (isset($_GET['confirm'])) { $box->deleteBox($_GET['barcode']); } else { $barcode = $_GET['barcode']; echo "<br><center>Are you sure?<br>\n\t\t\t\t\t<a href=\"index.php?action=delete&type=box&barcode={$barcode}&confirm=yes\">Yes</a> \n\t\t\t\t\t<a href=\"index.php\">No</a>\n\t\t\t\t\t</center>";