From 46cb4a07cfe1fc2c68b2a9ede05f92753eb44ce2 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Thu, 22 May 2003 01:28:49 +0000 Subject: [PATCH] Assorted changes, plus moved most of the links files to subdir wp-links. git-svn-id: https://develop.svn.wordpress.org/trunk@36 602fd350-edb4-49c9-b593-d223f7449a82 --- b2-include/b2.css | 2 +- index.php | 5 ++--- linkcategories.php | 35 +++++++++++++++++------------------ linkmanager.php | 14 +++++++------- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/b2-include/b2.css b/b2-include/b2.css index 2fa527f7a4..ff9538bb77 100644 --- a/b2-include/b2.css +++ b/b2-include/b2.css @@ -133,4 +133,4 @@ xmp { /* Just in case */ margin: 20px auto 10px auto; padding: 10px; } -form { margin: 0; padding: 0; } /* thanks #mozilla */ \ No newline at end of file +form { margin: 0; padding: 0; } /* thanks #mozilla */ diff --git a/index.php b/index.php index 50760385ca..2a10ca2158 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,6 @@

-
@@ -105,8 +104,8 @@
  • register
  • - - + +
  • Links:
      ', '', '', 0, '_updated', 0, 0, -1, 1 )?> diff --git a/linkcategories.php b/linkcategories.php index 95ba031c22..6689f0e548 100644 --- a/linkcategories.php +++ b/linkcategories.php @@ -27,8 +27,8 @@ // Mike Little (mike@zed1.com) // ***************************************************************** -include_once('links.config.php'); -include_once('links.php'); +require_once('wp-links/links.config.php'); +require_once('wp-links/links.php'); $title = "Link Categories"; @@ -52,11 +52,11 @@ switch ($action) { case "addcat": { $standalone = 1; - include_once("./b2header.php"); + require_once("./b2header.php"); if ($user_level < $minadminlevel) die ("Cheatin' uh ?"); - + $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); $auto_toggle = $HTTP_POST_VARS["auto_toggle"]; if ($auto_toggle != 'Y') { @@ -65,15 +65,14 @@ switch ($action) { $query="INSERT INTO $tablelinkcategories (cat_id,cat_name, auto_toggle) VALUES ('0', '$cat_name', '$auto_toggle')"; $result=mysql_query($query) or die("Couldn't add category $cat_name".mysql_error()); - + header("Location: linkcategories.php"); break; } // end addcat case "Delete": { $standalone = 1; - include_once("./b2header.php"); - include_once("./links.php"); + require_once("./b2header.php"); $cat_id = $HTTP_POST_VARS["cat_id"]; $cat_name=get_linkcatname($cat_id); @@ -84,10 +83,10 @@ switch ($action) { if ($user_level < $minadminlevel) die ("Cheatin' uh ?"); - + $query="DELETE FROM $tablelinkcategories WHERE cat_id=\"$cat_id\""; $result=mysql_query($query) or die("Couldn't delete link category $cat_name".mysql_error()); - + $query="UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"; $result=mysql_query($query) or die("Couldn't reset category on links where category was $cat_name"); @@ -96,11 +95,10 @@ switch ($action) { } // end delete case "Edit": { - include_once ("./b2header.php"); - include_once("./links.php"); + require_once ("./b2header.php"); $cat_id = $HTTP_POST_VARS["cat_id"]; $cat_name=get_linkcatname($cat_id); - $cat_name=addslashes($cat_name); + //$cat_name=addslashes($cat_name); $auto_toggle=get_autotoggle($cat_id); ?> @@ -112,10 +110,11 @@ switch ($action) { " />
      - /> auto-toggle?
      + /> auto-toggle?

      +

      Back to manage link categories

      $cat_name: ".$query.mysql_error()); - + header("Location: linkcategories.php"); break; - } // end edit + } // end editedcat default: { $standalone=0; - include_once ("./b2header.php"); + require_once ("./b2header.php"); if ($user_level < $minadminlevel) { die("You have no right to edit the link categories for this blog.
      Ask for a promotion to your blog admin :)"); } diff --git a/linkmanager.php b/linkmanager.php index a837e4f9cf..e0391a6bd8 100644 --- a/linkmanager.php +++ b/linkmanager.php @@ -27,8 +27,8 @@ // Mike Little (mike@zed1.com) // ***************************************************************** -include_once('links.config.php'); -include_once("./links.php"); +require_once('wp-links/links.config.php'); +require_once("wp-links/links.php"); $title = "Manage Links"; @@ -75,7 +75,7 @@ switch ($action) { case "Add": { $standalone = 1; - include_once("./b2header.php"); + require_once("./b2header.php"); $link_url = $HTTP_POST_VARS["linkurl"]; $link_name = $HTTP_POST_VARS["name"]; @@ -124,7 +124,7 @@ switch ($action) { $links_show_cat_id = $cat_id; $standalone = 1; - include_once("./b2header.php"); + require_once("./b2header.php"); $link_id = $HTTP_POST_VARS["link_id"]; $link_url = $HTTP_POST_VARS["linkurl"]; @@ -167,7 +167,7 @@ switch ($action) { case "Delete": { $standalone = 1; - include_once("./b2header.php"); + require_once("./b2header.php"); $link_id = $HTTP_POST_VARS["link_id"]; @@ -192,7 +192,7 @@ switch ($action) { case "linkedit": { $standalone=0; - include_once ("./b2header.php"); + require_once ("./b2header.php"); if ($user_level < $minadminlevel) { die("You have no right to edit the links for this blog.
      Ask for a promotion to your blog admin :)"); } @@ -326,7 +326,7 @@ switch ($action) { $order_by = 'order_id'; setcookie('links_show_cat_id', $links_show_cat_id, time()+600); $standalone=0; - include_once ("./b2header.php"); + require_once ("./b2header.php"); if ($user_level < $minadminlevel) { die("You have no right to edit the links for this blog.
      Ask for a promotion to your blog admin :)"); }