} elseif ($id_show > 0) {
    $faq_categories->change_visibility($id_show, CAT_VISIBLE, LOAD_CACHE);
    redirect(url('admin_faq_cats.php'));
} elseif ($id_hide > 0) {
    $faq_categories->change_visibility($id_hide, CAT_UNVISIBLE, LOAD_CACHE);
    redirect(url('admin_faq_cats.php'));
} elseif ($cat_to_del > 0) {
    $Template->assign_vars(array('L_REMOVING_CATEGORY' => $FAQ_LANG['removing_category'], 'L_EXPLAIN_REMOVING' => $FAQ_LANG['explain_removing_category'], 'L_DELETE_CATEGORY_AND_CONTENT' => $FAQ_LANG['delete_category_and_its_content'], 'L_MOVE_CONTENT' => $FAQ_LANG['move_category_content'], 'L_SUBMIT' => $LANG['delete']));
    $Template->assign_block_vars('removing_interface', array('CATEGORY_TREE' => $faq_categories->build_select_form(0, 'id_parent', 'id_parent', $cat_to_del), 'IDCAT' => $cat_to_del));
} elseif (!empty($_POST['submit'])) {
    $error_string = 'e_success';
    if (!empty($cat_to_del_post)) {
        $delete_content = !empty($_POST['action']) && $_POST['action'] == 'move' ? false : true;
        $id_parent = retrieve(POST, 'id_parent', 0);
        if ($delete_content) {
            $faq_categories->Delete_category_recursively($cat_to_del_post);
        } else {
            $faq_categories->Delete_category_and_move_content($cat_to_del_post, $id_parent);
        }
    } else {
        $id_cat = retrieve(POST, 'idcat', 0);
        $id_parent = retrieve(POST, 'id_parent', 0);
        $name = retrieve(POST, 'name', '');
        $image = retrieve(POST, 'image', '');
        $description = retrieve(POST, 'description', '', TSTRING_PARSE);
        if (empty($name)) {
            redirect(url(HOST . SCRIPT . '?error=e_required_fields_empty#errorh'), '', '&');
        }
        if ($id_cat > 0) {
            $error_string = $faq_categories->Update_category($id_cat, $id_parent, $name, $description, $image);
        } else {