14 define(
'IN_INSTALLATION', 3);
15 include(
"../configuration.inc.php");
19 unset(
$_SESSION[
'session_install_finished']);
21 if (isset($_POST[
'admin_force_ssl']))
$_SESSION[
'session_install_admin_force_ssl'] = $_POST[
'admin_force_ssl'];
22 if (isset($_POST[
'serveur']))
$_SESSION[
'session_install_serveur'] = $_POST[
'serveur'];
23 if (isset($_POST[
'utilisateur']))
$_SESSION[
'session_install_utilisateur'] = $_POST[
'utilisateur'];
24 if (isset($_POST[
'motdepasse']))
$_SESSION[
'session_install_motdepasse'] = $_POST[
'motdepasse'];
25 if (isset($_POST[
'langs']))
$_SESSION[
'session_install_langs'] = $_POST[
'langs'];
26 if (isset($_POST[
'site_name']))
$_SESSION[
'session_install_site_name'] = $_POST[
'site_name'];
27 if (isset($_POST[
'email_webmaster']))
$_SESSION[
'session_install_email_webmaster'] = $_POST[
'email_webmaster'];
29 if ((isset($_POST[
'langs']) && empty($_POST[
'langs'])) || (isset($_POST[
'site_name']) && empty($_POST[
'site_name'])) || (isset($_POST[
'email_webmaster']) && empty($_POST[
'email_webmaster'])) || (isset($_POST[
'serveur']) && empty($_POST[
'serveur'])) || (isset($_POST[
'utilisateur']) && empty($_POST[
'utilisateur']))) {
34 if (isset($_POST[
'wwwroot'])) {
35 while (!empty($_POST[
'wwwroot']) &&
String::substr($_POST[
'wwwroot'], - 1) ==
'/') {
37 $_POST[
'wwwroot'] =
String::substr($_POST[
'wwwroot'], 0, strlen($_POST[
'wwwroot']) - 1);
39 $_SESSION[
'session_install_wwwroot'] = $_POST[
'wwwroot'];
42 if (empty(
$_SESSION[
'session_install_serveur']) || empty(
$_SESSION[
'session_install_utilisateur'])) {
54 if (isset($_GET[
'err']) && $_GET[
'err']) {
55 $error_message .=
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' =>
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_NO_ACCESS']))->fetch();
58 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'installation_choixbase.tpl');
62 $tpl->assign(
'selected_database',
vb(
$_SESSION[
'session_install_choixbase']));
63 $tpl->assign(
'STR_ADMIN_INSTALL_DATABASE_ADVISE_SPECIFIC',
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_ADVISE_SPECIFIC']);
64 $tpl->assign(
'STR_ADMIN_INSTALL_DATABASE_ADVISE_HOW_TO_CREATE',
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_ADVISE_HOW_TO_CREATE']);
65 $tpl->assign(
'STR_ADMIN_INSTALL_DATABASE_SELECT',
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_SELECT']);
66 $tpl->assign(
'STR_ADMIN_INSTALL_DATABASE_PLEASE_CLEAN_BEFORE_INSTALL',
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_PLEASE_CLEAN_BEFORE_INSTALL']);
67 $tpl->assign(
'STR_ADMIN_INSTALL_DATABASE_ADVISE_SPECIFIC',
$GLOBALS[
'STR_ADMIN_INSTALL_DATABASE_ADVISE_SPECIFIC']);
72 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
74 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
& list_dbs($name_part=null)
Renvoie un tableau avec la liste des bases de données accessibles.
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
if(!$GLOBALS['database_object']) $available_databases
if(!defined('IN_PEEL')) db_connect(&$database_object, $database_name=null, $serveur_mysql=null, $utilisateur_mysql=null, $mot_de_passe_mysql=null, $continue_if_error=false)
db_connect()
if(isset($_GET['err'])&&$_GET['err']) $tpl
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']