Adds login and registration messages and configs
parent
06ffde67f4
commit
5d240b1dd8
|
@ -5,6 +5,8 @@ $config = [
|
||||||
'folder' => '/jilo-web/',
|
'folder' => '/jilo-web/',
|
||||||
'database' => '/home/yasen/work/code/git/lindeas-code/jilo-web/jilo-web.db',
|
'database' => '/home/yasen/work/code/git/lindeas-code/jilo-web/jilo-web.db',
|
||||||
'jilo_database' => '/home/yasen/work/code/git/lindeas-code/jilo/jilo.db',
|
'jilo_database' => '/home/yasen/work/code/git/lindeas-code/jilo/jilo.db',
|
||||||
|
'registration_enabled' => true,
|
||||||
|
'login_message' => '',
|
||||||
'version' => '0.1.1',
|
'version' => '0.1.1',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,11 @@ try {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($config['login_message'])) {
|
||||||
|
$notice = $config['login_message'];
|
||||||
|
include 'templates/block-message.php';
|
||||||
|
}
|
||||||
|
|
||||||
include 'templates/form-login.php';
|
include 'templates/form-login.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// registration is allowed, go on
|
||||||
|
if ($config['registration_enabled'] === true) {
|
||||||
|
|
||||||
require_once 'classes/database.php';
|
require_once 'classes/database.php';
|
||||||
require 'classes/user.php';
|
require 'classes/user.php';
|
||||||
unset($error);
|
unset($error);
|
||||||
|
@ -31,4 +34,10 @@ try {
|
||||||
include 'templates/block-message.php';
|
include 'templates/block-message.php';
|
||||||
include 'templates/form-register.php';
|
include 'templates/form-register.php';
|
||||||
|
|
||||||
|
// registration disabled
|
||||||
|
} else {
|
||||||
|
$notice = 'Registration is disabled';
|
||||||
|
include 'templates/block-message.php';
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue