Show
Ignore:
Timestamp:
06/10/08 10:43:36 (3 months ago)
Author:
benjamin
Message:

procmail_builder now working on sqw-1.4.9 and alternc-0.9.8 with register_globals=off

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc-procmail/trunk/procmail_opt.php

    r1270 r2248  
    44    * 
    55    */ 
    6 if ($accook==1 && $addnew) { 
     6if ($_REQUEST["accook"]==1 && $_REQUEST["addnew"]) { 
    77        include_once("procmail_add.php"); 
    88        exit(); 
     
    1111if (!$already) { 
    1212 
    13  
    14 // the following has been commented out for squirrelmail 1.4 version :  
    15 /* 
    16    chdir (".."); 
    17    session_start(); 
    18  
    19    include_once ("procmail_builder/config.php"); 
    20    include_once ("../config/config.php"); 
    21    include_once ("../functions/strings.php"); 
    22    include_once ("../functions/page_header.php"); 
    23    include_once ("../functions/imap.php"); 
    24  
    25    if (isset($plugin_change_ldappass)) 
    26        $Messages = change_ldappass_check(); 
    27  
    28    include_once ("../src/load_prefs.php"); 
    29    displayPageHeader($color, "None"); 
    30 */ 
    31  
    32 define('SM_PATH','../../'); 
    33 /* SquirrelMail required files. */ 
    34 require_once(SM_PATH . 'include/validate.php'); 
    35 require_once(SM_PATH . 'functions/page_header.php'); 
    36 require_once(SM_PATH . 'functions/imap.php'); 
    37 require_once(SM_PATH . 'include/load_prefs.php'); 
    38 require_once (SM_PATH . "plugins/procmail_builder/config.php"); 
    39  
    40  
    41  
    42  
    43    displayPageHeader($color, "None"); 
     13  define('SM_PATH','../../'); 
     14  /* SquirrelMail required files. */ 
     15  require_once(SM_PATH . 'include/validate.php'); 
     16  require_once(SM_PATH . 'functions/page_header.php'); 
     17  require_once(SM_PATH . 'functions/imap.php'); 
     18  require_once(SM_PATH . 'include/load_prefs.php'); 
     19  require_once (SM_PATH . "plugins/procmail_builder/config.php"); 
     20   
     21  displayPageHeader($color, "None"); 
    4422} 
    4523 
     
    4725 
    4826// submit :) let's DO something 
    49 if ($accook==1) { 
     27if ($_REQUEST["accook"]==1) { 
    5028        $error=""; 
    51         if ($disable) { 
     29        if ($_REQUEST["disable"]) { 
    5230                if ($pr->disable())  
    5331                        $error=_("Your mail filters has been disabled"); 
     
    5533                        $error=$er->errstr(); 
    5634        } 
    57         if ($enable) { 
     35        if ($_REQUEST["enable"]) { 
    5836                if ($pr->enable()) 
    5937                        $error=_("Your mail filters has been enabled"); 
     
    6139                        $error=$er->errstr(); 
    6240        } 
    63         if ($delete && is_array($del)) { 
     41        if ($_REQUEST["delete"] && is_array($_REQUEST["del"])) { 
    6442        $rules=$pr->readrules(); 
    6543        $r=array(); 
    6644        for($i=0;$i<count($rules);$i++) { 
    67                 if (!in_array($i+1,$del)) { 
     45                if (!in_array($i+1,$_REQUEST["del"])) { 
    6846                        $r[]=$rules[$i]; 
    6947                } 
     
    9068$rules=$pr->readrules(); 
    9169 
    92 if ($act=="up") { 
    93         $t=$pr->uprule($rules,$rid); 
     70if ($_REQUEST["act"]=="up") { 
     71        $t=$pr->uprule($rules,$_REQUEST["rid"]); 
    9472        if ($t!==false) { 
    9573                $pr->writerules($t); 
     
    9977        } 
    10078} 
    101 if ($act=="down") { 
    102         $t=$pr->downrule($rules,$rid); 
     79if ($_REQUEST["act"]=="down") { 
     80        $t=$pr->downrule($rules,$_REQUEST["rid"]); 
    10381        if ($t!==false) { 
    10482                $pr->writerules($t);