query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit) \n" . " VALUES ('0', '$cat_name', '$auto_toggle', '$show_images', '$show_description', \n" . " '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" . " '$text_after_all', $list_limit)"); header('Location: link-categories.php'); break; } // end addcat case 'Delete': { $cat_id = (int) $_GET['cat_id']; $cat_name=get_linkcatname($cat_id); if ($cat_id=="1") die(sprintf(__("Can't delete the %s link category: this is the default one"), $cat_name)); if ($user_level < 5) die (__("Cheatin' uh ?")); $wpdb->query("DELETE FROM $wpdb->linkcategories WHERE cat_id='$cat_id'"); $wpdb->query("UPDATE $wpdb->links SET link_category=1 WHERE link_category='$cat_id'"); header('Location: link-categories.php'); break; } // end delete case 'Edit': { include_once ('admin-header.php'); $cat_id = (int) $_GET['cat_id']; $row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $wpdb->linkcategories WHERE cat_id=$cat_id"); if ($row) { if ($row->list_limit == -1) { $row->list_limit = ''; } ?>

cat_name)); ?>


title regardless)') ?>

title regardless)') ?>

query("UPDATE $wpdb->linkcategories set cat_name='$cat_name', auto_toggle='$auto_toggle', show_images='$show_images', show_description='$show_description', show_rating='$show_rating', show_updated='$show_updated', sort_order='$sort_order', sort_desc='$sort_desc', text_before_link='$text_before_link', text_after_link='$text_after_link', text_after_all='$text_after_all', list_limit=$list_limit WHERE cat_id=$cat_id "); } // end if save header("Location: link-categories.php"); break; } // end editcat default: { include_once ("admin-header.php"); if ($user_level < 5) { die(__("You have do not have sufficient permissions to edit the link categories for this blog. :)")); } ?>

get_results("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $wpdb->linkcategories ORDER BY cat_id"); $i = 1; foreach ($results as $row) { if ($row->list_limit == -1) { $row->list_limit = __('none'); } $style = ($i % 2) ? ' class="alternate"' : ''; /* Manually internationalize every sort order option. */ switch ($row->sort_order) { case 'name': $row->sort_order = __('name'); break; case 'id': $row->sort_order = __('id'); break; case 'url': $row->sort_order = __('url'); break; case 'rating': $row->sort_order = __('rating'); break; case 'updated': $row->sort_order = __('updated'); break; case 'rand': $row->sort_order = __('rand'); break; case 'length': $row->sort_order = __('length'); break; } ?> style="border-bottom: 1px dotted #9C9A9C;">
 
cat_name)?> cat_id?> auto_toggle == 'Y' ? __('Y') : __('N') ?> show_images == 'Y' ? __('Y') : __('N') ?> show_description == 'Y' ? __('Y') : __('N') ?> show_rating == 'Y' ? __('Y') : __('N') ?> show_updated == 'Y' ? __('Y') : __('N') ?> sort_order ?> sort_desc == 'Y' ? __('Y') : __('N') ?> text_before_link)?>  text_after_link)?>  text_after_all)?> list_limit ?> ');" class="delete">


title regardless)') ?>

title regardless)') ?>

Deleting a link category does not delete links from that category.
It will just set them back to the default category %s.'), get_linkcatname(1)) ?>