function MCW_delete_filter($index) { $myfilter = MCW_get_all_filters(); unset($myfilter[$index]); $myfilter = array_values($myfilter); MCW_set_filters($myfilter); }
</div> <?php } } } else { if ($_POST[$button_name_submit . '_add'] == $button_text_add) { //add filter $cache_filters = MCW_get_all_filters(); if ($add_cache[0] == "" || $add_cache[1] == "") { echo '<div class="error"><p><b>Please enter a name and a check to create a new filter!</b></p></div>'; } else { if (MCW_filter_already_exist($add_cache[0])) { echo '<div class="error"><p><b>Filter "' . $add_cache[0] . '" allready exists!</b></p></div>'; } else { $cache_filters[] = $add_cache; MCW_set_filters($cache_filters); $cache_options = MCW_get_option(); ?> <div id="message" class="updated fade"> <p> <strong> <?php echo 'Filter "' . $add_cache[0] . '" added'; ?> </strong> </p> </div> <?php $add_cache = array(); } }