示例#1
0
                    $block_ids = split(',', $_group);
                    $custom_positions = db_get_array("SELECT position FROM ?:block_positions WHERE object_id != '0' AND location = ?s AND (block_id IN(?n) OR text_id IN(?a))", $_REQUEST['add_selected_section'], $block_ids, $block_ids);
                    if (!empty($custom_positions)) {
                        $ajax->assign('confirm_text', fn_get_lang_var('text_position_overwrite'));
                        exit;
                    }
                }
            }
        }
        fn_save_block_location($positions, $_REQUEST['object_id'], empty($_REQUEST['user_choice']) ? 'N' : $_REQUEST['user_choice'], $_REQUEST['add_selected_section']);
        exit;
    }
    return array(CONTROLLER_STATUS_OK, "block_manager.manage" . $suffix);
}
$selected_section = empty($_REQUEST['selected_section']) ? 'all_pages' : $_REQUEST['selected_section'];
$view->assign('block_settings', fn_get_all_blocks($selected_section));
if ($mode == 'delete') {
    if (!empty($_REQUEST['block_id'])) {
        fn_delete_block($_REQUEST['block_id']);
    }
    if (!empty($_REQUEST['redirect_url'])) {
        $url = '';
        unset($_REQUEST['selected_section']);
    } else {
        $url = "block_manager.manage";
    }
    return array(CONTROLLER_STATUS_OK, $url);
} elseif ($mode == 'bulk_actions') {
    fn_block_bulk_actions($_REQUEST['block_id'], ACTION);
    return array(CONTROLLER_STATUS_OK, "block_manager.manage");
} elseif ($mode == 'update_status') {
示例#2
0
        }
        $view->assign('has_inventory', $has_inventory);
    }
    $view->assign('product_options', $product_options);
    $view->assign('global_options', fn_get_product_options(0));
    // If the product is electronnicaly distributed, get the assigned files
    $view->assign('product_files', fn_get_product_files($_REQUEST['product_id']));
    // [Page sections]
    Registry::set('navigation.tabs', array('detailed' => array('title' => fn_get_lang_var('general'), 'js' => true), 'images' => array('title' => fn_get_lang_var('images'), 'js' => true), 'categories' => array('title' => fn_get_lang_var('additional_categories'), 'js' => true), 'options' => array('title' => fn_get_lang_var('options'), 'js' => true), 'qty_discounts' => array('title' => fn_get_lang_var('qty_discounts'), 'js' => true), 'files' => array('title' => fn_get_lang_var('files'), 'js' => true), 'blocks' => array('title' => fn_get_lang_var('blocks'), 'js' => true), 'addons' => array('title' => fn_get_lang_var('addons'), 'js' => true), 'vendors' => array('title' => fn_get_lang_var('vendors'), 'js' => true)));
    // [/Page sections]
    // If we have some additional product fields, lets add a tab for them
    if (!empty($product_data['product_features'])) {
        Registry::set('navigation.tabs.features', array('title' => fn_get_lang_var('features'), 'js' => true));
    }
    // [Block manager]
    $block_settings = fn_get_all_blocks('products');
    $view->assign('block_settings', $block_settings);
    list($blocks, $object_id) = fn_get_blocks(array('location' => 'products', 'all' => true, 'product_id' => $_REQUEST['product_id']), false, DESCR_SL);
    list($all_blocks) = fn_get_blocks(array('location' => 'all_pages', 'all' => true, 'block_properties_location' => 'products'), false);
    $blocks = fn_array_merge($blocks, $all_blocks, true);
    $blocks = fn_sort_blocks($object_id, 'products', $blocks);
    $blocks = fn_check_blocks_availability($blocks, $block_settings);
    $view->assign('location', $selected_section);
    $view->assign('blocks', $blocks);
    $view->assign('avail_positions', fn_get_available_group('products', $_REQUEST['product_id'], DESCR_SL));
    // [/Block manager]
    //
    // 'Mulitple products updating' page
    //
} elseif ($mode == 'm_update') {
    if (empty($_SESSION['product_ids']) || empty($_SESSION['selected_fields']) || empty($_SESSION['selected_fields']['object']) || $_SESSION['selected_fields']['object'] != 'product') {