<?php

$selected = ' selected ';
$selected_tab_customers = '';
$selected_tab_tiers = '';
$selected_tab_orders = '';
$selected_tab_pricing = '';

if (stristr($_SERVER['SCRIPT_NAME'], 'customers.php') !== false) {
    $selected_tab_customers = $selected;
} elseif (stristr($_SERVER['SCRIPT_NAME'], 'tiers.php') !== false) {
    $selected_tab_tiers = $selected;
} elseif (stristr($_SERVER['SCRIPT_NAME'], 'orders.php') !== false) {
    $selected_tab_orders = $selected;
} elseif (stristr($_SERVER['SCRIPT_NAME'], 'pricing.php') !== false) {
    $selected_tab_pricing = $selected;
}
?>

<ul class="tabnav el">
    <li class="<?= $selected_tab_customers ?>">
        <a href="/modules/B2B/admin/customers.php">Trade Customers</a>
    </li>
    <li class="<?= $selected_tab_tiers ?>">
        <a href="/modules/B2B/admin/tiers.php">Trade Tiers</a>
    </li>
    <?php if (config('b2b.pay_on_account_enabled')) { ?>
    <li class="<?= $selected_tab_orders ?>">
        <a href="/modules/B2B/admin/orders.php">Account Orders</a>
    </li>
    <?php } ?>
    <li class="<?= $selected_tab_pricing ?>">
        <a href="/modules/B2B/admin/pricing.php">Trade Pricing</a>
    </li>
</ul>
