$Value) {
$input = $spam_filters[$Key]['prefname'] . '_set';
if ( sqgetGlobalVar($input,$input_key,SQ_POST) ) {
setPref( $data_dir, $username, $spam_filters[$Key]['prefname'],$input_key);
} else {
removePref($data_dir, $username, $spam_filters[$Key]['prefname']);
}
}
}
$filters_spam_folder = getPref($data_dir, $username, 'filters_spam_folder');
$filters_spam_scan = getPref($data_dir, $username, 'filters_spam_scan');
$filters = load_filters();
echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'th', _("Spam Filtering"), 'center' )
) ,
'center', $color[0], 'width="95%" border="0" cellpadding="2" cellspacing="0"' );
if ($SpamFilters_YourHop == ' ') {
echo '
' .
html_tag( 'div', '' .
sprintf(_("WARNING! Tell the administrator to set the %s variable."), '"SpamFilters_YourHop"') .
'' ,
'center' ) .
'
';
}
if (isset($action) && $action == 'spam') {
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
$numboxes = count($boxes);
for ($i = 0; $i < $numboxes && $filters_spam_folder == ''; $i++) {
if ((isset($boxes[$i]['flags'][0]) && $boxes[$i]['flags'][0] != 'noselect') &&
(isset($boxes[$i]['flags'][1]) && $boxes[$i]['flags'][1] != 'noselect') &&
(isset($boxes[$i]['flags'][2]) && $boxes[$i]['flags'][2] != 'noselect')) {
$filters_spam_folder = $boxes[$i]['unformatted'];
}
}
echo '