From 66076a50f5ab6e0fc8923f85bebed0c73857ba9f Mon Sep 17 00:00:00 2001 From: DNA-styx <154759339+DNA-styx@users.noreply.github.com> Date: Sun, 15 Dec 2024 17:45:07 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=20ingame=20pages=20not?= =?UTF-8?q?=20showing=20Weapon=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web/pages/ingame/targets.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/web/pages/ingame/targets.php b/src/web/pages/ingame/targets.php index 29d3b8fe..8012d2c4 100644 --- a/src/web/pages/ingame/targets.php +++ b/src/web/pages/ingame/targets.php @@ -111,12 +111,30 @@ list($gamename) = $db->fetch_row(); } + // Get Weapon Name + $result = $db->query + (" + SELECT + hlstats_Weapons.code, + hlstats_Weapons.name + FROM + hlstats_Weapons + WHERE + hlstats_Weapons.game = '$game' + "); + while ($rowdata = $db->fetch_row($result)) + { + $code = $rowdata[0]; + $fname[strToLower($code)] = $rowdata[1]; + } + $tblWeaponstats2 = new Table( array( new TableColumn( 'smweapon', 'Weapon', - 'width=10&type=weaponimg&align=center&link=' . urlencode("mode=weaponinfo&weapon=%k&game=$game") + 'width=10&type=weaponimg&align=center&link=' . urlencode("mode=weaponinfo&weapon=%k&game=$game"), + $fname ), new TableColumn( 'smhits',