<ul class="tabnav el">
    <li<?php if ($_SERVER['SCRIPT_NAME'] === '/shop/admin/assessment/manage.forms.php') { ?> class="selected" <?php } ?>>
        <a href="/shop/admin/assessment/manage.forms.php">Manage</a>
    </li>
    <li<?php if ($_SERVER['REQUEST_URI'] === '/shop/admin/assessment/manage.form.php' && empty($_REQUEST['id'])) { ?> class="selected" <?php } ?>>
        <a href="/shop/admin/assessment/manage.form.php">Add Form</a>
    </li>
    <?php
    if (!empty($_REQUEST['id'])) {
        ?>
        <li<?php if (strpos($_SERVER['REQUEST_URI'], '/shop/admin/assessment/manage.form.php') !== false) { ?> class="selected" <?php } ?>>
            <a href="/shop/admin/assessment/manage.form.php?id=<?= $_REQUEST['id']; ?>">Edit Form</a>
        </li>
        <?php
    }
    ?>
    <?php
    if (!empty($_REQUEST['form_id'])) {
        ?>
        <li class="selected">
            <a href="/shop/admin/assessment/manage.question.php?form_id=<?= $_REQUEST['form_id']; ?><?= (!empty($_REQUEST['id']) ? '&id=' . $_REQUEST['id'] : ''); ?>">Manage Question</a>
        </li>
        <?php
    }
    ?>

    <li<?php if ($_SERVER['SCRIPT_NAME'] === '/shop/admin/assessment/manage.drafts.php') { ?> class="selected" <?php } ?>>
        <a href="/shop/admin/assessment/manage.drafts.php">Draft Assessments</a>
    </li>

    <li<?php if ($_SERVER['SCRIPT_NAME'] === '/shop/admin/assessment/manage.bmi_ethnicity.php') { ?> class="selected" <?php } ?>>
        <a href="/shop/admin/assessment/manage.bmi_ethnicity.php">Manage BMI Ethnicity Records</a>
    </li>

    <li<?php if ($_SERVER['SCRIPT_NAME'] === '/shop/admin/assessment/manage.ethnicities.php') { ?> class="selected" <?php } ?>>
        <a href="/shop/admin/assessment/manage.ethnicities.php">Manage Ethnicities</a>
    </li>
</ul>

