* * -------------------------------------------- * * 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"; 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;$kaccounts->memberships($owner); for($k=0;$kget_app_list_for_id('run',1,$memberships[$k]['account_id']); while($apps = each($apps_list)) { if($apps[1] == 'admin') return True; } } return False; } if (! $submit) { if ($phpgw_info["server"]["useframes"] != "never") { $target = ' target="_top"'; } ?>
"> "; } ?>
: " size="2">
Interface/Template Selection:
Theme (colors/fonts) Selection:
:
: >
:
:
:
: " . "" . "" . "\n"; ?>
' . 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($phpgw_info['server']['webserver_url'] . '/preferences/index.php')); $phpgw->common->phpgw_exit(); } Header('Location: ' . $phpgw->link('index.php')); } ?>