+
+/* lets get the global vars 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('mailbox', $mailbox);
+sqgetGlobalVar('lastTargetMailbox', $lastTargetMailbox, SQ_SESSION);
+sqgetGlobalVar('numMessages' , $numMessages, SQ_SESSION);
+sqgetGlobalVar('session', $session, SQ_GET);
+sqgetGlobalVar('note', $note, SQ_GET);
+sqgetGlobalVar('mail_sent', $mail_sent, SQ_GET);
+sqgetGlobalVar('use_mailbox_cache', $use_mailbox_cache, SQ_GET);
+
+if ( sqgetGlobalVar('startMessage', $temp) ) {
+ $startMessage = (int) $temp;
+}
+if ( sqgetGlobalVar('PG_SHOWNUM', $temp) ) {
+ $PG_SHOWNUM = (int) $temp;
+}
+if ( sqgetGlobalVar('PG_SHOWALL', $temp, SQ_GET) ) {
+ $PG_SHOWALL = (int) $temp;
+}
+if ( sqgetGlobalVar('newsort', $temp, SQ_GET) ) {
+ $newsort = (int) $temp;
+}
+if ( sqgetGlobalVar('checkall', $temp, SQ_GET) ) {
+ $checkall = (int) $temp;
+}
+if ( sqgetGlobalVar('set_thread', $temp, SQ_GET) ) {
+ $set_thread = (int) $temp;
+}
+if ( !sqgetGlobalVar('composenew', $composenew, SQ_GET) ) {
+ $composenew = false;
+}
+/* end of get globals */
+