Changeset 2248 for alternc-procmail/trunk/procmail_opt.php
- Timestamp:
- 06/10/08 10:43:36 (3 months ago)
- Files:
-
- alternc-procmail/trunk/procmail_opt.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc-procmail/trunk/procmail_opt.php
r1270 r2248 4 4 * 5 5 */ 6 if ($ accook==1 && $addnew) {6 if ($_REQUEST["accook"]==1 && $_REQUEST["addnew"]) { 7 7 include_once("procmail_add.php"); 8 8 exit(); … … 11 11 if (!$already) { 12 12 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"); 44 22 } 45 23 … … 47 25 48 26 // submit :) let's DO something 49 if ($ accook==1) {27 if ($_REQUEST["accook"]==1) { 50 28 $error=""; 51 if ($ disable) {29 if ($_REQUEST["disable"]) { 52 30 if ($pr->disable()) 53 31 $error=_("Your mail filters has been disabled"); … … 55 33 $error=$er->errstr(); 56 34 } 57 if ($ enable) {35 if ($_REQUEST["enable"]) { 58 36 if ($pr->enable()) 59 37 $error=_("Your mail filters has been enabled"); … … 61 39 $error=$er->errstr(); 62 40 } 63 if ($ delete && is_array($del)) {41 if ($_REQUEST["delete"] && is_array($_REQUEST["del"])) { 64 42 $rules=$pr->readrules(); 65 43 $r=array(); 66 44 for($i=0;$i<count($rules);$i++) { 67 if (!in_array($i+1,$ del)) {45 if (!in_array($i+1,$_REQUEST["del"])) { 68 46 $r[]=$rules[$i]; 69 47 } … … 90 68 $rules=$pr->readrules(); 91 69 92 if ($ act=="up") {93 $t=$pr->uprule($rules,$ rid);70 if ($_REQUEST["act"]=="up") { 71 $t=$pr->uprule($rules,$_REQUEST["rid"]); 94 72 if ($t!==false) { 95 73 $pr->writerules($t); … … 99 77 } 100 78 } 101 if ($ act=="down") {102 $t=$pr->downrule($rules,$ rid);79 if ($_REQUEST["act"]=="down") { 80 $t=$pr->downrule($rules,$_REQUEST["rid"]); 103 81 if ($t!==false) { 104 82 $pr->writerules($t);
