query("INSERT INTO $tablelinkcategories (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: 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"]; $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 $tablelinkcategories WHERE cat_id=$cat_id"); if ($row) { if ($row->list_limit == -1) { $row->list_limit = ''; } ?>
Edit Link Category 'cat_name?>'
Add a Link Category: | |
---|---|
Name: | auto-toggle? |
Show: | images description rating updated |
Sort order: |
Descending? |
Text/HTML | |
before: | |
between: | |
after: | |
limit: | (leave empty for no limit) |