query("INSERT INTO $tablelinkcategories (cat_id,cat_name, auto_toggle) VALUES ('0', '$cat_name', '$auto_toggle')"); header("Location: linkcategories.php"); break; } // end addcat case "Delete": { $standalone = 1; include_once("./b2header.php"); $cat_id = $HTTP_POST_VARS["cat_id"]; $cat_name=get_linkcatname($cat_id); $cat_name=addslashes($cat_name); if ($cat_id=="1") die("Can't delete the $cat_name link category: this is the default one"); if ($user_level < $minadminlevel) die ("Cheatin' uh ?"); $wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'"); $wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"); header("Location: linkcategories.php"); break; } // end delete case "Edit": { include_once ("./b2header.php"); $cat_id = $HTTP_POST_VARS["cat_id"]; $cat_name=get_linkcatname($cat_id); $cat_name=addslashes($cat_name); $auto_toggle=get_autotoggle($cat_id); ?>

Old name:

New name:
" />
/> auto-toggle?

query("UPDATE $tablelinkcategories SET cat_name='$cat_name', auto_toggle='$auto_toggle' WHERE cat_id=$cat_id"); header("Location: linkcategories.php"); break; } // end edit default: { $standalone=0; include_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 :)"); } ?>
Link Categories:
Edit a link category:
get_results("SELECT cat_id, cat_name, auto_toggle FROM $tablelinkcategories ORDER BY cat_id"); echo " \n"; ?>

Add a link category:
  auto-toggle?

Note:
Deleting a link category does not delete links from that category.
It will just set them back to the default category .