function phpAds_ConfigFileUpdateFlush()
{
    global $phpAds_settings_update_cache;
    global $phpAds_settings_information;
    for (reset($phpAds_settings_update_cache); $key = key($phpAds_settings_update_cache); next($phpAds_settings_update_cache)) {
        phpAds_SettingsWriteAdd($key, $phpAds_settings_update_cache[$key]);
    }
    // Before we start writing all the settings
    // start with a clean config file to make
    // sure we always have the latest version
    phpAds_ConfigFileClear();
    // Now write all the settings back to the
    // clean config file
    return phpAds_SettingsWriteFlush();
}
                    } else {
                        $errormessage[2][] = $strTypeFTPErrorDir;
                    }
                } else {
                    $errormessage[2][] = $strTypeFTPErrorConnect;
                }
                @ftp_quit($ftpsock);
            } else {
                $errormessage[2][] = $strTypeFTPErrorHost;
            }
        }
    }
    phpAds_SettingsWriteAdd('type_html_auto', isset($type_html_auto));
    phpAds_SettingsWriteAdd('type_html_php', isset($type_html_php));
    if (!count($errormessage)) {
        if (phpAds_SettingsWriteFlush()) {
            header("Location: settings-admin.php");
            exit;
        }
    }
}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
phpAds_PrepareHelp();
phpAds_PageHeader("5.1");
phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2"));
phpAds_SettingsSelection("banner");
/*********************************************************/
/* Cache settings fields and get help HTML Code          */
/*********************************************************/
function phpAds_ConfigFileUpdateFlush()
{
    global $phpAds_settings_update_cache, $phpAds_settings_write_cache;
    global $phpAds_settings_information;
    foreach (array_keys($phpAds_settings_update_cache) as $key) {
        // Write old settings if they haven't been override
        if (!isset($phpAds_settings_write_cache[$key])) {
            phpAds_SettingsWriteAdd($key, $phpAds_settings_update_cache[$key]);
        }
    }
    // Before we start writing all the settings
    // start with a clean config file to make
    // sure we always have the latest version
    phpAds_ConfigFileClear();
    // Now write all the settings back to the
    // clean config file
    return phpAds_SettingsWriteFlush();
}