Пример #1
0
/*
 * If we try to forward messages as attachment we have to open a new window
 * in case of compose in new window or redirect to compose.php
 */
$onload = '';
if (isset($aMailbox['FORWARD_SESSION'])) {
    if ($compose_new_win) {
        /* add the mailbox to the cache */
        $mailbox_cache[$account . '_' . $aMailbox['NAME']] = $aMailbox;
        sqsession_register($mailbox_cache, 'mailbox_cache');
        // write the session in order to make sure that the compose window has
        // access to the composemessages array which is stored in the session
        session_write_close();
        // restart the session. Do not use sqsession_is_active because the session_id
        // isn't empty after a session_write_close
        sqsession_start();
        if (!preg_match("/^[0-9]{3,4}\$/", $compose_width)) {
            $compose_width = '640';
        }
        if (!preg_match("/^[0-9]{3,4}\$/", $compose_height)) {
            $compose_height = '550';
        }
        // do not use &, it will break the query string and $session will not be detected!!!
        $comp_uri = $base_uri . 'src/compose.php?mailbox=' . urlencode($mailbox) . '&session=' . urlencode($aMailbox['FORWARD_SESSION']['SESSION_NUMBER']) . '&smaction=forward_as_attachment' . '&fwduid=' . implode('_', $aMailbox['FORWARD_SESSION']['UIDS']);
        $onload = "comp_in_new('{$comp_uri}', {$compose_width}, {$compose_height});";
    } else {
        $mailbox_cache[$account . '_' . $aMailbox['NAME']] = $aMailbox;
        sqsession_register($mailbox_cache, 'mailbox_cache');
        // save mailboxstate
        sqsession_register($aMailbox, 'aLastSelectedMailbox');
        session_write_close();
Пример #2
0
/**
 * Function to verify a session has been started.  If it hasn't
 * start a session up.  php.net doesn't tell you that $_SESSION
 * (even though autoglobal), is not created unless a session is
 * started, unlike $_POST, $_GET and such
 */
function sqsession_is_active()
{
    sqsession_start();
}
Пример #3
0
/**
 * Function to verify a session has been started.  If it hasn't
 * start a session up.  php.net doesn't tell you that $_SESSION
 * (even though autoglobal), is not created unless a session is
 * started, unlike $_POST, $_GET and such
 * Update: (see #1685031) the session ID is left over after the
 * session is closed in some PHP setups; this function just becomes
 * a passthru to sqsession_start(), but leaving old code in for
 * edification.
 */
function sqsession_is_active()
{
    //$sessid = session_id();
    //if ( empty( $sessid ) ) {
    sqsession_start();
    //}
}