* * -------------------------------------------- * * 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$ */ $phpgw_flags = array("noheader" => True, "nonavbar" => True); $phpgw_flags["currentapp"] = "preferences"; include("../header.inc.php"); if ($phpgw_info["user"]["permissions"]["anonymous"]) { Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/")); exit; } else if (! $submit) { $phpgw->common->header(); $phpgw->common->navbar(); } function display_option($text,$check,$option) { global $phpgw, $phpgw_info; if ($phpgw_info["user"]["permissions"][$check]) { ?> ? >
"> \n"; ?>
: " size="2">
: >
:
:
: " . "" . "" . "\n"; ?>
? >
:
">
db->query("delete from preferences where owner='" . $phpgw_info["user"]["userid"] . "' AND name != 'theme'"); // If they don't have permissions to the headlines, // we don't need to lock the table. if ($phpgw_info["user"]["permissions"]["headlines"]) { $phpgw->db->lock(array("preferences","users_headlines")); } else { $phpgw->db->lock("preferences"); } $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"maxmatchs"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"tz_offset"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"dateformat"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"timeformat"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"lang"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_sorting"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_app"); if ($navbar_text) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"navbar_text"); } if ($phpgw_info["user"]["permissions"]["admin"]) { if ($show_currentusers) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"show_currentusers"); } } if ($phpgw_info["user"]["permissions"]["email"]) { if ($mainscreen_showmail) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showmail"); } $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"email_sig"); } if ($phpgw_info["user"]["permissions"]["addressbook"]) { if ($mainscreen_showbirthdays) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays"); } } if ($phpgw_info["user"]["permissions"]["calendar"]) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"weekdaystarts"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdaystarts"); $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdayends"); if ($mainscreen_showevents) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showevents"); } } if ($phpgw_info["user"]["permissions"]["headlines"]) { include($phpgw_info["server"]["server_root"] . "/headlines/inc/functions.inc.php"); headlines_update($phpgw_info["user"]["userid"],$headlines); } $phpgw->db->unlock(); Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/")); } include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");