/* ================= End of functions ================= */
/** lets get the global vars we may need */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
-sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
if (! sqgetGlobalVar('show' , $show)) {
$show = '';
require_once(SM_PATH . 'functions/identity.php');
/* --------------------- Get globals ------------------------------------- */
-/** COOKIE VARS */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
/** SESSION VARS */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
-sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('composesession', $composesession, SQ_SESSION);
$draft_message = _("Draft Email Saved");
/* If this is a resumed draft, then delete the original */
if(isset($delete_draft)) {
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, false);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false);
sqimap_mailbox_select($imap_stream, $draft_folder);
// force bypass_trash=true because message should be saved when deliverMessage() returns true.
// in current implementation of sqimap_msgs_list_flag() single message id can
/* if it is resumed draft, delete draft message */
if ( isset($delete_draft)) {
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, false);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false);
sqimap_mailbox_select($imap_stream, $draft_folder);
// bypass_trash=true because message should be saved when deliverMessage() returns true.
// in current implementation of sqimap_msgs_list_flag() single message id can
$mailprio = 3;
if ($passed_id) {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress,
+ $imapConnection = sqimap_login($username, false, $imapServerAddress,
$imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
} elseif ($draft) {
global $draft_folder;
require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
- $imap_stream = sqimap_login($username, $key, $imapServerAddress,
+ $imap_stream = sqimap_login($username, false, $imapServerAddress,
$imapPort, 0);
if (sqimap_mailbox_exists ($imap_stream, $draft_folder)) {
require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
} else {
unset ($deliver);
$move_to_sent = getPref($data_dir,$username,'move_to_sent');
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
/* Move to sent code */
if (isset($default_move_to_sent) && ($default_move_to_sent != 0)) {
header('Cache-Control: cache');
/* globals */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('mailbox_cache',$mailbox_cache,SQ_SESSION);
sqgetGlobalVar('messages', $messages, SQ_SESSION);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
/* end globals */
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$aMailbox = sqm_api_mailbox_select($imapConnection, $account, $mailbox,array(),array());
if (isset($aMailbox['MSG_HEADERS'][$passed_id]['MESSAGE_OBJECT']) &&
/* get those globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
/* finished globals */
-$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$mailbox = $trash_folder;
$boxes = sqimap_mailbox_list($imap_stream);
$location = get_location();
header ("Location: $location/left_main.php");
-?>
\ No newline at end of file
+?>
displayPageHeader($color, 'None');
/* get globals we may need */
-
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
-
sqgetGlobalVar('smaction', $action, SQ_POST);
/* end of get globals */
-$imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0);
/* switch to the right function based on what the user selected */
if ( sqgetGlobalVar('smaction', $action, SQ_POST) ) {
define('SM_BOX_COLLAPSED', 1);
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('fold', $fold, SQ_GET);
sqgetGlobalVar('unfold', $unfold, SQ_GET);
// open a connection on the imap port (143)
// why hide the output?
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, true);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, true);
/**
* Using stristr since very old preferences may contain "None" and "none".
sqimap_logout($imapConnection);
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
require_once(SM_PATH . 'functions/url_parser.php');
/* get some of these globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
-
sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('show_html_default', $show_html_default, SQ_FORM);
/* end globals */
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox);
if (isset($messages[$mbx_response['UIDVALIDITY']][$passed_id])) {
$message = $messages[$mbx_response['UIDVALIDITY']][$passed_id];
/* get the globals we may need */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
sqgetGlobalVar('lastTargetMailbox', $lastTargetMailbox, SQ_SESSION);
if (!sqgetGlobalVar('messages', $messages, SQ_SESSION) ) {
$messages = array();
/* end of get globals */
global $sqimap_capabilities, $lastTargetMailbox;
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$aMailbox = sqm_api_mailbox_select($imapConnection, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
/* lets get the global vars we may need */
-sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
sqgetGlobalVar('delayed_errors', $delayed_errors, SQ_SESSION);
if (is_array($delayed_errors)) {
$oErrorHandler->AssignDelayedErrors($delayed_errors);
/* ------------------------ main ------------------------ */
/* get globals we will need */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
if ( sqgetGlobalVar('checkall', $temp, SQ_GET) ) {
$checkall = (int) $temp;
uasort($imap_asearch_options, 'asearch_unhtml_strcoll');
/* open IMAP connection */
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
/* get mailboxes once here */
include_once(SM_PATH . 'functions/imap_messages.php');
/* globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('startMessage', $startMessage, SQ_GET);
/* end globals */
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color, 'None');
</td></tr></table>
<?php
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) {
$passed_ent_id = '';
}
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-$imapConnection = sqimap_login($username, $key, $imapServerAddress,
+$imapConnection = sqimap_login($username, false, $imapServerAddress,
$imapPort, 0);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id);
view_header($header, $mailbox, $color);
-?>
\ No newline at end of file
+?>
require_once(SM_PATH . 'functions/date.php');
/** Get globals */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('messages', $messages, SQ_SESSION);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
// TODO: add required var checks here.
-$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
/** TODO: charset might be part of html code. */
header('Content-Type: text/html; charset=' . $charset);
echo $body;
-?>
\ No newline at end of file
+?>
<?php
/**
- * view_text.php -- Displays the main frameset
+ * view_text.php -- View a text attachment
*
- * Who knows what this file does. However PUT IT HERE DID NOT PUT
- * A SINGLE FREAKING COMMENT IN! Whoever is responsible for this,
- * be very ashamed.
+ * Used by attachment_common code.
*
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
include(SM_PATH . 'functions/date.php');
include(SM_PATH . 'functions/url_parser.php');
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('messages', $messages, SQ_SESSION);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
$passed_id = (int) $temp;
}
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
</tt></td></tr></table>
<?php
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
*/
require('../include/init.php');
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
-
if (sqgetGlobalVar('sort', $sort)) {
$sort = (int) $sort;
}