option_name ); $shop = new Shopping ( $current_options['aid'], ADFEVER_UUID ); // Get categories tree $categories = $shop->getCategories(); // Current tab ? $current_tab = ($_GET['tab'] == 'browse') ? 'browse' : 'search'; // Build form action $form_action_url = ADFEVER_URL . "/inc/lightbox.php?tab=" . $current_tab; // Paged ? $_GET['paged'] = isset( $_GET['paged'] ) ? intval($_GET['paged']) : 0; if ( $_GET['paged'] < 1 ) $_GET['paged'] = 1; $start = ( $_GET['paged'] - 1 ) * 10; if ( $start < 1 ) $start = 0; if ( $current_tab == 'search' ) { // Try to send content to editor if ( $_GET['send_to_editor'] == 'true' && isset($_GET['item_id']) ) { media_send_to_editor( '[adfever type="product" value="'.intval($_GET['item_id']).'"]'); exit(); } // Get datas if ( isset($_GET['s']) && !empty($_GET['s']) ) { $results = $shop->search( stripslashes($_GET['s']), intval($_GET['category']), $_GET['paged'] ); $total_items = $results["shopping"]["meta"]["total"]; $results = $results["shopping"]["products"]["product"]; } else { $results = array(); $total_items = 0; } } else { // Try to send content to editor if ( $_GET['send_to_editor'] == 'true' && isset($_GET['cat_id']) ) { media_send_to_editor( '[adfever type="top-category" value="'.intval($_GET['cat_id']).'"]'); exit(); } } $GLOBALS['body_id'] = 'media-upload'; ?> >
'.__('No category currently. Strange ! Perhaps your server can\'t call the Adfever server', 'adfever').''; } else { echo '