From 44a18f3e13077138af782f96cffb39294bca6283 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Thu, 24 Dec 2009 21:39:09 +0000 Subject: (OC) fixed some display stuff for the debug console git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@398 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- admin/pages/functions.php | 53 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 27 deletions(-) (limited to 'admin/pages/functions.php') diff --git a/admin/pages/functions.php b/admin/pages/functions.php index 3f8f59f..c4d4369 100644 --- a/admin/pages/functions.php +++ b/admin/pages/functions.php @@ -111,6 +111,11 @@ function NewArticle($page_id) Query("SELECT title FROM bayonet_articles WHERE article_id = '$article_id'"); + $result = $db->Query("SELECT `title` FROM `bayonet_articles` WHERE `article_id` = '$article_id'"); $article = $db->Fetch($result); if(isset($_POST['proceed'])) { echo "Article '{$article['title']}', was deleted."; $db->Query("DELETE FROM bayonet_articles WHERE article_id = '$article_id' LIMIT 1"); - PageRedirect(2, "?op=pages"); + PageRedirect(2, "?op=pages&edit={$_GET['edit']}"); return; } if(isset($_POST['cancel'])) @@ -219,48 +224,42 @@ function ListPages($pid = NULL) foreach($pages as $page) { - if($pid == $page['page_id']) + $edit = false; + if($pid == $page['page_id']){ + $edit = true; echo ''; - else + }else echo ''; ?> - + + + + - - - - - + - +  View this Page','../index.php?load=page&id='.$pid.'" target=\"blank'); ?> - + +  Edit this Page','?op=pages&edit=true&pid='.$pid); ?> + + + +  Delete this Page','?op=pages&delete='.$pid); ?> "; } -- cgit