-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);
- $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'])) {
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>',