if (isset($_POST['submitok']) && $_POST['submitok'] == 'true') {
    // Prepare an array of the HTML elements to process, and the
    // location to save the values in the settings configuration
    // file
    $aElements = array();
    // General Settings
    $aElements += array('ui_enabled' => array('ui' => 'enabled', 'bool' => true), 'ui_applicationName' => array('ui' => 'applicationName'), 'ui_headerFilePath' => array('ui' => 'headerFilePath'), 'ui_footerFilePath' => array('ui' => 'footerFilePath'), 'ui_logoFilePath' => array('ui' => 'logoFilePath'), 'ui_headerForegroundColor' => array('ui' => 'headerForegroundColor'), 'ui_headerBackgroundColor' => array('ui' => 'headerBackgroundColor'), 'ui_headerActiveTabColor' => array('ui' => 'headerActiveTabColor'), 'ui_headerTextColor' => array('ui' => 'headerTextColor'), 'ui_gzipCompression' => array('ui' => 'gzipCompression', 'bool' => true));
    // SSL Settings
    $aElements += array('openads_requireSSL' => array('openads' => 'requireSSL', 'bool' => true), 'openads_sslPort' => array('openads' => 'sslPort'));
    // Dashboard Settings
    $aElements += array('ui_dashboardEnabled' => array('ui' => 'dashboardEnabled', 'bool' => true));
    // Dashboard Settings
    $aElements += array('authentication_type' => array('authentication' => 'type'));
    // Create a new settings object, and save the settings!
    $oSettings = new OA_Admin_Settings();
    $result = $oSettings->processSettingsFromForm($aElements);
    if ($result) {
        // Delete all the sessions if the UI is disabled
        // to force all the users to be logged out
        if (!$GLOBALS['ui_enabled']) {
            $doSession = OA_Dal::factoryDO('session');
            $doSession->whereAdd('1=1');
            $doSession->delete(DB_DATAOBJECT_WHEREADD_ONLY);
        }
        // Rebuild the menu because the Enable Dashboard setting could been changed
        OA_Admin_Menu::_clearCache(OA_ACCOUNT_ADMIN);
        OA_Admin_Menu::_clearCache(OA_ACCOUNT_MANAGER);
        // Queue confirmation message
        $setPref = $oOptions->getSettingsPreferences($prefSection);
        $title = $setPref[$prefSection]['name'];
        $translation = new OX_Translation();