/**
* mail_fetch/options.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Setup of the mailfetch plugin.
echo '<b>' . _("Server Name:") . '</b> <select name="mf_sn">';
for ($i=0;$i<$mailfetch_server_number;$i++) {
echo "<option value=\"$i\">" .
- (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) . "</option>>";
+ htmlspecialchars( (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i])) . "</option>>";
}
echo '</select>'.
' <INPUT TYPE=submit name=mf_action value="' . _("Modify") . '">'.
html_tag( 'td',
"<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
'<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_delete">' .
- '<br>' . _("Selected Server:") . " <b>$mailfetch_server_[$mf_sn]</b><br>" .
+ '<br>' . _("Selected Server:") . " <b>" . htmlentities($mailfetch_server_[$mf_sn]) . "</b><br>" .
_("Confirm delete of selected server?") . '<br><br>' .
'<input type=submit name=submit_mailfetch value="' . _("Confirm Delete") . '">' .
'<br></form>' ,
html_tag( 'table' ) .
html_tag( 'tr',
html_tag( 'th', _("Server:"), 'right' ) .
- html_tag( 'td', '<input type="text" name="mf_server" value="' . $mailfetch_server_[$mf_sn] . '" size="40">', 'left' )
+ html_tag( 'td', '<input type="text" name="mf_server" value="' . htmlentities($mailfetch_server_[$mf_sn]) . '" size="40">', 'left' )
) .
html_tag( 'tr',
html_tag( 'th', _("Port:"), 'right' ) .
) .
html_tag( 'tr',
html_tag( 'th', _("Alias:"), 'right' ) .
- html_tag( 'td', '<input type="text" name="mf_alias" value="' . $mailfetch_alias_[$mf_sn] . '" size="40">', 'left' )
+ html_tag( 'td', '<input type="text" name="mf_alias" value="' . htmlentities($mailfetch_alias_[$mf_sn]) . '" size="40">', 'left' )
) .
html_tag( 'tr',
html_tag( 'th', _("Username:"), 'right' ) .
$boxes = sqimap_mailbox_list($imapConnection);
echo '<select name="mf_subfolder">';
$selected = 0;
- if ( isset($mf_subfolder) )
- $selected = array(strtolower($mf_subfolder));
- echo sqimap_mailbox_option_list($imapConnection, $selected);
- echo '</select></td></tr>' .
+ if ( isset($mailfetch_subfolder_[$mf_sn]) ) {
+ $selected = array(strtolower($mailfetch_subfolder_[$mf_sn]));
+ }
+ echo sqimap_mailbox_option_list($imapConnection, $selected) .
+ '</select></td></tr>' .
html_tag( 'tr',
html_tag( 'th', ' ', 'right' ) .