Beispiel #1
0
 function handleSettingsPost()
 {
     if (isset($_GET['page'])) {
         if ($_GET['page'] == 'DashboardOptions') {
             if (isset($_POST['submit'])) {
                 MainWPUtility::update_option('mainwp_use_favicon', !isset($_POST['mainwp_use_favicon']) ? 0 : 1);
                 MainWPUtility::update_option('mainwp_hide_footer', !isset($_POST['mainwp_hide_footer']) ? 0 : 1);
                 MainWPUtility::update_option('mainwp_hide_tips', !isset($_POST['mainwp_hide_tips']) ? 0 : 1);
                 $enabled_twit = !isset($_POST['mainwp_hide_twitters_message']) ? 0 : 1;
                 MainWPUtility::update_option('mainwp_hide_twitters_message', $enabled_twit);
                 if (!$enabled_twit) {
                     MainWPTwitter::clearAllTwitterMessages();
                 }
             }
         } else {
             if ($_GET['page'] == "Settings") {
                 if (isset($_POST['submit'])) {
                     if (isset($_POST['mainwp_primaryBackup'])) {
                         MainWPUtility::update_option('mainwp_primaryBackup', $_POST['mainwp_primaryBackup']);
                     }
                 }
             }
         }
     }
     if (isset($_POST['select_mainwp_options_siteview'])) {
         $userExtension = MainWPDB::Instance()->getUserExtension();
         $userExtension->site_view = empty($_POST['select_mainwp_options_siteview']) ? 0 : 1;
         MainWPDB::Instance()->updateUserExtension($userExtension);
     }
 }
Beispiel #2
0
 function handleSettingsPost()
 {
     if (isset($_GET['page'])) {
         if ($_GET['page'] == 'DashboardOptions') {
             if (isset($_POST['submit'])) {
                 MainWPUtility::update_option('mainwp_use_favicon', !isset($_POST['mainwp_use_favicon']) ? 0 : 1);
                 MainWPUtility::update_option('mainwp_hide_footer', !isset($_POST['mainwp_hide_footer']) ? 0 : 1);
                 MainWPUtility::update_option('mainwp_hide_tips', !isset($_POST['mainwp_hide_tips']) ? 0 : 1);
                 $enabled_twit = !isset($_POST['mainwp_hide_twitters_message']) ? 0 : 1;
                 MainWPUtility::update_option('mainwp_hide_twitters_message', $enabled_twit);
                 if (!$enabled_twit) {
                     MainWPTwitter::clearAllTwitterMessages();
                 }
             }
         } else {
             if ($_GET['page'] == "Settings") {
                 if (isset($_POST['submit'])) {
                     if (isset($_POST['mainwp_primaryBackup'])) {
                         MainWPUtility::update_option('mainwp_primaryBackup', $_POST['mainwp_primaryBackup']);
                     }
                 }
             }
         }
     }
 }