<?php

/* complementary file to wp-list-main-cats.php */

if (current_user_can('manage_categories')) {
	if ($_GET['addcat']) {
		$cat = $_GET['addcat'];
		if (!is_numeric($cat)) die;
		main_cats_add_category($cat);
	} elseif ($_GET['removecat']) {
		$cat = $_GET['removecat'];
		if (!is_numeric($cat)) die;
		main_cats_remove_category($cat);
	}
}

header("Location: categories.php");
die;

?>