Skip to content

Commit

Permalink
🐞 fix: ingame pages not showing Weapon names
Browse files Browse the repository at this point in the history
  • Loading branch information
DNA-styx committed Dec 15, 2024
1 parent c6b2ab7 commit 66076a5
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/web/pages/ingame/targets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 66076a5

Please sign in to comment.