* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ if ($submit) { $phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True); } $phpgw_info["flags"]["currentapp"] = "preferences"; $phpgw_info["flags"]["enable_sbox_class"] = True; include("../header.inc.php"); function is_user_admin($owner) { global $phpgw; $acl = CreateObject('phpgwapi.acl',intval($owner)); $acl_list = $acl->read_repository(); for ($k=0;$kmembership($owner); unset($acct); for ($k=0;$kget_app_list_for_id('run',1,$memberships[$k]['account_id']); if (is_array($apps_list)) { asort($apps_list); while($apps = each($apps_list)) { if($apps[1] == 'admin') { return True; } } } } return False; } if (! $submit) { if ($phpgw_info["server"]["useframes"] != "never") { $target = ' target="_top"'; } ?>
> "; } if ($phpgw_info['server']['force_default_app'] == 'user_choice') { ?>
: " size="2">


:
: >
:
:
:
: " . "" . "" . "\n"; ?>
sbox->form_select($phpgw_info['user']['preferences']['common']['country'],'settings[country]'); ?>

' . lang("show current users on navigation bar") . '' . '
">
">
common->phpgw_footer(); } else { if(!$owner) { $owner = $phpgw_info['user']['account_id']; } $pref = CreateObject('phpgwapi.preferences',intval($owner)); $pref->read_repository(); $pref->delete('common'); while ($setting = each($settings)) { $pref->add('common',$setting[0],$setting[1]); } // This one is specialized, so we do it manually if (is_user_admin($owner)) { if ($show_currentusers) { $pref->add('common','show_currentusers'); } } $pref->save_repository(); if ($phpgw_info['server']['useframes'] != 'never') { Header('Location: ' . $phpgw->link('/preferences/index.php')); $phpgw->common->phpgw_exit(); } Header('Location: ' . $phpgw->link('/preferences/index.php')); } ?>