<?php

// set to defaults if undefined
if (!isset($config->host)) {
    $config->host = "127.0.0.1";
}
if (!isset($config->port)) {
    $config->port = "119";
}
if (!isset($config->changepasswordurl)) {
    $config->changepasswordurl = '';
}

?>
<table cellspacing="0" cellpadding="5" border="0">

<tr valign="top" class="required">
    <td align="right"><?php print_string('auth_nntphost_key', 'auth') ?>: </td>
    <td>
        <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
        <?php

        if (isset($err["host"])) {
            formerr($err["host"]);
        }

        ?>
    </td>
    <td>
        <?php

        print_string("auth_nntphost", "auth");
        print_string("auth_multiplehosts", "auth");

        ?>
    </td>
</tr>

<tr valign="top" class="required">
    <td align="right"><?php print_string('auth_nntpport_key', 'auth') ?>: </td>
    <td>
        <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
        <?php

        if (isset($err["port"])) {
            formerr($err["port"]);
        }

        ?>
    </td>
    <td><?php print_string("auth_nntpport", "auth") ?></td>
</tr>

<tr valign="top">
    <td align="right"><?php print_string('auth_nntpchangepasswordurl_key', 'auth') ?>: </td>
    <td>
        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
        <?php

        if (isset($err['changepasswordurl'])) {
            formerr($err['changepasswordurl']);
        }

        ?>
    </td>
    <td><?php print_string('changepasswordhelp', 'auth') ?></td>
</tr>

<?php

print_auth_lock_options('nntp', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);

?>
</table>
