if ($admin->removeContent($_GET['id'])) { $success = "Removed the content with id: " . $_GET['id']; } else { $error = "Could not remove the content with id: " . $_GET['id']; } } } } } } $pagearray = $admin->getSiteMenuArray(true); $pages = ""; foreach ($pagearray as $v) { $pages .= "\n <option value='" . $v['id'] . "'>" . $v['name'] . "</option>\n"; } $typearray = $admin->getContentTypesArray(); $types = ""; foreach ($typearray as $v) { $types .= "\n <option value='" . $v['type'] . "'>" . $v['name'] . "</option>\n"; } $contents = ""; foreach ($pagearray as $v) { $contentsarray = $admin->getContentsFromPage($v['id']); $contents .= "\n <fieldset class=\"field_set margin_15\">\n <legend>" . $v['name'] . "</legend>\n "; $notempty = false; foreach ($contentsarray as $p) { $notempty = true; $contents .= "\n\n <div class=\"field_set padding_5 margin_10\">\n <label>Name: </label><span class=\"blue\">" . $p['name'] . "</span> \n <label>Type: </label><span class=\"green\">" . $admin->getTypeName($p['type']) . "</span>\n <!-- TODO: Make float right -->\n <div class=\"inline \">\n <a href=\"index.php?page=content&action=remove&id=" . $p['id'] . "\">\n <button type=\"button\">Remove</button>\n </a> \n <a href=\"index.php?page=content&action=unlink&id=" . $p['id'] . "\">\n <button type=\"button\">Unlink</button>\n </a>\n <a href=\"index.php?page=content&action=edit&id=" . $p['id'] . "\">\n <button type=\"button\">Edit Content</button>\n </a>\n </div>\n </div>\n\n "; } if (!$notempty) { $contents .= "No content, please add..";