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 .= "
";
- }
-
- $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 .= "
";
+ }
+
+ $text .= "
";
+ $ns -> tablerender(LWLAN_11, $text);
+}
+
+
if ($action=='options')
{