Example #1
0
    installLog("insert defaults into config table");
    insert_default_settings();
}
installerHook('post_createDefaultSettings');
installerHook('pre_createUsers');
if ($new_tables) {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_DEFAULT_USERS'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_DEFAULT_USERS']);
    create_default_users();
    echo $mod_strings['LBL_PERFORM_DONE'];
} else {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_ADMIN_PASSWORD'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_ADMIN_PASSWORD']);
    $db->setUserName($setup_db_sugarsales_user);
    $db->setUserPassword($setup_db_sugarsales_password);
    set_admin_password($setup_site_admin_password);
    echo $mod_strings['LBL_PERFORM_DONE'];
}
installerHook('post_createUsers');
// default OOB schedulers
echo $line_entry_format . $mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER'] . $line_exit_format;
installLog($mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER']);
$scheduler = new Scheduler();
installerHook('pre_createDefaultSchedulers');
$scheduler->rebuildDefaultSchedulers();
installerHook('post_createDefaultSchedulers');
echo $mod_strings['LBL_PERFORM_DONE'];
// Enable Sugar Feeds and add all feeds by default
installLog("Enable SugarFeeds");
enableSugarFeeds();
// Enable the InsideView connector and add all modules
Example #2
0
        if (count($data['errors'])) {
            foreach ($data['errors'] as $error) {
                $msg = '';
                if ($error['level'] == 'error') {
                    $msg .= _LOGO_ERROR;
                } elseif ($error['level'] == 'warning') {
                    $msg .= _LOGO_WARNING;
                } elseif ($error['level'] == 'good') {
                    $msg .= _LOGO_GOOD;
                }
                $msg .= $error['message'];
                display_message($msg);
            }
        }
        if ($data['caninstall']) {
            set_admin_password($_POST["passwd"]);
            display_message(_LOGO_GOOD . "Votre mot de passe a été enregistré.");
            display_link("Cliquez ici pour continuer", 'index.php?step=' . ($step + 1));
        } else {
            display_message("Afin de protéger votre Iconito, merci de choisir le mot de passe d'administration.");
            ?>
<form method="post" name="selectpasswd">

<table border="0">
<tr><td align="right">Mot de passe :</td><td><input name="passwd" type="password" /></td></tr>
<tr><td align="right">Confirmez :</td><td><input name="passwd2" type="password" /></td></tr>
<tr><td></td><td><input type="submit" value="Valider" /></td></tr>
</table>

<p><b>Note :</b> <i>Votre mot de passe doit faire au minimum 6 caract&egrave;res et ne pas comporter que des lettres ou que des chiffres.</i></p>
Example #3
0
                $html->set_variable('refresh_navigation_frame', true, 'boolean');
                //header('Location: system_config.php'); // Reload the page that we can see if the new settings are stored successfully --> does not work correctly?!
            } catch (Exception $e) {
                $config = $config_old;
                // reload the old config
                $messages[] = array('text' => 'Die neuen Werte konnten nicht gespeichert werden!', 'strong' => true, 'color' => 'red');
                $messages[] = array('text' => 'Fehlermeldung: ' . nl2br($e->getMessage()), 'color' => 'red');
            }
            break;
        case 'change_admin_password':
            try {
                if ($config['is_online_demo']) {
                    throw new Exception('Diese Funktion steht in der Online-Demo nicht zur Verfügung!');
                }
                // set_admin_password() throws an exception if the old or the new passwords are not valid
                set_admin_password($current_admin_password, $new_admin_password_1, $new_admin_password_2, false);
                save_config();
                $messages[] = array('text' => 'Das neue Administratorpasswort wurde erfolgreich gespeichert.', 'strong' => true, 'color' => 'darkgreen');
            } catch (Exception $e) {
                $messages[] = array('text' => 'Die neuen Werte konnten nicht gespeichert werden!', 'strong' => true, 'color' => 'red');
                $messages[] = array('text' => 'Fehlermeldung: ' . nl2br($e->getMessage()), 'color' => 'red');
            }
            break;
    }
}
/********************************************************************************
 *
 *   Set all HTML variables
 *
 *********************************************************************************/
$html->use_javascript(array('validatenumber', 'popup'));
Example #4
0
         $config['timezone'] = $timezone;
         $config['language'] = $language;
         // check if the server supports the selected language and print a warning if not
         if (!own_setlocale(LC_ALL, $config['language'])) {
             throw new Exception('Die gewählte Sprache "' . $config['language'] . '" wird vom Server nicht unterstützt!' . "\nBitte installieren Sie diese Sprache oder wählen Sie eine andere.");
         }
         $config['installation_complete']['locales'] = true;
         // locales successful set
     } catch (Exception $e) {
         $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
     }
     break;
 case 'save_admin_password':
     try {
         // set_admin_password() throws an exception if the new passwords are not valid
         set_admin_password(NULL, $adminpass_1, $adminpass_2, false);
         $config['installation_complete']['admin_password'] = true;
         // admin password successful set
     } catch (Exception $e) {
         $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
     }
     break;
 case 'save_db_settings':
     try {
         $config['db']['type'] = $db_type;
         //$config['db']['charset'] = $db_charset; // temporarly deactivated
         $config['db']['host'] = $db_host;
         $config['db']['name'] = $db_name;
         $config['db']['user'] = $db_user;
         $config['db']['password'] = $db_password;
         if (strlen($config['db']['name']) == 0) {