Source for file options_order.php
Documentation is available at options_order.php
* 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: options_order.php,v 1.52 2006/09/22 09:29:04 pdontthink Exp $
* Include the SquirrelMail initialization file.
require
('../include/init.php');
/* SquirrelMail required files. */
require_once(SM_PATH .
'functions/forms.php');
$iAccount = (int)
$account;
$index_order_ser =
getPref($data_dir, $username, 'index_order');
if (!isset
($index_order)) {
if (isset
($internal_date_sort) &&
$internal_date_sort ==
false) {
$account =
0; // future work, multiple imap accounts
$account = (int)
$account;
/***************************************************************/
/* Finally, display whatever page we are supposed to show now. */
/***************************************************************/
displayPageHeader($color, 'None', (isset
($optpage_data['xtra']) ?
$optpage_data['xtra'] :
''));
* Change the column order of a mailbox
* @param array $index_order (reference) contains an ordered list with columns
* @param string $method action to take, move, add and remove are supported
* @param int $num target column
* @param int $pos positions to move a column in the index_order array
* @return bool $r A change in the ordered list took place.
$index_order[] = (int)
$num;
* flush the cache in order to retrieve the new columns
* Column to string translation array
// TODO, bound index_order to mailbox and make a difference between the global index_order and mailbox bounded index_order
for ($i=
0; $i <
count($available); $i++
) {
$opts[$i] =
$available[$i];
$x = isset
($mailbox) &&
$mailbox ?
'&mailbox='.
urlencode($mailbox) :
'';
$oTemplate->assign('fields', $available);
$oTemplate->assign('current_order', $index_order);
$oTemplate->assign('not_used', $opts);
$oTemplate->assign('move_up', $PHP_SELF .
'?method=move&positions=-1'.
$x .
'&num=');
$oTemplate->assign('move_down', $PHP_SELF .
'?method=move&positions=1'.
$x .
'&num=');
$oTemplate->assign('remove', $PHP_SELF .
'?method=remove'.
$x .
'&num=');
$oTemplate->assign('add', $PHP_SELF.
'?method=add'.
$x.
'&num=');
$oTemplate->assign('addField_action', $PHP_SELF);
$oTemplate->display('options_order.tpl');
$oTemplate->display('footer.tpl');
Documentation generated on Sat, 07 Oct 2006 16:12:57 +0300 by phpDocumentor 1.3.0RC6