switched doctype to standard compliance mode
[squirrelmail.git] / src / options_order.php
index dd01c57eeb19d6ff2207e8aecd996a5b3f67dab3..5e1c36f2adbf08e86aa9270f731febbfa47308e5 100644 (file)
@@ -3,13 +3,13 @@
 /**
  * options_order.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * Displays messagelist column order options
  *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
+ * @subpackage prefs
  */
 
 /**
 define('SM_PATH','../');
 
 /* 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');
-require_once(SM_PATH . 'functions/forms.php');
-require_once(SM_PATH . 'functions/arrays.php');
-require_once(SM_PATH . 'functions/options.php');
+include_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'functions/global.php');
+include_once(SM_PATH . 'functions/display_messages.php');
+include_once(SM_PATH . 'functions/imap.php');
+include_once(SM_PATH . 'functions/plugin.php');
+include_once(SM_PATH . 'functions/html.php');
+include_once(SM_PATH . 'functions/forms.php');
+include_once(SM_PATH . 'functions/arrays.php');
+//require_once(SM_PATH . 'functions/options.php');
 
 /* get globals */
 if (sqgetGlobalVar('num',       $num,       SQ_GET)) {
@@ -68,7 +68,7 @@ if (!isset($index_order)) {
         $index_order = array(SQM_COL_CHECK,SQM_COL_FROM,SQM_COL_DATE,SQM_COL_FLAGS,SQM_COL_ATTACHMENT,SQM_COL_PRIO,SQM_COL_SUBJ);
     } else {
         $index_order = array(SQM_COL_CHECK,SQM_COL_FROM,SQM_COL_INT_DATE,SQM_COL_FLAGS,SQM_COL_ATTACHMENT,SQM_COL_PRIO,SQM_COL_SUBJ);
-    }    
+    }
 }
 
 if (!sqgetGlobalVar('account', $account,  SQ_GET)) {
@@ -99,8 +99,9 @@ function change_columns_list(&$index_order,$method,$num,$pos=0) {
     $r = false;
     switch ($method) {
       case 'move': $r = sqm_array_move_value($index_order,$num,$pos); break;
-      case 'add':  
-          $index_order[] = (int) $num; $r = true; 
+      case 'add':
+          $index_order[] = (int) $num;
+          $r = true;
           /**
            * flush the cache in order to retrieve the new columns
            */
@@ -132,7 +133,7 @@ $available[SQM_COL_ATTACHMENT] = _("Attachments");
 $available[SQM_COL_INT_DATE]   = _("Received");
 $available[SQM_COL_TO]         = _("To");
 $available[SQM_COL_CC]         = _("Cc");
-$available[SQM_COL_BCC]        = _("bcc");
+$available[SQM_COL_BCC]        = _("Bcc");
 
 if (change_columns_list($index_order,$method,$num,$pos)) {
     if ($method) {
@@ -156,7 +157,6 @@ if (count($index_order) != count($available)) {
 viewOrderForm($available, $index_order,$opts,urldecode($mailbox));
 
 
-
 // FOOD for html designers
 function viewOrderForm($aColumns, $aOrder, $aOpts, $mailbox) {
    global $color;
@@ -202,7 +202,7 @@ function viewOrderForm($aColumns, $aOrder, $aOpts, $mailbox) {
                   <td><small>&nbsp;|&nbsp;</small></td>
 <?php
               /* Always show the subject */
-              if ($iCol != SQM_COL_SUBJ) {
+              if ($iCol !== SQM_COL_SUBJ && $iCol !== SQM_COL_FLAGS) {
 ?>
                   <td><small><a href="options_order.php?method=remove&amp;num=<?php echo $sQuery; ?>"> <?php echo _("remove");?> </a></small></td>
 <?php         } else { ?>
@@ -234,8 +234,8 @@ function viewOrderForm($aColumns, $aOrder, $aOpts, $mailbox) {
       </table>
     </td></tr>
   </table>
-</body></html>
 
 <?php
 }
+$oTemplate->display('footer.tpl');
 ?>
\ No newline at end of file