PHP8 fix and folder not found fix

pull/1218/head
Andreas 2021-10-09 15:25:10 +02:00
rodzic 234ec52f1b
commit 99379ec213
3 zmienionych plików z 21 dodań i 11 usunięć

Wyświetl plik

@ -30,10 +30,16 @@
<select class="custom-select" name="user_type"> <select class="custom-select" name="user_type">
<?php <?php
$levels = $this->config->item('auth_level'); $levels = $this->config->item('auth_level');
while (list($key, $val) = each($levels)) { foreach ($levels as $key => $value) {
?> echo '<option value="'. $key . '"';
<option value="<?php echo $key; ?>" <?php if(isset($user_type)) { if($user_type == $key) { echo "selected=\"selected\""; } } ?>><?php echo $val; ?></option> if(isset($user_type)) {
<?php } ?> if($user_type == $key) {
echo "selected=\"selected\"";
}
}
echo '>' . $value . '</option>';
}
?>
</select> </select>
</div> </div>

Wyświetl plik

@ -71,10 +71,14 @@
<select class="custom-select" name="user_type"> <select class="custom-select" name="user_type">
<?php <?php
$levels = $this->config->item('auth_level'); $levels = $this->config->item('auth_level');
while (list($key, $val) = each($levels)) { foreach ($levels as $key => $value) {
?> echo '<option value="'. $key . '"';
<option value="<?php echo $key; ?>" <?php if($user_type == $key) { echo "selected=\"selected\""; } ?>><?php echo $val; ?></option> if($user_type == $key) {
<?php } ?> echo "selected=\"selected\"";
}
echo '>' . $value . '</option>';
}
?>
</select> </select>
<?php } else { <?php } else {
$l = $this->config->item('auth_level'); $l = $this->config->item('auth_level');

Wyświetl plik

@ -26,7 +26,7 @@ class Core {
} }
if($data['directory'] != "") { if($data['directory'] != "") {
if (file_exists("../".$data['directory'])) { if (file_exists($_SERVER['DOCUMENT_ROOT'].$data['directory'])) {
//pass folders real //pass folders real
$counter++; $counter++;
} else { } else {
@ -56,7 +56,7 @@ class Core {
// Config path // Config path
$template_path = 'config/database.php'; $template_path = 'config/database.php';
$output_path = '../application/config/database.php'; $output_path = $_SERVER['DOCUMENT_ROOT'].$data['directory'].'/application/config/database.php';
// Open the file // Open the file
$database_file = file_get_contents($template_path); $database_file = file_get_contents($template_path);
@ -92,7 +92,7 @@ class Core {
// Config path // Config path
$template_path = 'config/config.php'; $template_path = 'config/config.php';
$output_path = '../application/config/config.php'; $output_path = $_SERVER['DOCUMENT_ROOT'].$data['directory'].'/application/config/config.php';
// Open the file // Open the file
$database_file = file_get_contents($template_path); $database_file = file_get_contents($template_path);