1<?php 2 /**************************************************************************\ 3 * phpGroupWare - Calendar * 4 * http://www.phpgroupware.org * 5 * Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> * 6 * http://www.radix.net/~cknudsen * 7 * Modified by Mark Peters <skeeter@phpgroupware.org> * 8 * -------------------------------------------- * 9 * This program is free software; you can redistribute it and/or modify it * 10 * under the terms of the GNU General Public License as published by the * 11 * Free Software Foundation; either version 2 of the License, or (at your * 12 * option) any later version. * 13 \**************************************************************************/ 14 15 /* $Id: class.bopreferences.inc.php 21063 2010-03-25 22:46:41Z Caeies $ */ 16 17 class bopreferences 18 { 19 var $public_functions = Array( 20 'preferences' => True 21 ); 22 23 var $prefs; 24 var $debug = False; 25 26 function bopreferences() 27 { 28 $GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); 29 $this->prefs['todo'] = $GLOBALS['phpgw_info']['user']['preferences']['todo']; 30 } 31 32 function preferences() 33 { 34 if (isset($GLOBALS['HTTP_POST_VARS']['submit'])) 35 { 36 $GLOBALS['phpgw']->preferences->read_repository(); 37 if ($GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents'] == True) 38 { 39 $GLOBALS['phpgw']->preferences->add('todo','mainscreen_showevents',$GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents']); 40 } 41 else 42 { 43 $GLOBALS['phpgw']->preferences->delete('todo','mainscreen_showevents'); 44 } 45 46 $GLOBALS['phpgw']->preferences->save_repository(True); 47 48 Header('Location: '.$GLOBALS['phpgw']->link('/preferences/index.php')); 49 $GLOBALS['phpgw']->common->phpgw_exit(); 50 } 51 } 52 } 53 54