// This block is used to keep correct css style for the post status banners
echo '<div class="evo_content_block">';
if ($action == 'view') {
    // We are displaying a single post:
    echo '<div class="global_actions">' . action_icon(T_('Close post'), 'close', regenerate_url('p,action', 'filter=restore&amp;highlight=' . $p), NULL, NULL, NULL, array('class' => 'action_icon btn btn-default')) . '</div>';
    // Initialize things in order to be ready for displaying.
    $display_params = array('header_start' => '', 'header_text_single' => '', 'header_end' => '', 'footer_start' => '', 'footer_text_single' => '', 'footer_end' => '', 'disp_rating_summary' => true);
} else {
    // We are displaying multiple posts ( Not a single post! )
    $block_item_Widget->title = T_('Posts Browser') . get_manual_link('browse-edit-tab');
    if ($ItemList->is_filtered()) {
        // List is filtered, offer option to reset filters:
        $block_item_Widget->global_icon(T_('Reset all filters!'), 'reset_filters', '?ctrl=items&amp;blog=' . $Blog->ID . '&amp;filter=reset', T_('Reset filters'), 3, 3, array('class' => 'action_icon btn-warning'));
    }
    // Generate global icons depending on seleted tab with item type
    item_type_global_icons($block_item_Widget);
    $block_item_Widget->disp_template_replaced('block_start');
    // --------------------------------- START OF CURRENT FILTERS --------------------------------
    skin_widget(array('widget' => 'coll_current_filters', 'ItemList' => $ItemList, 'block_start' => '', 'block_end' => '', 'block_title_start' => '<b>', 'block_title_end' => ':</b> ', 'show_filters' => array('time' => 1), 'display_button_reset' => false, 'display_empty_filter' => true));
    // ---------------------------------- END OF CURRENT FILTERS ---------------------------------
    $block_item_Widget->disp_template_replaced('block_end');
    global $AdminUI;
    $admin_template = $AdminUI->get_template('Results');
    // Initialize things in order to be ready for displaying.
    $display_params = array('header_start' => str_replace('class="', 'class="NavBar center ', $admin_template['header_start']), 'footer_start' => str_replace('class="', 'class="NavBar center ', $admin_template['footer_start']));
}
$ItemList->display_init($display_params);
// Display navigation:
$ItemList->display_nav('header');
/*
 * Display posts:
$ItemList->filter_area = array('callback' => 'callback_filter_item_list_table', 'hide_filter_button' => true);
/*
	**
	 * Callback to add filters on top of the result set
	 *
	function filter_on_post_title( & $Form )
	{
		global $pagenow, $post_filter;

		$Form->hidden( 'filter_on_post_title', 1 );
		$Form->text( 'post_filter', $post_filter, 20, T_('Task title'), '', 60 );
	}
	$ItemList->filters_callback = 'filter_on_post_title';
*/
$ItemList->title = sprintf(T_('"%s" list'), $tab_type) . get_manual_link('browse-edit-tab');
// Initialize Results object
items_results($ItemList, array('tab' => $tab));
if ($ItemList->is_filtered()) {
    // List is filtered, offer option to reset filters:
    $ItemList->global_icon(T_('Reset all filters!'), 'reset_filters', '?ctrl=items&amp;blog=' . $Blog->ID . '&amp;filter=reset', T_('Reset filters'), 3, 3, array('class' => 'action_icon btn-warning'));
}
// Generate global icons depending on seleted tab with item type
item_type_global_icons($ItemList);
// EXECUTE the query now:
$ItemList->restart();
// Initialize funky display vars now:
global $postIDlist, $postIDarray;
$postIDlist = $ItemList->get_page_ID_list();
$postIDarray = $ItemList->get_page_ID_array();
// DISPLAY table now:
$ItemList->display(NULL, $result_fadeout);