<?php
+
/**
* mail_fetch/fetch.php
*
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* Fetch code.
*
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @subpackage mail_fetch
*/
-/** @ignore */
-define('SM_PATH','../../');
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../../include/init.php');
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+include_once(SM_PATH . 'functions/imap_general.php');
include_once(SM_PATH . 'plugins/mail_fetch/class.POP3.php');
include_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
$mailfetch = Mail_Fetch_Servers();
displayPageHeader($color, 'None');
-echo '<br /><center>';
+echo '<br /><div style="text-align: center;">';
echo html_tag( 'table',
html_tag( 'tr',
echo '<br />' .
html_tag( 'table',
html_tag( 'tr',
- html_tag( 'td', '<b>' . _("Fetching from ") .
- htmlspecialchars($mailfetch[$i_loop]['alias']) .
+ html_tag( 'td', '<b>' .
+ sprintf(_("Fetching from %s"),
+ htmlspecialchars($mailfetch[$i_loop]['alias'])) .
'</b>',
'center' ) ,
'', $color[9] ) ,
flush();
if (!$pop3->connect($mailfetch_server,$mailfetch_port)) {
- Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR );
+ Mail_Fetch_Status($pop3->ERROR );
continue;
}
}
for (; $i <= $Count; $i++) {
- Mail_Fetch_Status(_("Fetching message ") . "$i" );
+ Mail_Fetch_Status(sprintf(_("Fetching message %s."), $i));
if (!ini_get('safe_mode'))
set_time_limit(20); // 20 seconds per message max
$MessArray = $pop3->get($i);
while ( (!$MessArray) or (gettype($MessArray) != "array")) {
- Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR);
+ Mail_Fetch_Status($pop3->ERROR);
// re-connect pop3
Mail_Fetch_Status(_("Server error. Disconnect"));
$pop3->quit();
Mail_Fetch_Status(_("Reconnect from dead connection"));
if (!$pop3->connect($mailfetch_server)) {
- Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR );
+ Mail_Fetch_Status($pop3->ERROR );
Mail_Fetch_Status(_("Saving UIDL"));
setPref($data_dir,$username,"mailfetch_uidl_$i_loop", $mailfetch_uidl[$i-1]);
continue;
}
- Mail_Fetch_Status(_("Refetching message ") . "$i" );
+ Mail_Fetch_Status(sprintf(_("Refetching message %s."), $i));
$MessArray = $pop3->get($i);
} // end while
Mail_Fetch_Status(_("Done"));
}
?>
-</center>
+</div>
</body>
</html>
\ No newline at end of file