Small Fixes

This commit is contained in:
Timon Ostertun
2020-09-22 23:39:25 +02:00
parent 0079d72818
commit 7dafe9777c
2 changed files with 7 additions and 5 deletions

View File

@@ -8,7 +8,7 @@
const QUERY_URL = '<?php echo SERVER_ADDR; ?>/api/'; const QUERY_URL = '<?php echo SERVER_ADDR; ?>/api/';
const BOATCLASS = '<?php echo BOATCLASS; ?>'; const BOATCLASS = '<?php echo BOATCLASS; ?>';
const LINK_PRE = '<?php echo LINK_PRE; ?>'; const LINK_PRE = '<?php echo SERVER_ADDR; ?>/';
var randomId = function() { return '_' + Math.random().toString(36).substr(2, 9); } var randomId = function() { return '_' + Math.random().toString(36).substr(2, 9); }
@@ -225,11 +225,13 @@ var initRegatten = function() {
initDatabase(); initDatabase();
if (isLoggedIn) { if (isLoggedIn()) {
$('.show-notloggedin').css('display', 'none'); $('.show-loggedin').show();
$('.show-notloggedin').hide();
$('.replace-userid-href').attr('href', $('.replace-userid-href').attr('href').replace('%USERID%', USER_ID)); $('.replace-userid-href').attr('href', $('.replace-userid-href').attr('href').replace('%USERID%', USER_ID));
$('.replace-username').html(USER_NAME); $('.replace-username').html(USER_NAME);
} else { } else {
$('.show-loggedin').css('display', 'none'); $('.show-loggedin').hide();
$('.show-notloggedin').show();
} }
} }

View File

@@ -21,7 +21,7 @@
$site = 'index'; $site = 'index';
} }
define('LINK_PRE', SERVER_ADDR . '/');; define('LINK_PRE', SERVER_ADDR . '/');
if (!file_exists(__DIR__ . '/content/' . $site . '.php')) { if (!file_exists(__DIR__ . '/content/' . $site . '.php')) {
$site = '404'; $site = '404';