diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php index 68dd7081..5ec18d8d 100644 --- a/admin/pages/accounts.php +++ b/admin/pages/accounts.php @@ -272,7 +272,7 @@ else if (isset($_REQUEST['search'])) { hasTable('store_history')) : ?> + if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) : ?> @@ -523,7 +523,7 @@ else if (isset($_REQUEST['search'])) { } ?> hasTable('store_history')) { ?> + if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) { ?>
query('SELECT * FROM `store_history` WHERE `account_id` = "' . $account->getId() . '" ORDER BY `time` DESC')->fetchAll(); ?> diff --git a/system/pages/bans.php b/system/pages/bans.php index 48e5fdc1..f862183b 100644 --- a/system/pages/bans.php +++ b/system/pages/bans.php @@ -50,7 +50,8 @@ if(!$bansQuery->rowCount()) $nextPage = false; $i = 0; -$bans = $bansQuery->fetchAll(); +$bans = $bansQuery->fetchAll(PDO::FETCH_ASSOC); + foreach ($bans as $id => &$ban) { if(++$i > $configBansPerPage) @@ -69,11 +70,22 @@ foreach ($bans as $id => &$ban) $accountId = $ban['account_id']; } - $ban['player'] = getPlayerLink(getPlayerNameByAccount($accountId)); - + $playerName = 'Unknown'; if ($configBans['hasType']) { $ban['type'] = getBanType($ban['type']); + + if ($ban['type'] == 2) { // namelock + $playerName = getPlayerNameById($accountId); + } + else { + $playerName = getPlayerNameByAccount($accountId); + } } + else { + $playerName = getPlayerNameByAccount($accountId); + } + + $ban['player'] = getPlayerLink($playerName); $expiresColumn = 'expires_at'; if ($db->hasColumn('bans', 'expires')) { @@ -104,7 +116,7 @@ foreach ($bans as $id => &$ban) } } else { - $addedBy = getPlayerLink(getPlayerNameByAccount($ban['banned_by'])); + $addedBy = getPlayerLink(getPlayerNameById($ban['banned_by'])); } if ($db->hasColumn('bans', 'added')) {