X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_order.php;h=3be5f87fcd41ebfbd692497fe7f91358ee382fb0;hb=4eec80a7296fd32006c010387d8ead6cbc2847d8;hp=f0de44f78ab77f44987f674bcc7cedcfddf4fbd3;hpb=bd9bbfefba8fa274260a37c965f7510bb6670599;p=squirrelmail.git
diff --git a/src/options_order.php b/src/options_order.php
index f0de44f7..3be5f87f 100644
--- a/src/options_order.php
+++ b/src/options_order.php
@@ -11,35 +11,18 @@
* $Id$
*/
-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
-/*** + Base level indent should begin at left margin, as ***/
-/*** the require_once below looks. ***/
-/*** + All identation should consist of four space blocks ***/
-/*** + Tab characters are evil. ***/
-/*** + all comments should use "slash-star ... star-slash" ***/
-/*** style -- no pound characters, no slash-slash style ***/
-/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
-/*** ALWAYS USE { AND } CHARACTERS!!! ***/
-/*** + Please use ' instead of ", when possible. Note " ***/
-/*** should always be used in _( ) function calls. ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
require_once('../src/validate.php');
require_once('../functions/display_messages.php');
require_once('../functions/imap.php');
require_once('../functions/array.php');
require_once('../functions/plugin.php');
-
- if (! isset($action)) { $action = ''; }
- if ($action == 'delete' && isset($theid)) {
- removePref($data_dir, $username, "highlight$theid");
- } else if ($action == 'save') {
- }
- displayPageHeader($color, 'None');
+if (! isset($action)) { $action = ''; }
+if ($action == 'delete' && isset($theid)) {
+ removePref($data_dir, $username, "highlight$theid");
+} elseif ($action == 'save') {
+}
+displayPageHeader($color, 'None');
?>
1) { - $prev = $num-1; - $tmp = $index_order[$prev]; - $index_order[$prev] = $index_order[$num]; - $index_order[$num] = $tmp; - } else if ($method == 'down' && $num < count($index_order)) { - $next = $num++; - $tmp = $index_order[$next]; - $index_order[$next] = $index_order[$num]; - $index_order[$num] = $tmp; - } else if ($method == 'remove' && $num) { - for ($i=1; $i < 8; $i++) { - removePref($data_dir, $username, "order$i"); - } - for ($j=1,$i=1; $i <= count($index_order); $i++) { - if ($i != $num) { - $new_ary[$j] = $index_order[$i]; - $j++; - } - } - $index_order = array(); - $index_order = $new_ary; - if (count($index_order) < 1) { - include_once('../src/load_prefs.php'); - } - } else if ($method == 'add' && $add) { - // User should not be able to insert PHP-code here - $add = str_replace ('', '..', $add); - $add = ereg_replace ('<.*script.*language.*php.*>', '..', $add); - $add = str_replace ('<%', '..', $add); - $index_order[count($index_order)+1] = $add; - } - - if ($method) { - for ($i=1; $i <= count($index_order); $i++) { - setPref($data_dir, $username, "order$i", $index_order[$i]); - } - } - echo '
'; - - if (count($index_order)) - { - echo '
' . _("Return to options page") . ' '; ?> |