X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_order.php;h=7309da7b3a31423077d919e4ec820285a508cddb;hb=0fa230016e399929e51d8e007b1509421424c7de;hp=f0de44f78ab77f44987f674bcc7cedcfddf4fbd3;hpb=bd9bbfefba8fa274260a37c965f7510bb6670599;p=squirrelmail.git diff --git a/src/options_order.php b/src/options_order.php index f0de44f7..7309da7b 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -3,148 +3,144 @@ /** * options_order.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * - * Displays message highlighting options + * Displays messagelist column order options * * $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. ***/ -/*****************************************************************/ +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); -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'); +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); +require_once(SM_PATH . 'functions/display_messages.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/plugin.php'); +require_once(SM_PATH . 'functions/html.php'); +/* get globals */ +sqgetGlobalVar('num', $num, SQ_GET); +sqgetGlobalVar('add', $add, SQ_POST); - if (! isset($action)) { $action = ''; } - if ($action == 'delete' && isset($theid)) { - removePref($data_dir, $username, "highlight$theid"); - } else if ($action == 'save') { - } - displayPageHeader($color, 'None'); -?> -
- -
- - - - - '; + echo html_tag( 'td', ' - ' ); + echo html_tag( 'td', $available[$tmp] ); + echo '' . "\n"; + } + echo '

- 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 = 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 '
' . "\n"; - echo _("The index order is the order that the columns are arranged in the message index. You can add, remove, and move columns around to customize them to fit your needs."); - echo '

'; - - if (count($index_order)) - { - echo '' . "\n"; - for ($i=1; $i <= count($index_order); $i++) { - $tmp = $index_order[$i]; - echo ''; - echo "\n"; - echo '' . "\n"; - echo "\n"; - echo '' . "\n"; - echo '\n"; - echo '' . "\n"; - echo '\n"; - echo "\n"; - } - echo "
". _("up") ." | ". _("down") . " | '; - // Always show the subject - if ($tmp != 4) - echo "" . _("remove") . ''; - echo " - ' . $available[$tmp] . "
\n"; - } - - if (count($index_order) != count($available)) { - echo '
'; - echo '
' . "\n"; + } + + if (count($index_order) != count($available)) { + echo ''; + echo ''; - echo ''; - echo ''; - echo ''; - } - - echo '

' . _("Return to options page") . '


'; + if (!$found) { + echo ""; + } + } + echo ''; + echo ''; + echo ''; + echo ''; + } + + echo html_tag( 'p', '' . _("Return to options page") . '


' ); ?>