myaac/install/steps/1-welcome.php
Fernando Matos 6f42a60e59
Add a brand new charming installation (for version 0.9) (#144)
* Add a brand new charming installation

* Fix alert position in setup requirements validation

* Add some missing definitions

* A distinction between bootstrap CSS classes and myaac classes

For CSS-styled messages

* Remove unused functions for messages

Co-authored-by: slawkens <slawkens@gmail.com>
2020-12-22 07:47:47 +01:00

30 lines
884 B
PHP

<?php
defined('MYAAC') or die('Direct access not allowed!');
if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['saved'])) {
echo '<div class="alert alert-warning"><span>' . $locale['already_installed'] . '</span></div>';
}
else {
unset($_SESSION['saved']);
$locales = array();
foreach(get_locales() as $tmp_locale)
{
$lang_file_main = LOCALE . $tmp_locale . '/main.php';
$lang_file_install = LOCALE . $tmp_locale . '/install.php';
if(@file_exists($lang_file_main)
&& @file_exists($lang_file_install))
{
require $lang_file_main;
$locales[] = array('id' => $tmp_locale, 'name' => $locale['name']);
}
}
$twig->display('install.welcome.html.twig', array(
'locales' => $locales,
'locale' => $locale,
'cookie_locale' => @$_COOKIE['locale'],
'detected_locale' => @$detected_locale,
'buttons' => next_buttons(false, true)
));
}