public function printCIFormP2() { $the_box = new Box($this->connection); $the_box->loadEntry($this->box); echo "<center>\n\t\tCheckin Asset<br>\n\t\t<form action=\"index.php?action=checkin2&type=asset\" method=\"post\" enctype=\"multipart/form-data\">\n\t\tAsset Barcode: <br>\n\t\t<input type=\"text\" name=\"barcode\" value=\"{$_POST['barcode']}\"> <br>\n\t\tCurrent Box Name: {$the_box->getDescription()}<br>\n\t\tBox Barcode: <br>\n\t\t<input type=\"text\" name=\"box\" value=\"{$this->box}\"><br>\n\t\t<input type=\"submit\" name=\"submit\" value=\"Confirm Box\">\n\t\t</form>\n\t\t</center"; }
while ($row = $connection->fetch_row()) { $barcodes[] = $row[0]; } foreach ($barcodes as $barcode) { $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'])) {