if ($_GET['action'] == 'add') { $assettype->loadFromPage(); $assettype->insert(); } else { if ($_GET['action'] == 'edit') { $assettype->loadFromPage(); $assettype->update(); } } } else { if ($_GET['action'] == 'list') { $assettype->listAll(); } else { if ($_GET['action'] == 'delete') { if (isset($_GET['confirm'])) { $assettype->deleteAssetType($_GET['index']); } else { $index = $_GET['index']; echo "<br><center>Are you sure?<br>\n\t\t\t\t\t<a href=\"index.php?action=delete&type=assettype&index={$index}&confirm=yes\">Yes</a> \n\t\t\t\t\t<a href=\"index.php\">No</a>\n\t\t\t\t\t</center>"; } } else { if ($_GET['action'] == 'use') { $_SESSION['itemtype'] = $_GET['index']; } else { if ($_GET['action'] == 'edit') { $assettype->loadEntry($_GET['index']); $assettype->printForm($_GET['action']); } else { if ($_GET['action'] == 'listByType') { $assettype->listByType($_GET['index']); } else {