Skip to content
Permalink
Browse files Browse the repository at this point in the history
config-setup deleted after install ... safety concern
  • Loading branch information
Patriboom committed Feb 20, 2019
1 parent 8a65ec4 commit 9d2d3fc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
44 changes: 27 additions & 17 deletions install/config-setup.php
Expand Up @@ -79,7 +79,7 @@ function ChgLng(Lng = 'en') {
}
//From the freshly made mysql-structure.php file, we'll create tables and default data along the install.php process
require "./install.php";
$install = new install();
$install = new install();
$database_check = $install->check_connect();
$install->config = require '../config.app.php';
$install->create_database($_POST);
Expand Down Expand Up @@ -219,7 +219,16 @@ function ChgLng(Lng = 'en') {
<tr>
<th><?php echo $MyLng['Email_port']; ?></th>
<td>
<input type="text" name="email_port" value="" placeholder="default: 25; gmail: 587" />
<select name="email_port">
<option value="25"> 25 (default)</option>
<option value="587">587 (gmail)</option>
<option value="465">465 (SSL / TLS)</option>
<?php
for ($x=1; $x<999; $x++) {
echo '<option value="'.$x.'">'.$x.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -253,21 +262,22 @@ function ChgLng(Lng = 'en') {
<th><?php echo $MyLng['Time_Timezone']; ?></th>
<td>
<select name="timezone">
<?php
$timezones = timezone_identifiers_list();

echo 'select name="timezone" size="10">' . "\n";

foreach($timezones as $timezone)
{
echo '<option';
echo $timezone == 'Europe/Brussels' ? ' selected' : '';
echo '>' . $timezone . '</option>' . "\n";
}

echo '</select>' . "\n";
?>
</select>
<?php
$timezones = timezone_identifiers_list();

echo 'select name="timezone" size="10">' . "\n";

foreach($timezones as $timezone)
{
echo '<option';
// echo $timezone == 'Europe/Brussels' ? ' selected' : '';
echo $timezone == date("e") ? ' selected' : '';
echo '>' . $timezone . '</option>' . "\n";
}

echo '</select>' . "\n";
?>
</select>
</td>
</tr>
<tr>
Expand Down
13 changes: 11 additions & 2 deletions install/index.php
Expand Up @@ -3,7 +3,15 @@
$EnLng = require_once("../app/application/language/en/install.php");
if (!isset($_GET["Lng"]) || !file_exists("../app/application/language/".@$_GET["Lng"]."/install.php")) { $_GET["Lng"] = 'en'; }
if (@$_GET["Lng"] != 'en' ) { $MyLng = require_once("../app/application/language/".$_GET["Lng"]."/install.php"); $MyLng = array_merge($EnLng, $MyLng); } else {$MyLng = $EnLng; }
require './config-setup.php';
if (!file_exists('./config-setup.php')) {
echo '<script>';
echo 'alert("Install already has been proceessed");';
echo 'document.location.href="../index.php";';
echo '</script>';
die();
} else {
require './config-setup.php';
}
require '../app/laravel/hash.php';
require '../app/laravel/str.php';

Expand All @@ -30,7 +38,8 @@
$_SESSION["Msg"] .= '<p style="color: #060;">'.$MyLng['Complete_presentation'].'</p>';
$_SESSION["usr"] = $_POST['email'];
$_SESSION["psw"] = $_POST['password'];
//header('location: complete.php?Lng=fr');
//header('location: complete.php?Lng=fr');
unlink ("./config-setup.php");
header('location: ../');
die();
}
Expand Down

0 comments on commit 9d2d3fc

Please sign in to comment.