- $arr["schema"] = PConfig::get(local_user(),'frio', 'schema');
- $arr["nav_bg"] = PConfig::get(local_user(),'frio', 'nav_bg');
- $arr["nav_icon_color"] = PConfig::get(local_user(),'frio', 'nav_icon_color');
- $arr["link_color"] = PConfig::get(local_user(),'frio', 'link_color');
- $arr["bgcolor"] = PConfig::get(local_user(),'frio', 'background_color');
- $arr["contentbg_transp"] = PConfig::get(local_user(),'frio', 'contentbg_transp');
- $arr["background_image"] = PConfig::get(local_user(),'frio', 'background_image');
- $arr["bg_image_option"] = PConfig::get(local_user(),'frio', 'bg_image_option');
+ if (isset($_POST['frio-settings-submit'])) {
+ Config::set('frio', 'scheme', defaults($_POST, 'frio_scheme', ''));
+ Config::set('frio', 'nav_bg', defaults($_POST, 'frio_nav_bg', ''));
+ Config::set('frio', 'nav_icon_color', defaults($_POST, 'frio_nav_icon_color', ''));
+ Config::set('frio', 'link_color', defaults($_POST, 'frio_link_color', ''));
+ Config::set('frio', 'background_color', defaults($_POST, 'frio_background_color', ''));
+ Config::set('frio', 'contentbg_transp', defaults($_POST, 'frio_contentbg_transp', ''));
+ Config::set('frio', 'background_image', defaults($_POST, 'frio_background_image', ''));
+ Config::set('frio', 'bg_image_option', defaults($_POST, 'frio_bg_image_option', ''));
+ Config::set('frio', 'login_bg_image', defaults($_POST, 'frio_login_bg_image', ''));
+ Config::set('frio', 'login_bg_color', defaults($_POST, 'frio_login_bg_color', ''));
+ Config::set('frio', 'css_modified', time());
+ }
+}
+
+function theme_content(App $a)
+{
+ if (!local_user()) {
+ return;
+ }
+ $arr = [];
+
+ $arr['scheme'] = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'schema'));
+ $arr['share_string'] = '';
+ $arr['nav_bg'] = PConfig::get(local_user(), 'frio', 'nav_bg');
+ $arr['nav_icon_color'] = PConfig::get(local_user(), 'frio', 'nav_icon_color');
+ $arr['link_color'] = PConfig::get(local_user(), 'frio', 'link_color');
+ $arr['background_color'] = PConfig::get(local_user(), 'frio', 'background_color');
+ $arr['contentbg_transp'] = PConfig::get(local_user(), 'frio', 'contentbg_transp');
+ $arr['background_image'] = PConfig::get(local_user(), 'frio', 'background_image');
+ $arr['bg_image_option'] = PConfig::get(local_user(), 'frio', 'bg_image_option');