0
0

Moved all configurations away from $GLOBALS to independent variables

This commit is contained in:
Bryan Pedini
2019-07-18 11:38:03 +02:00
parent f2a56c2abc
commit 68884270f3
9 changed files with 44 additions and 44 deletions

View File

@@ -1,9 +1,9 @@
<?php
if ( isset ( $_SESSION [ 'user_id' ] ) ) {
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/dashboard" );
header ( "Location: " . $config [ 'installation_path' ] . "/dashboard" );
exit;
}
if ( isset ( $GLOBALS [ 'request_uri' ] [ 1 ] ) && $GLOBALS [ 'request_uri' ] [ 1 ] == "forgot" ) {
if ( isset ( $request_uri [ 1 ] ) && $request_uri [ 1 ] == "forgot" ) {
include ( 'lib/php/forgot.php' );
exit;
}
@@ -51,10 +51,10 @@
<html>
<head>
<title>Login | <?=$GLOBALS['config']['website_name']?></title>
<title>Login | <?=$config['website_name']?></title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
<link href="<?=$GLOBALS['config']['installation_path']?>/lib/css/login.css" rel="stylesheet">
<link href="<?=$GLOBALS['config']['installation_path']?>/favicon.ico" rel="icon" type="image/x-icon">
<link href="<?=$config['installation_path']?>/lib/css/login.css" rel="stylesheet">
<link href="<?=$config['installation_path']?>/favicon.ico" rel="icon" type="image/x-icon">
</head>
<body>
@@ -71,7 +71,7 @@
</div>
<div class="form-group">
<input type="button" class="col-md-6 btnSubmit" value="Login" onclick="login()" />
<input type="button" class="col-md-6 btnForget" value="Forgot Password?" onclick="window.location.href='<?=$GLOBALS['config']['installation_path']."/login/forgot"?>'">
<input type="button" class="col-md-6 btnForget" value="Forgot Password?" onclick="window.location.href='<?=$config['installation_path']."/login/forgot"?>'">
</div>
<div class="form-group">
<div id="login-response" class="login-response"></div>
@@ -81,10 +81,10 @@
</div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/sha512.min.js"></script>
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/login.js"></script>
<script src="<?=$config['installation_path']?>/lib/js/sha512.min.js"></script>
<script src="<?=$config['installation_path']?>/lib/js/login.js"></script>
<script>
var script_name = "<?=$GLOBALS['config']['installation_path']?>/dashboard";
var script_name = "<?=$config['installation_path']?>/dashboard";
</script>
</body>