*/
function start_filters($hook_args) {
global $imapServerAddress, $imapPort, $imap_stream, $imapConnection,
- $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count;
-
- sqgetGlobalVar('username', $username, SQ_SESSION);
- sqgetGlobalVar('key', $key, SQ_COOKIE);
+ $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count,
+ $username;
/**
* check hook that calls filtering. If filters are called by right_main_after_header,
// Also check if we are forced to use a separate IMAP connection
if ((!isset($imap_stream) && !isset($imapConnection)) ||
$UseSeparateImapConnection ) {
- $stream = sqimap_login($username, $key, $imapServerAddress,
+ $stream = sqimap_login($username, false, $imapServerAddress,
$imapPort, 10);
$previously_connected = false;
} else if (isset($imapConnection)) {
displayPageHeader($color, 'None');
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
if (isset($action) && ($action == 'add' || $action == 'edit')) {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
include_once(SM_PATH . 'plugins/filters/filters.php');
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('action', $action, SQ_GET);
if (isset($action) && $action == 'spam') {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
$numboxes = count($boxes);
echo '</table>';
}
?>
-</body></html>
\ No newline at end of file
+</body></html>
}
/* GLOBALS */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-
sqgetGlobalVar('submit', $submit, SQ_POST);
for($i = 0; $i <= 9; $i++){
*/
do_hook('info_bottom');
?>
-</body></html>
\ No newline at end of file
+</body></html>
include_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
/* globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
/* end globals */
}
Mail_Fetch_Status(_("Opening IMAP server"));
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10);
// check if destination folder is not set, is not subscribed and is not \noselect folder
if($mailfetch_subfolder == '' ||
?>
</div>
</body>
-</html>
\ No newline at end of file
+</html>
* @private
*/
function mail_fetch_load_pref_function() {
- global $data_dir;
+ global $data_dir, $username;
global $mailfetch_server_number;
global $mailfetch_cypher, $mailfetch_port_;
global $mailfetch_server_,$mailfetch_alias_,$mailfetch_user_,$mailfetch_pass_;
global $mailfetch_lmos_, $mailfetch_uidl_, $mailfetch_login_, $mailfetch_fref_;
global $PHP_SELF;
- sqgetGlobalVar('username', $username, SQ_SESSION);
-
if( stristr( $PHP_SELF, 'mail_fetch' ) ) {
$mailfetch_server_number = getPref($data_dir, $username, 'mailfetch_server_number', 0);
$mailfetch_cypher = getPref($data_dir, $username, 'mailfetch_cypher', 'on' );
//include_once (SM_PATH . 'include/validate.php');
include_once (SM_PATH . 'functions/imap_general.php');
- global $data_dir, $imapServerAddress, $imapPort;
-
- sqgetGlobalVar('username', $username, SQ_SESSION);
- sqgetGlobalVar('key', $key, SQ_COOKIE);
+ global $username, $data_dir, $imapServerAddress, $imapPort;
$mailfetch_newlog = getPref($data_dir, $username, 'mailfetch_newlog');
continue;
}
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10);
$Count = $pop3->login($mailfetch_user, $mailfetch_pass);
if (($Count == false || $Count == -1) && $pop3->ERROR != '') {
* Internal function used to detect new logins
*/
function mail_fetch_setnew_function() {
- global $data_dir;
+ global $data_dir, $username;
- sqgetGlobalVar('username', $username, SQ_SESSION);
setPref( $data_dir, $username, 'mailfetch_newlog', 'on' );
}
include_once(SM_PATH . 'functions/imap_general.php');
/* globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
if(!sqgetGlobalVar('mf_cypher', $mf_cypher, SQ_POST)) {
html_tag( 'tr' ) .
html_tag( 'th', _("Store in Folder:"), 'right' ) .
html_tag( 'td', '', 'left' );
- $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
echo '<select name="mf_subfolder">';
html_tag( 'th', _("Store in Folder:"), 'right' ) .
html_tag( 'td', '', 'left' );
- $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
echo '<select name="mf_subfolder">';
$selected = 0;
'center', '', 'width="70%"' );
}
?>
-</body></html>
\ No newline at end of file
+</body></html>
* @access public
*/
function get_message_details($mailbox, $passed_id, $stripHTML=FALSE) {
- global $imapServerAddress, $imapPort, $color,$msgd_8bit_in_hex;
+ global $imapServerAddress, $imapPort, $color,$msgd_8bit_in_hex, $username;
$returnValue = '';
- sqgetGlobalVar('username', $username, SQ_SESSION);
-
$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$read = sqimap_mailbox_select($imapConnection, $mailbox);
$body = sqimap_run_command($imapConnection, "FETCH $passed_id RFC822",true, $response, $readmessage, TRUE);
}
return $returnValue;
}
-?>
\ No newline at end of file
+?>
* Adds sent_subfolders options in folder preferences
*/
function sent_subfolders_optpage_loadhook_folders() {
- global $optpage_data, $imapServerAddress, $imapPort, $show_contain_subfolders_option;
-
- sqgetGlobalVar('username', $username, SQ_SESSION);
+ global $username, $optpage_data, $imapServerAddress, $imapPort, $show_contain_subfolders_option;
/* Get some imap data we need later. */
$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
* creates required imap folders
*/
function sent_subfolders_update_sentfolder() {
- global $sent_folder;
+ global $sent_folder, $username;
global $sent_subfolders_base, $sent_subfolders_setting;
global $data_dir, $imapServerAddress, $imapPort, $color;
global $use_sent_subfolders, $move_to_sent;
- sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
if ($use_sent_subfolders || $move_to_sent) {
/* GLOBALS */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
sqgetGlobalVar('js_web', $js_web, SQ_GET);
</tr>
</table>
</body>
-</html>
\ No newline at end of file
+</html>