From 0720091ca73b9714aab2b38c3682c15a0cbd4533 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 2 Jun 2011 17:20:54 -0700 Subject: Added pages --- htdocs/moderate/pages/index.php | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 htdocs/moderate/pages/index.php (limited to 'htdocs/moderate/pages/index.php') diff --git a/htdocs/moderate/pages/index.php b/htdocs/moderate/pages/index.php new file mode 100644 index 0000000..d6ffd87 --- /dev/null +++ b/htdocs/moderate/pages/index.php @@ -0,0 +1,52 @@ + + * + */ + +require_once('../../src/base.inc.php'); + +// Verify User is admin +if (!$_SESSION['currentUser']->isAdmin()) { + header('Location: ' . buildUrl('moderate/')); + exit; +} + +$error = ''; + +require_once('../src/header.inc.php'); + +echo "

Pages

"; + +echo "

Create Page

"; + +$pi = new PageIterator(); +$pi->query(); + +if ($pi->valid()) { + echo "
" + . "Title" + . " Actions
"; + + foreach ($pi as $page) { + printf("
" + . "%s" + . " " + . " edit" + . " delete
", + buildUrl('page/' . $page->getURL()), $page->getTitle(), + $page->getId(), $page->getId() + ); + } + +} else { + echo "

There are no pages to edit. Click the button above to create one.

"; +} + +require_once('../src/footer.inc.php'); + +?> -- cgit v1.2.3