Browse Source

Even more rg=0

Thijs Kinkhorst 23 năm trước cách đây
mục cha
commit
1009a8901c

+ 2 - 0
src/compose.php

@@ -42,6 +42,7 @@ if (isset($_POST['return'])) {
 if ( isset($_SESSION['composesession']) ) {
     $composesession = $_SESSION['composesession'];
 }
+sqextractGlobalVar('action');
 sqextractGlobalVar('session');
 sqextractGlobalVar('mailbox');
 sqextractGlobalVar('identity');
@@ -56,6 +57,7 @@ sqextractGlobalVar('request_dr');
 sqextractGlobalVar('html_addr_search');
 sqextractGlobalVar('mail_sent');
 sqextractGlobalVar('passed_id');
+sqextractGlobalVar('passed_ent_id');
 
 if ( isset($_POST['sigappend']) ) {
     $sigappend = $_POST['sigappend'];

+ 29 - 0
src/options_highlight.php

@@ -23,6 +23,35 @@ require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'functions/html.php');
 
+/* get globals */
+if (isset($_GET['action'])) {
+    $action = $_GET['action'];
+}
+if (isset($_GET['theid'])) {
+    $theid = $_GET['theid'];
+}
+if (isset($_GET['identname'])) {
+    $identname = $_GET['identname'];
+}
+if (isset($_GET['newcolor_choose'])) {
+    $newcolor_choose = $_GET['newcolor_choose'];
+}
+if (isset($_GET['newcolor_input'])) {
+    $newcolor_input = $_GET['newcolor_input'];
+}
+if (isset($_GET['color_type'])) {
+    $color_type = $_GET['color_type'];
+}
+if (isset($_GET['match_type'])) {
+    $match_type = $_GET['match_type'];
+}
+if (isset($_GET['value'])) {
+    $value = $_GET['value'];
+}
+
+$SCRIPT_NAME = $_SERVER['SCRIPT_NAME'];
+/* end of get globals */
+ 
 function oh_opt( $val, $sel, $tit ) {
     echo "<option value=\"$val\"";
     if ( $sel )

+ 9 - 0
src/options_identities.php

@@ -19,6 +19,15 @@ require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/html.php');
 
+/* POST data var names are dynamic because 
+   of the possible multiple idents so lets get
+   them all
+*/
+if (!empty($_POST)) {
+    extract($_POST);
+}
+/* got 'em all */
+
     if (isset($return)) {
        SaveUpdateFunction();
        header('Location: options_personal.php');

+ 24 - 0
src/options_order.php

@@ -22,6 +22,30 @@ require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/html.php');
 
+/* get globals */
+if (isset($_GET['action'])) {
+    $action = $_GET['action'];
+}
+if (isset($_GET['num'])) {
+    $num = $_GET['num'];
+}
+if (isset($_GET['method'])) {
+    $method = $_GET['method'];
+}
+elseif (isset($_POST['method'])) {
+    $method = $_POST['method'];
+}
+if (isset($_POST['add'])) {
+    $add = $_POST['add'];
+}
+if (isset($_GET['submit'])) {
+    $submit = $_GET['submit'];
+}
+elseif (isset($_POST['submit'])) {
+    $submit = $_POST['submit'];
+}
+/* end of get globals */
+
 if (! isset($action)) { $action = ''; }
 if ($action == 'delete' && isset($theid)) {
     removePref($data_dir, $username, "highlight$theid");

+ 3 - 3
src/read_body.php

@@ -591,10 +591,10 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
 }
 
 function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
-    global $QUERY_STRING, $base_uri;
-   
+    global $base_uri;
+
     $urlMailbox = urlencode($mailbox);
-    $url = $base_uri.'src/view_header.php?'.$QUERY_STRING;
+    $url = $base_uri.'src/view_header.php?'.$_SERVER['QUERY_STRING'];
 
     $s  = "<TR>\n" .
           '<TD VALIGN="MIDDLE" ALIGN="RIGHT" WIDTH="20%"><B>' . _("Options") . ":&nbsp;&nbsp;</B></TD>\n" .

+ 14 - 4
src/view_header.php

@@ -76,9 +76,9 @@ function  parse_viewheader($imapConnection,$id, $passed_ent_id) {
 }
 
 function view_header($header, $mailbox, $color) {
-    global $QUERY_STRING, $base_uri;
+    global $base_uri;
 
-    $ret_addr = $base_uri . 'src/read_body.php?'.$QUERY_STRING;
+    $ret_addr = $base_uri . 'src/read_body.php?'.$_SERVER['QUERY_STRING'];
 
     displayPageHeader($color, $mailbox);
 
@@ -103,10 +103,20 @@ function view_header($header, $mailbox, $color) {
     echo '</body></html>';
 }
 
-if (!isset($passed_ent_id)) {
+/* get global vars */
+$passed_id = $_GET['passed_id'];
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
+$delimiter = $_SESSION['delimiter'];
+$onetimepad = $_SESSION['onetimepad'];
+
+if (!isset($_GET['passed_ent_id'])) {
   $passed_ent_id = '';
+} else {
+    $passed_ent_id = $_GET['passed_ent_id'];
 }
-$mailbox = decodeHeader($mailbox);
+
+$mailbox = decodeHeader($_GET['mailbox']);
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, 
                                $imapPort, 0);

+ 10 - 2
src/view_text.php

@@ -22,10 +22,18 @@ require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/mime.php');
 require_once(SM_PATH . 'functions/html.php');
    
-$mailbox = urldecode($mailbox);
-if (!isset($passed_ent_id)) {
+$mailbox = urldecode($_GET['mailbox']);
+if (!isset($_GET['passed_ent_id'])) {
     $passed_ent_id = '';
+} else {
+    $passed_ent_id = $_GET['passed_ent_id'];
 }
+$passed_id = $_GET['passed_id'];
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
+$delimiter = $_SESSION['delimiter'];
+$onetimepad = $_SESSION['onetimepad'];
+
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 $mbx_response =  sqimap_mailbox_select($imapConnection, $mailbox);