14 define(
'IN_INSTALLATION', 6);
15 include(
"../configuration.inc.php");
20 if(empty(
$_SESSION[
'session_install_finished'])) {
21 if (empty($_POST[
'email'])) {
24 if (empty($_POST[
'motdepasse'])) {
25 $error[] =
'error_motdepasse=1';
27 if (empty($_POST[
'pseudo']) ||
String::strpos($_POST[
'pseudo'],
'@') !==
false) {
28 $error[] =
'error_pseudo=1';
35 unset(
$_SESSION[
'session_peel_sql_premium']);
38 $new_user_infos = array(
'priv' =>
'admin',
39 'email' => $_POST[
'email'],
40 'pseudo' => $_POST[
'pseudo'],
41 'prenom' => $_POST[
'prenom'],
42 'nom_famille' => $_POST[
'nom'],
44 'telephone' => $_POST[
'telephone'],
45 'adresse' => $_POST[
'adresse'],
46 'code_postal' => $_POST[
'code_postal'],
47 'ville' => $_POST[
'ville'],
50 'mot_passe' => $_POST[
'motdepasse']);
52 foreach(
$_SESSION[
'session_install_langs'] as $this_lang) {
56 set_configuration_variable(array(
'technical_code' =>
'site_id_showed_by_default_if_domain_not_found',
'string' =>
"1",
'type' =>
'integer',
'origin' =>
'core',
'explain' =>
'For multisite : to allow any alias on a hosting to reach the main site - Put 0 if you want to only allow configured domains',
'site_id' => 0),
true);
57 set_configuration_variable(array(
'technical_code' =>
'email_webmaster',
'string' =>
$_SESSION[
'session_install_email_webmaster'],
'type' =>
'string',
'site_id' => 1),
true);
59 set_configuration_variable(array(
'technical_code' =>
'email_commande',
'string' => $_POST[
'email'],
'type' =>
'string',
'site_id' => 1),
true);
60 set_configuration_variable(array(
'technical_code' =>
'email_webmaster',
'string' => $_POST[
'email'],
'type' =>
'string',
'site_id' => 1),
true);
61 set_configuration_variable(array(
'technical_code' =>
'email_client',
'string' => $_POST[
'email'],
'type' =>
'string',
'site_id' => 1),
true);
63 set_configuration_variable(array(
'technical_code' =>
'display_errors_for_ips',
'string' => $_SERVER[
'REMOTE_ADDR'],
'type' =>
'string',
'site_id' => 1),
true);
85 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'installation_fin.tpl');
87 $tpl->assign(
'email',
vb($_POST[
'email']));
88 $tpl->assign(
'motdepasse',
vb($_POST[
'motdepasse']));
89 $tpl->assign(
'pseudo',
vb($_POST[
'pseudo']));
94 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
95 $tpl->assign(
'STR_ADMIN_INSTALL_NOW_INSTALLED',
$GLOBALS[
'STR_ADMIN_INSTALL_NOW_INSTALLED']);
96 $tpl->assign(
'STR_ADMIN_INSTALL_YOU_CAN_LOGIN_ADMIN',
$GLOBALS[
'STR_ADMIN_INSTALL_YOU_CAN_LOGIN_ADMIN']);
97 $tpl->assign(
'STR_ADMIN_INSTALL_ADMIN_LINK_INFOS',
$GLOBALS[
'STR_ADMIN_INSTALL_ADMIN_LINK_INFOS']);
98 $tpl->assign(
'STR_ADMIN_INSTALL_FINISHED_INFOS',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISHED_INFOS']);
99 $tpl->assign(
'STR_ADMIN_INSTALL_FINISHED_INFOS_DELETE_INSTALL',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISHED_INFOS_DELETE_INSTALL']);
100 $tpl->assign(
'STR_ADMIN_INSTALL_FINISHED_INFOS_RENAME_ADMIN',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISHED_INFOS_RENAME_ADMIN']);
101 $tpl->assign(
'STR_ADMIN_INSTALL_FINISHED_INFOS_PHP_ERRORS_DISPLAY',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISHED_INFOS_PHP_ERRORS_DISPLAY']);
102 $tpl->assign(
'STR_ADMIN_INSTALL_FINISHED_INFOS_UTF8_WARNING',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISHED_INFOS_UTF8_WARNING']);
103 $tpl->assign(
'STR_ADMIN_INSTALL_FINISH_BUTTON',
$GLOBALS[
'STR_ADMIN_INSTALL_FINISH_BUTTON']);
106 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
108 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
insere_utilisateur(&$frm, $password_already_encoded=false, $send_user_confirmation=false, $warn_admin_if_template_active=true, $skip_existing_account_tests=false)
Ajout d'un utilisateur.
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
if(!select_db($_SESSION['session_install_choixbase'], $GLOBALS['database_object'], true)) $error
const PEEL_VERSION(version_compare(PHP_VERSION, '5.1.2', '<'))
set_configuration_variable($frm, $update_if_technical_code_exists=false, $allow_create=true)
Ajoute la zone HTML dans la table peel_configuration.
if(empty($_SESSION['session_install_finished'])) $_SESSION['session_install_site_name']