/**
* mail_fetch/fetch.php
*
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Fetch code.
function Mail_Fetch_Select_Server($mailfetch) {
global $PHP_SELF;
- echo '<font size=-5><br></font>' .
- "<form action=\"$PHP_SELF\" method=\"post\" target=\"_self\">" .
+ echo '<font size="-5"><br /></font>' .
+ '<form action="'.$PHP_SELF.'" method="post" target="_self">' .
html_tag( 'table', '', 'center', '', 'width="70%" cols="2"' ) .
html_tag( 'tr' ) .
html_tag( 'td', _("Select Server:") . ' ', 'right' ) .
html_tag( 'td', '', 'left' ) .
'<select name="server_to_fetch" size="1">' .
- '<option value="all" selected>..' . _("All") . "...\n";
+ '<option value="all" selected="selected">..' . _("All") . "...\n";
for ($i = 0;$i < $mailfetch['server_number'];$i++) {
echo "<option value=\"$i\">" .
htmlspecialchars($mailfetch[$i]['alias']) .
htmlspecialchars($mailfetch[$i]['alias']) .
'</b>: ',
'right' ) .
- html_tag( 'td', '<input type="password" name="pass_' . $i . '">', 'left' )
+ html_tag( 'td', '<input type="password" name="pass_' . $i . '" />', 'left' )
);
}
}
echo html_tag( 'tr',
html_tag( 'td', ' ' ) .
- html_tag( 'td', '<input type=submit name=submit_mailfetch value="' . _("Fetch Mail"). '">', 'left' )
+ html_tag( 'td', '<input type="submit" name="submit_mailfetch" value="' . _("Fetch Mail"). '" />', 'left' )
) .
'</table></form>';
}
$mailfetch = Mail_Fetch_Servers();
displayPageHeader($color, 'None');
- echo '<br><center>';
+ echo '<br /><center>';
echo html_tag( 'table',
html_tag( 'tr',
$pop3 = new POP3($mailfetch_server, 60);
- echo '<br>' .
+ echo '<br />' .
html_tag( 'table',
html_tag( 'tr',
html_tag( 'td', '<b>' . _("Fetching from ") .
Mail_Fetch_Status(_("Opening POP server"));
$Count = $pop3->login($mailfetch_user, $mailfetch_pass);
if (($Count == false || $Count == -1) && $pop3->ERROR != '') {
- Mail_Fetch_Status(_("Login Failed:") . ' ' . $pop3->ERROR );
+ Mail_Fetch_Status(_("Login Failed:") . ' ' . htmlspecialchars($pop3->ERROR) );
continue;
}
continue;
} else {
$newmsgcount = $Count - $i + 1;
- Mail_Fetch_Status(_("Login OK: Inbox contains [") . $newmsgcount . _("] messages"));
+ Mail_Fetch_Status(sprintf(_("Login OK: Inbox contains %s messages"), $newmsgcount));
}
Mail_Fetch_Status(_("Fetching UIDL..."));
if( $pop3->delete($i) ) {
Mail_Fetch_Status(_("Message ") . $i . _(" deleted from Remote Server!"));
} else {
- Mail_Fetch_Status(_("Delete failed:") . $pop3->ERROR );
+ Mail_Fetch_Status(_("Delete failed:") . htmlspecialchars($pop3->ERROR) );
}
}
} else {