Inital commit
This commit is contained in:
34
web/!install!/I18n/en_US.php
Normal file
34
web/!install!/I18n/en_US.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'Administrator login :' => 'Administrator login :',
|
||||
'Administrator password :' => 'Administrator password :',
|
||||
'Administrator password verification :' => 'Administrator password verification :',
|
||||
'Checking permissions' => 'Checking permissions',
|
||||
'Choose your database' => 'Choose your database',
|
||||
'Company name :' => 'Company name :',
|
||||
'Contact email :' => 'Contact email :',
|
||||
'Continue' => 'Continue',
|
||||
'Create an other database' => 'Create an other database',
|
||||
'Database connection' => 'Database connection',
|
||||
'Database selection' => 'Database selection',
|
||||
'Don\'t forget to delete the web/install directory.' => 'Don\'t forget to delete the web/install directory.',
|
||||
'General information' => 'General information',
|
||||
'Go to back office' => 'Go to back office',
|
||||
'Host :' => 'Host :',
|
||||
'or' => 'or',
|
||||
'Password :' => 'Password :',
|
||||
'Port :' => 'Port :',
|
||||
'Select below the one you want to use.' => 'Select below the one you want to use.',
|
||||
'Thanks' => 'Thanks',
|
||||
'Thanks, you have installed Thelia' => 'Thanks, you have installed Thelia',
|
||||
'Thelia installation wizard' => 'Thelia installation wizard',
|
||||
'The SQL server contains multiple databases.' => 'The SQL server contains multiple databases.',
|
||||
'Username :' => 'Username :',
|
||||
'Version undefined' => 'Version undefined',
|
||||
'website url :' => 'website url :',
|
||||
'Welcome' => 'Welcome',
|
||||
'Welcome in the Thelia installation wizard.' => 'Welcome in the Thelia installation wizard.',
|
||||
'We will guide you throughout this process to install any application on your system.' => 'We will guide you throughout this process to install any application on your system.',
|
||||
'Wrong connection information' => 'Wrong connection information'
|
||||
);
|
||||
35
web/!install!/I18n/fr_FR.php
Normal file
35
web/!install!/I18n/fr_FR.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'Administrator login :' => 'Identifiant administrateur :',
|
||||
'Administrator password :' => 'Mot de passe administrateur :',
|
||||
'Administrator password verification :' => 'Vérification mot de passe administrateur :',
|
||||
'Checking permissions' => 'Permissions',
|
||||
'Choose your database' => 'Choissisez la base de donnée',
|
||||
'Company name :' => 'Nom de la société :',
|
||||
'Contact email :' => 'Email de contact :',
|
||||
'Continue' => 'Continuez',
|
||||
'Create an other database' => 'Créez une nouvelle base de donnée',
|
||||
'Database connection' => 'Base de donnée',
|
||||
'Database selection' => 'Sélectionnez la base de donnée',
|
||||
'Don\'t forget to delete the web/install directory.' => 'N\'oubliez d\'enlever le répertoire web/install.',
|
||||
'General information' => 'Information générale',
|
||||
'Go to back office' => 'Allez dans l\'interface d\'administration',
|
||||
'Host :' => 'Hôte :',
|
||||
'or' => 'ou',
|
||||
'Password :' => 'Mot de passe :',
|
||||
'Port :' => 'Port :',
|
||||
'Select below the one you want to use.' => 'Sélectionnez ci-dessous celle que vous souhaitez utiliser.',
|
||||
'Thanks' => 'Merci',
|
||||
'Thanks, you have installed Thelia' => 'Merci, d\'avoir installé Thélia',
|
||||
'Thelia installation wizard' => 'Gestionnaire d\'installation de Thélia',
|
||||
'The SQL server contains multiple databases.' => 'Le serveur SQL contient plusieurs databases.',
|
||||
'Username :' => 'Utilisateur :',
|
||||
'Version undefined' => 'Version non définie',
|
||||
'website url :' => 'Url du site :',
|
||||
'Welcome' => 'Bienvenue',
|
||||
'Welcome in the Thelia installation wizard.' => 'Bienvenue dans le gestionnaire d\'installation de Thélia.',
|
||||
'We will guide you throughout this process to install any application on your system.' => 'Nous allons vous guidez pour installer Thélia sur votre système.',
|
||||
'Wrong connection information' => 'Mauvaise information de connexion',
|
||||
'Administrator preferred locale :' => 'Langue par défaut de l\'adminisrateur'
|
||||
);
|
||||
124
web/!install!/bdd.php
Normal file
124
web/!install!/bdd.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
$step=4;
|
||||
include("header.php");
|
||||
|
||||
if (isset($_POST['host']) && isset($_POST['username']) && isset($_POST['password']) && isset($_POST['port'])){
|
||||
|
||||
$_SESSION['install']['host'] = $_POST['host'];
|
||||
$_SESSION['install']['username'] = $_POST['username'];
|
||||
$_SESSION['install']['password'] = $_POST['password'];
|
||||
$_SESSION['install']['port'] = $_POST['port'];
|
||||
|
||||
$checkConnection = new \Thelia\Install\CheckDatabaseConnection($_POST['host'], $_POST['username'], $_POST['password'], $_POST['port']);
|
||||
if(!$checkConnection->exec()) {
|
||||
header('location: connection.php?err=1');
|
||||
exit;
|
||||
}
|
||||
$databases = $checkConnection->getConnection()->query('SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA');
|
||||
|
||||
if(false === $databases){
|
||||
header('location: connection.php?err=1');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
elseif($_SESSION['install']['step'] >=3) {
|
||||
|
||||
$checkConnection = new \Thelia\Install\CheckDatabaseConnection($_SESSION['install']['host'], $_SESSION['install']['username'], $_SESSION['install']['password'], $_SESSION['install']['port']);
|
||||
}
|
||||
else {
|
||||
header('location: connection.php?err=1');
|
||||
exit;
|
||||
}
|
||||
$_SESSION['install']['step'] = 4;
|
||||
$connection = $checkConnection->getConnection();
|
||||
|
||||
?>
|
||||
<div class="well">
|
||||
<form action="config.php" method="post">
|
||||
<fieldset>
|
||||
<legend><?php echo $trans->trans('Choose your database'); ?></legend>
|
||||
<p>
|
||||
<?php echo $trans->trans('The SQL server contains multiple databases.'); ?><br/>
|
||||
<?php echo $trans->trans('Select below the one you want to use.'); ?>
|
||||
</p>
|
||||
<?php foreach($databases as $database): ?>
|
||||
<?php if ($database['SCHEMA_NAME'] == 'information_schema') continue; ?>
|
||||
<?php
|
||||
$connection->exec(sprintf('use %s', $database['SCHEMA_NAME']));
|
||||
|
||||
$tables = $connection->query('SHOW TABLES');
|
||||
|
||||
$found = false;
|
||||
foreach($tables as $table) {
|
||||
if($table[0] == 'cart_item') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="radio">
|
||||
<label for="database_<?php echo $database['SCHEMA_NAME']; ?>">
|
||||
<input type="radio" name="database" id="database_<?php echo $database['SCHEMA_NAME']; ?>" value="<?php echo $database['SCHEMA_NAME']; ?>" <?php if($found){ echo "disabled"; } ?>>
|
||||
<?php echo $database['SCHEMA_NAME']; ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
$connection->exec('use information_schema');
|
||||
|
||||
$permissions = $connection->query("SELECT COUNT( * ) FROM `USER_PRIVILEGES`
|
||||
WHERE PRIVILEGE_TYPE = 'CREATE'
|
||||
AND GRANTEE LIKE '%".$_SESSION['install']['username']."%'
|
||||
AND IS_GRANTABLE = 'YES';");
|
||||
|
||||
$writePermission = false;
|
||||
if($permissions->fetchColumn(0) > 0) {
|
||||
?>
|
||||
<p>
|
||||
<?php echo $trans->trans('or'); ?>
|
||||
</p>
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<?php echo $trans->trans('Create an other database'); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" name="database_create" class="form-control">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<div class="clearfix">
|
||||
<div class="control-btn">
|
||||
<button type="submit" class="pull-right btn btn-default btn-primary"><?php echo $trans->trans('Continue'); ?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include 'footer.php'; ?>
|
||||
27
web/!install!/bootstrap.php
Normal file
27
web/!install!/bootstrap.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
define('THELIA_INSTALL_MODE', true);
|
||||
include __DIR__ . "/../../core/bootstrap.php";
|
||||
|
||||
$thelia = new \Thelia\Core\Thelia("install", true);
|
||||
$thelia->boot();
|
||||
125
web/!install!/config.php
Normal file
125
web/!install!/config.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
$step = 5;
|
||||
include("header.php");
|
||||
global $thelia;
|
||||
$err = isset($_GET['err']) && $_GET['err'];
|
||||
|
||||
if (!$err && $_SESSION['install']['step'] != $step) {
|
||||
$checkConnection = new \Thelia\Install\CheckDatabaseConnection($_SESSION['install']['host'], $_SESSION['install']['username'], $_SESSION['install']['password'], $_SESSION['install']['port']);
|
||||
$connection = $checkConnection->getConnection();
|
||||
$connection->exec("SET NAMES UTF8");
|
||||
$database = new \Thelia\Install\Database($connection);
|
||||
|
||||
if (isset($_POST['database'])) {
|
||||
$_SESSION['install']['database'] = $_POST['database'];
|
||||
}
|
||||
|
||||
if (isset($_POST['database_create']) && $_POST['database_create'] != "") {
|
||||
$_SESSION['install']['database'] = $_POST['database_create'];
|
||||
$database->createDatabase($_SESSION['install']['database']);
|
||||
}
|
||||
|
||||
$database->insertSql($_SESSION['install']['database']);
|
||||
|
||||
if(!file_exists(THELIA_ROOT . "/local/config/database.yml")) {
|
||||
$fs = new \Symfony\Component\Filesystem\Filesystem();
|
||||
|
||||
$sampleConfigFile = THELIA_ROOT . "/local/config/database.yml.sample";
|
||||
$configFile = THELIA_ROOT . "/local/config/database.yml";
|
||||
|
||||
$fs->copy($sampleConfigFile, $configFile, true);
|
||||
|
||||
$configContent = file_get_contents($configFile);
|
||||
|
||||
$configContent = str_replace("%DRIVER%", "mysql", $configContent);
|
||||
$configContent = str_replace("%USERNAME%", $_SESSION['install']['username'], $configContent);
|
||||
$configContent = str_replace("%PASSWORD%", $_SESSION['install']['password'], $configContent);
|
||||
$configContent = str_replace(
|
||||
"%DSN%",
|
||||
sprintf("mysql:host=%s;dbname=%s;port=%s", $_SESSION['install']['host'], $_SESSION['install']['database'], $_SESSION['install']['port']),
|
||||
$configContent
|
||||
);
|
||||
|
||||
file_put_contents($configFile, $configContent);
|
||||
|
||||
// FA - no, as no further install will be possible
|
||||
// $fs->remove($sampleConfigFile);
|
||||
|
||||
$fs->remove($thelia->getContainer()->getParameter("kernel.cache_dir"));
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['install']['step'] = $step;
|
||||
|
||||
// Retrieve the website url
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||
|
||||
?>
|
||||
<form action="end.php" method="POST" >
|
||||
<div class="well">
|
||||
<div class="form-group">
|
||||
<label for="admin_login"><?php echo $trans->trans('Administrator login :'); ?></label>
|
||||
<input id="admin_login" class="form-control" type="text" name="admin_login" placeholder="admin" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin_password"><?php echo $trans->trans('Administrator password :'); ?></label>
|
||||
<input id="admin_password" class="form-control" type="password" name="admin_password" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin_password_verif"><?php echo $trans->trans('Administrator password verification :'); ?></label>
|
||||
<input id="admin_password_verif" class="form-control" type="password" name="admin_password_verif" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin_locale"><?php echo $trans->trans('Administrator preferred locale :'); ?></label>
|
||||
<select id="admin_locale" name="admin_locale" class="form-control" required>
|
||||
<option value="en_US">English</option>
|
||||
<option value="fr_FR">Français</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email_contact"><?php echo $trans->trans('Contact email :'); ?></label>
|
||||
<input id="email_contact" class="form-control" type="text" name="store_email" placeholder="foo@bar.com" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="site_name"><?php echo $trans->trans('Company name :'); ?></label>
|
||||
<input id="site_name" class="form-control" type="text" name="store_name" placeholder="" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="site_name"><?php echo $trans->trans('website url :'); ?></label>
|
||||
<input id="site_name" class="form-control" type="text" name="url_site" placeholder="" value="http://<?php echo $_SERVER['SERVER_NAME'].$website_url; ?>" required>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="control-btn">
|
||||
<button type="submit" class="pull-right btn btn-default btn-primary"><?php echo $trans->trans('Continue'); ?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php include('footer.php'); ?>
|
||||
|
||||
67
web/!install!/connection.php
Normal file
67
web/!install!/connection.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
$step = 3;
|
||||
include("header.php");
|
||||
if(!$_SESSION['install']['continue'] && $_SESSION['install']['step'] == 2) {
|
||||
header(sprintf('location: %s', $_SESSION['install']['return_step']));
|
||||
}
|
||||
|
||||
$_SESSION['install']['step'] = 3;
|
||||
?>
|
||||
|
||||
<form action="bdd.php" method="POST" >
|
||||
<?php if(isset($_GET['err']) && $_GET['err'] == 1){ ?>
|
||||
<div class="alert alert-danger"><?php echo $trans->trans('Wrong connection information'); ?></div>
|
||||
<?php } ?>
|
||||
<div class="well">
|
||||
<div class="form-group">
|
||||
<label for="host"><?php echo $trans->trans('Host :'); ?></label>
|
||||
<input id="host" class="form-control" type="text" name="host" placeholder="localhost" value="<?php if(isset($_SESSION['install']['host'])){ echo $_SESSION['install']['host']; } ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="user"><?php echo $trans->trans('Username :'); ?></label>
|
||||
<input id="user" type="text" class="form-control" name="username" placeholder="john" value="<?php if(isset($_SESSION['install']['username'])){ echo $_SESSION['install']['username']; } ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password"><?php echo $trans->trans('Password :'); ?></label>
|
||||
<input id="password" type="password" class="form-control" name="password" placeholder="l33t 5p34k" >
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="port"><?php echo $trans->trans('Port :'); ?></label>
|
||||
<input id="port" type="text" class="form-control" name="port" value="<?php if(isset($_SESSION['install']['port'])){ echo $_SESSION['install']['port']; } else { echo '3306'; } ?>">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="control-btn">
|
||||
<button type="submit" class="pull-right btn btn-default btn-primary"><?php echo $trans->trans('Continue'); ?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
82
web/!install!/end.php
Normal file
82
web/!install!/end.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
$step=6;
|
||||
include "header.php";
|
||||
|
||||
if($_SESSION['install']['step'] != $step && (empty($_POST['admin_login']) || empty($_POST['admin_password']) || ($_POST['admin_password'] != $_POST['admin_password_verif']))) {
|
||||
header('location: config.php?err=1');
|
||||
}
|
||||
|
||||
if($_SESSION['install']['step'] == 5) {
|
||||
$admin = new \Thelia\Model\Admin();
|
||||
$admin->setLogin($_POST['admin_login'])
|
||||
->setPassword($_POST['admin_password'])
|
||||
->setFirstname('admin')
|
||||
->setLastname('admin')
|
||||
->setLocale(empty($_POST['admin_locale']) ? 'en_US' : $_POST['admin_locale'])
|
||||
->save();
|
||||
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('store_email')
|
||||
->update(array('Value' => $_POST['store_email']));
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('store_name')
|
||||
->update(array('Value' => $_POST['store_name']));
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('url_site')
|
||||
->update(array('Value' => $_POST['url_site']));
|
||||
}
|
||||
|
||||
//clean up cache directories
|
||||
$fs = new \Symfony\Component\Filesystem\Filesystem();
|
||||
|
||||
$fs->remove(THELIA_ROOT . '/cache/prod');
|
||||
$fs->remove(THELIA_ROOT . '/cache/dev');
|
||||
|
||||
|
||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||
$_SESSION['install']['step'] = $step;
|
||||
|
||||
// Retrieve the website url
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||
|
||||
?>
|
||||
|
||||
<div class="well">
|
||||
<p class="lead text-center">
|
||||
<?php echo $trans->trans('Thanks, you have installed Thelia'); ?>
|
||||
</p>
|
||||
<p class="lead text-center">
|
||||
<?php echo $trans->trans('Don\'t forget to delete the web/install directory.'); ?>
|
||||
</p>
|
||||
|
||||
<p class="lead text-center">
|
||||
<a href="<?php echo $request->getSchemeAndHttpHost().$website_url; ?>/admin"><?php echo $trans->trans('Go to back office'); ?></a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<?php include "footer.php"; ?>
|
||||
BIN
web/!install!/fd33fd0-6fda040.ico
Normal file
BIN
web/!install!/fd33fd0-6fda040.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
41
web/!install!/footer.php
Normal file
41
web/!install!/footer.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p>© Thelia 2013
|
||||
- <a href="http://www.openstudio.fr/" target="_blank">Édité par OpenStudio</a>
|
||||
- <a href="http://forum.thelia.net/" target="_blank">Forum Thelia</a>
|
||||
- <a href="http://contrib.thelia.net/" target="_blank">Contributions Thelia</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
78
web/!install!/header.php
Normal file
78
web/!install!/header.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
session_start();
|
||||
include 'bootstrap.php';
|
||||
|
||||
use Symfony\Component\Translation\Translator;
|
||||
|
||||
$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : null;
|
||||
|
||||
if($lang){
|
||||
$_SESSION['install']['lang'] = $_REQUEST['lang'];
|
||||
}
|
||||
elseif(!$lang && !isset($_SESSION['install']['lang'])){
|
||||
$_SESSION['install']['lang'] = "en_US";
|
||||
}
|
||||
|
||||
$trans = new Translator($_SESSION['install']['lang']);
|
||||
$trans->addLoader("php", new Symfony\Component\Translation\Loader\PhpFileLoader());
|
||||
$trans->addResource('php', __DIR__.'/I18n/'.$_SESSION['install']['lang'].'.php', $_SESSION['install']['lang']);
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<title>Installation</title>
|
||||
<link rel="shortcut icon" href="fd33fd0-6fda040.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="topbar">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="version-info"><?php echo $trans->trans('Version undefined'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="install">
|
||||
<div id="wrapper" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<h3 class="title title-without-tabs"><?php echo $trans->trans('Thelia installation wizard'); ?></h3>
|
||||
<div class="wizard">
|
||||
<ul>
|
||||
<li class="<?php if($step == 1){ echo 'active'; } elseif ($step > 1) { echo 'complete'; }?>"><span class="badge">1</span><?php echo $trans->trans('Welcome'); ?><span class="chevron"></span></li>
|
||||
<li class="<?php if($step == 2){ echo 'active'; } elseif ($step > 2) { echo 'complete'; }?>"><span class="badge">2</span><?php echo $trans->trans('Checking permissions'); ?><span class="chevron"></span></li>
|
||||
<li class="<?php if($step == 3){ echo 'active'; } elseif ($step > 3) { echo 'complete'; }?>"><span class="badge">3</span><?php echo $trans->trans('Database connection'); ?><span class="chevron"></span></li>
|
||||
<li class="<?php if($step == 4){ echo 'active'; } elseif ($step > 4) { echo 'complete'; }?>"><span class="badge">4</span><?php echo $trans->trans('Database selection'); ?><span class="chevron"></span></li>
|
||||
<li class="<?php if($step == 5){ echo 'active'; } elseif ($step > 5) { echo 'complete'; }?>"><span class="badge">5</span><?php echo $trans->trans('General information'); ?><span class="chevron"></span></li>
|
||||
<li class="<?php if($step == 6){ echo 'active'; } elseif ($step > 6) { echo 'complete'; }?>"><span class="badge">6</span><?php echo $trans->trans('Thanks'); ?><span class="chevron"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
44
web/!install!/index.php
Normal file
44
web/!install!/index.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
?>
|
||||
<?php
|
||||
$step = 1;
|
||||
include("header.php");
|
||||
?>
|
||||
<div class="well">
|
||||
<div class="clearfix">
|
||||
<a href="?lang=fr_FR"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $trans->trans('French'); ?></a>
|
||||
<a href="?lang=en_US"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $trans->trans('English'); ?></a>
|
||||
</div>
|
||||
|
||||
<p class="lead text-center">
|
||||
<?php echo $trans->trans('Welcome in the Thelia installation wizard.'); ?>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<?php echo $trans->trans('We will guide you throughout this process to install any application on your system.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<a href="permission.php" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $trans->trans('Continue'); ?></a>
|
||||
</div>
|
||||
<?php include("footer.php"); ?>
|
||||
56
web/!install!/permission.php
Normal file
56
web/!install!/permission.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
?>
|
||||
<?php
|
||||
$step = 2;
|
||||
include("header.php");
|
||||
global $thelia;
|
||||
|
||||
$checkPermission = new \Thelia\Install\CheckPermission(true, $thelia->getContainer()->get('thelia.translator'));
|
||||
$isValid = $checkPermission->exec();
|
||||
$validationMessage = $checkPermission->getValidationMessages();
|
||||
$_SESSION['install']['return_step'] = 'permission.php';
|
||||
$_SESSION['install']['continue'] = $isValid;
|
||||
$_SESSION['install']['current_step'] = 'permission.php';
|
||||
$_SESSION['install']['step'] = 2;
|
||||
?>
|
||||
<div class="well">
|
||||
<p><?php echo $trans->trans('Checking permissions'); ?></p>
|
||||
<ul class="list-unstyled list-group">
|
||||
<?php foreach($validationMessage as $item => $data): ?>
|
||||
<li class="list-group-item <?php if ($data['status']) {echo 'text-success';} else { echo 'text-danger';} ?>">
|
||||
<?php echo $data['text']; ?>
|
||||
<?php if (!$data['status']) { echo $data['hint']; } ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<?php if($isValid){ ?>
|
||||
<a href="connection.php" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $trans->trans('Continue'); ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="permission.php" class="pull-right btn btn-default btn-danger"><span class="glyphicon glyphicon-refresh"></span> refresh</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php include("footer.php"); ?>
|
||||
1999
web/!install!/script.js
Normal file
1999
web/!install!/script.js
Normal file
File diff suppressed because it is too large
Load Diff
7535
web/!install!/styles.css
Normal file
7535
web/!install!/styles.css
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user