<?php if (!$prefs->isLocked('initial_page')): ?>
<?php
    if (($prefs->getValue('initial_page') == 'folders.php') &&
        $GLOBALS['conf']['user']['allow_folders']) {
        $folders_option = '<option value="folders.php" selected="selected">' .
            _("Folder Navigator") . "</option>\n";
        $mailbox_option = IMP::flistSelect();
    } else {
        if ($GLOBALS['conf']['user']['allow_folders']) {
            $folders_option = '<option value="folders.php">' . _("Folder Navigator") . "</option>\n";
            $mailbox_selected = $prefs->getValue('initial_page');
            $mailbox_option = IMP::flistSelect('', true, array(), $mailbox_selected, false, false, true);
        } else {
            $mailbox_option = '<option value="INBOX" selected="selected">' . _("Inbox") . '</option>';
            $folders_option = '';
        }
    }
?>

<table>
 <tr>
  <td>
   <?php echo _("View or mailbox to display after login:") ?><br />
   <select name="initial_page">
    <?php echo $folders_option ?>
    <?php echo $mailbox_option ?>
   </select>
  </td>
 </tr>
</table>
<?php endif; ?>
