True, 'saveRss' => True, ); function __construct() { $this->dao = CreateObject('phpgwapi.config',$GLOBALS['phpgw_info']['flags']['currentapp']); $GLOBALS['phpgw']->common->phpgw_header(); $this->dao->read_repository(); } public final function editRss() { if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') ) { $GLOBALS['phpgw']->redirect_link('/admin/index.php'); } $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url']; $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/'; $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . lang('RSS Reader'); echo parse_navbar(); $path_expressoMail = $webserver_url . "/". $GLOBALS['phpgw_info']['flags']['currentapp']; if ($this->dao->config_data ) { $current_config = $this->dao->config_data; } $selected_true = ""; if( $current_config['expressoMail_enabled_read_rss'] === 'true' ) { $selected_true = 'selected'; } //Option True / False $selected_false = ""; if( $current_config['expressoMail_enabled_read_rss'] === 'false' ) { $selected_false = 'selected'; } // Options $option = ""; if( $current_config['expressoMail_list_rss'] ) { foreach($current_config['expressoMail_list_rss'] as $config) { $item = explode("|", $config); $option .= ""; } } $GLOBALS['phpgw']->template->set_file(array('readRSS' => 'readRss.tpl')); $GLOBALS['phpgw']->template->set_block('readRSS','bodyRSS'); $GLOBALS['phpgw']->template->set_var(array( 'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoMail1_2.uiconfigRSS.saveRss'), 'lang_add' => lang('Add'), 'lang_cancel' => lang('Cancel'), 'lang_enable_RSS' => lang('Enable RSS reader'), 'lang_enter_Rss' => lang('Enter the URL of the RSS service'), 'lang_list_rss' => lang('List of registered RSS'), 'lang_submit' => lang('Save'), 'lang_remove' => lang('remove'), 'lang_RSS_Manager' => lang('RSS Manager'), 'lang_No' => lang('No'), 'lang_Yes' => lang('Yes'), 'lang_can_not_access_this_rss' => lang('Can not access this RSS'), 'selected_expressoMail_enabled_read_rss_true' => $selected_true, 'selected_expressoMail_enabled_read_rss_false' => $selected_false, 'options_list_rss' => $option, 'path_expressoMail' => $path_expressoMail )); $GLOBALS['phpgw']->template->pparse('out','bodyRSS'); } public final function saveRss() { if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') ) { $GLOBALS['phpgw']->redirect_link('/admin/index.php'); } else { if ( $_POST['save'] ) { $listRss = ( $_POST['newsettings_expressoMail_list_rss'] ) ? serialize($_POST['newsettings_expressoMail_list_rss']) : "" ; $this->dao->config_data['expressoMail_list_rss'] = $listRss; foreach($_POST['newsettings'] as $key => $config) { $this->dao->config_data[$key] = $config; } $this->dao->save_repository(); } $GLOBALS['phpgw']->redirect_link('/admin/index.php'); } } } ?>