$cat_name".mysql_error()); 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 ?"); $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"); 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:
Link Categories: | ||
Add a link category: |