aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-20 23:59:17 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-20 23:59:17 -0500
commit716e58df8d4c4889bfaf574e231c0cc14479454f (patch)
treec8614b22d2d794c6ed868482707f6665b1d7dd3c /modules
parent5569f020cee0eaacddcdb2442447fde52644c465 (diff)
downloadbayonetcms-716e58df8d4c4889bfaf574e231c0cc14479454f.tar.gz
Added page list ability, but need clarification on how we are accessing
pages versus articles. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@385 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'modules')
-rw-r--r--modules/page/index.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/page/index.php b/modules/page/index.php
index e5ac25e..68dbb62 100644
--- a/modules/page/index.php
+++ b/modules/page/index.php
@@ -26,6 +26,38 @@ if(!defined("MODULE_FILE"))
global $db;
+/**
+ * List available pages.
+ * Only right now I don't know if the _pages table has been deprecated.
+ * I'm confused. -jhunk
+ */
+if(isset($_GET['list']))
+{
+ if($_GET['list'] == "true")
+ {
+ $result = $db->Query("SELECT title, page_id FROM bayonet_articles");
+ while(($row = $db->Fetch($result)) !== false)
+ {
+ $pages[] = $row;
+ }
+ mysql_free_result($result);
+
+ OpenTable();
+ echo "<div class=\"contentHeading\">Page Map</div>";
+ echo "<div class=\"content\">";
+ echo "<ul>";
+ foreach($pages as $page)
+ {
+ echo "<li>" . LinkPage($page['page_id'], $page['title']) . "</li>";
+ }
+ echo "</ul>";
+ echo "</div>";
+ CloseTable();
+
+ /* Kill module execution to prevent odd page results */
+ return;
+ }
+}
if(!isset($_GET['id']))
{