-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+require('../../include/init.php');
+include_once(SM_PATH . 'functions/imap_general.php');
+include_once(SM_PATH . 'functions/forms.php');
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
sqgetGlobalVar('action', $action, SQ_GET);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
sqgetGlobalVar('action', $action, SQ_GET);
- $filter_what = str_replace(',', ' ', $filter_what);
+ $filter_what = str_replace(',', '###COMMA###', $filter_what);
$filter_what = str_replace("\\\\", "\\", $filter_what);
$filter_what = str_replace("\\\"", '"', $filter_what);
$filter_what = str_replace('"', '"', $filter_what);
$filter_what = str_replace("\\\\", "\\", $filter_what);
$filter_what = str_replace("\\\"", '"', $filter_what);
$filter_what = str_replace('"', '"', $filter_what);
'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"'
) .
'<br /><form method="post" action="options.php">'.
'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"'
) .
'<br /><form method="post" action="options.php">'.
- '<div style="text-align: center;">'.
- html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' ) .
+ html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0"' ) .
html_tag( 'tr' ) .
html_tag( 'th', _("What to Scan:"), 'right', '', 'style="white-space: nowrap;"' ) .
html_tag( 'td', '', 'left' ) .
html_tag( 'tr' ) .
html_tag( 'th', _("What to Scan:"), 'right', '', 'style="white-space: nowrap;"' ) .
html_tag( 'td', '', 'left' ) .
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
html_tag( 'td', '', 'left' ) .
'<input type="text" size="32" name="filter_what" value="';
if (isset($filters[$theid]['what'])) {
html_tag( 'td', '', 'left' ) .
'<input type="text" size="32" name="filter_what" value="';
if (isset($filters[$theid]['what'])) {
if ( isset($filters[$theid]['folder']) )
$selected = array(strtolower($filters[$theid]['folder']));
echo sqimap_mailbox_option_list(0, $selected, 0, $boxes);
if ( isset($filters[$theid]['folder']) )
$selected = array(strtolower($filters[$theid]['folder']));
echo sqimap_mailbox_option_list(0, $selected, 0, $boxes);
echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' );
for ($i=0, $num = count($filters); $i < $num; $i++) {
echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' );
for ($i=0, $num = count($filters); $i < $num; $i++) {
printf( _("If %s contains %s then move to %s"),
'<b>'.$filters[$i]['where'].'</b>',
'<b>'.$filters[$i]['what'].'</b>',
printf( _("If %s contains %s then move to %s"),
'<b>'.$filters[$i]['where'].'</b>',
'<b>'.$filters[$i]['what'].'</b>',
html_tag( 'tr',
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '</body></html>';
html_tag( 'tr',
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '</body></html>';