}
+
+/* get globals */
+
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
+$onetimepad = $_SESSION['onetimepad'];
+$base_uri = $_SESSION['base_uri'];
+$delimiter = $_SESSION['delimiter'];
+if (isset($_GET['mailbox'])) {
+ $mailbox = $_GET['mailbox'];
+}
+if (isset($_GET['startMessage'])) {
+ $startMessage = $_GET['startMessage'];
+}
+if (isset($_POST['moveButton'])) {
+ $moveButton = $_POST['moveButton'];
+}
+if (isset($_POST['msg'])) {
+ $msg = $_POST['msg'];
+}
+elseif (isset($_GET['msg'])) {
+ $msg = $_GET['msg'];
+}
+
+if (isset($_SESSION['msgs'])) {
+ $msgs = $_SESSION['msgs'];
+}
+
+
+if (isset($_POST['expungeButton'])) {
+ $expungeButton = $_POST['expungeButton'];
+}
+if (isset($_POST['targetMailbox'])) {
+ $targetMailbox = $_POST['targetMailbox'];
+}
+if (isset($_SESSION['lastTargetMailbox'])) {
+ $lastTargetMailbox = $_SESSION['lastTargetMailbox'];
+}
+if (isset($_POST['expungeButton'])) {
+ $expungeButton = $_POST['expungeButton'];
+}
+if (isset($_POST['undeleteButton'])) {
+ $undeleteButton = $_POST['undeleteButton'];
+}
+if (isset($_POST['markRead'])) {
+ $markRead = $_POST['markRead'];
+}
+if (isset($_POST['markUnread'])) {
+ $markUnread = $_POST['markUnread'];
+}
+if (isset($_POST['attache'])) {
+ $attache = $_POST['attache'];
+}
+
+if (isset($_POST['location'])) {
+ $location = $_POST['location'];
+}
+
+if (isset($_SESSION['composesession'])) {
+ $composesession = $_SESSION['composesession'];
+}
+/* end of get globals */
+
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$mbx_response=sqimap_mailbox_select($imapConnection, $mailbox);
}
if ($targetMailbox != $lastTargetMailbox) {
$lastTargetMailbox = $targetMailbox;
- session_register('lastTargetMailbox');
+ sqsession_register($lastTargetMailbox, 'lastTargetMailbox');
}
// expunge-on-demand if user isn't using move_to_trash or auto_expunge
}
}
header("Location: $location");
+ exit;
} elseif(isset($undeleteButton)) {
// undelete messages if user isn't using move_to_trash or auto_expunge
if (is_array($msg) == 1) {
$i++;
}
header ("Location: $location");
+ exit;
} else {
displayPageHeader($color, $mailbox);
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
$composesession = attachSelectedMessages($msg, $imapConnection);
if ($compose_new_win) {
header ("Location: $location&composenew=1&session=$composesession");
+ exit;
} else {
$location = str_replace('search.php','compose.php',$location);
$location = str_replace('right_main.php','compose.php',$location);
header ("Location: $location&session=$composesession");
+ exit;
}
} else {
if (($startMessage+$cnt-1) >= $mbx_response['EXISTS']) {
$location = set_url_var($location,'startMessage',1);
}
}
- echo $location . ' ' .$show_num. ' '.$cnt;
header ("Location: $location");
+ exit;
}
} else {
displayPageHeader($color, $mailbox);
$location = set_url_var($location,'startMessage',1);
}
}
- header ("Location: $location");
+ header ("Location: $location");
+ exit;
} else {
displayPageHeader($color, $mailbox);
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
// Log out this session
sqimap_logout($imapConnection);
-
?>
</BODY></HTML>