From 803c8caf56e3984a7eae9afeda895cd55e5abd1b Mon Sep 17 00:00:00 2001 From: e107steved Date: Tue, 6 Mar 2007 20:17:16 +0000 Subject: [PATCH] Reorder admin page a bit --- e107_plugins/linkwords/admin_config.php | 94 +++++++++++++------------ 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/e107_plugins/linkwords/admin_config.php b/e107_plugins/linkwords/admin_config.php index 7352ce951..5cf7c0b6a 100644 --- a/e107_plugins/linkwords/admin_config.php +++ b/e107_plugins/linkwords/admin_config.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-02-08 20:18:33 $ +| $Revision: 1.4 $ +| $Date: 2007-03-06 20:17:10 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -99,8 +99,8 @@ if (isset($_POST['submit_linkword'])) { $word = $tp -> toDB($_POST['linkword_word']); $link = $tp -> toDB($_POST['linkword_link']); - $active = $_POST['linkword_active']; - $sql -> db_Insert("linkwords", "0, $active, '$word', '$link' "); + $active = intval($_POST['linkword_active']); + $sql -> db_Insert("linkwords", "0, {$active}, '{$word}', '{$link}' "); $message = LWLAN_2; } } @@ -129,48 +129,6 @@ if (isset($message)) } -if (($action == 'words') || ($action == 'edit')) -{ - $text = "
\n"; - if(!$sql -> db_Select("linkwords")) - { - $text .= LWLAN_4; - } - else - { - $text = " - - - - - - - \n"; - - while($row = $sql -> db_Fetch()) - { - extract($row); - $text .= " - - - - - - - - - \n"; - } - $text .= "
".LWLAN_5."".LWLAN_6."".LWLAN_7."".LWLAN_8."
$linkword_word$linkword_link".(!$linkword_active ? LWLAN_12 : LWLAN_13)." - - -
"; - } - - $text .= "
"; - $ns -> tablerender(LWLAN_11, $text); -} - if($action == "edit") { @@ -230,6 +188,50 @@ $ns -> tablerender(LWLAN_31, $text); } +// Now display existing linkwords +if (($action == 'words') || ($action == 'edit')) +{ + $text = "
\n"; + if(!$sql -> db_Select("linkwords")) + { + $text .= LWLAN_4; + } + else + { + $text = " + + + + + + + \n"; + + while($row = $sql -> db_Fetch()) + { + extract($row); + $text .= " + + + + + + + + + \n"; + } + $text .= "
".LWLAN_5."".LWLAN_6."".LWLAN_7."".LWLAN_8."
$linkword_word$linkword_link".(!$linkword_active ? LWLAN_12 : LWLAN_13)." + + +
"; + } + + $text .= "
"; + $ns -> tablerender(LWLAN_11, $text); +} + + if ($action=='options') {