From 045d38061758f1b325983ac6fc95420aae6d5f89 Mon Sep 17 00:00:00 2001 From: DNA-styx <154759339+DNA-styx@users.noreply.github.com> Date: Sat, 7 Dec 2024 01:23:35 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Start=20theming=20#22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/pages/ingame/accuracy.php | 1 + web/pages/ingame/actioninfo.php | 11 +++-- web/pages/ingame/actions.php | 8 ++-- web/pages/ingame/bans.php | 2 + web/pages/ingame/clans.php | 2 + web/pages/ingame/footer.php | 82 +++++++++++++++++++++++++++++---- web/pages/ingame/help.php | 7 ++- web/pages/ingame/kills.php | 5 +- web/pages/ingame/mapinfo.php | 9 ++-- web/pages/ingame/maps.php | 4 +- web/pages/ingame/motd.php | 8 +++- web/pages/ingame/players.php | 4 +- web/pages/ingame/servers.php | 5 +- web/pages/ingame/statsme.php | 10 ++-- web/pages/ingame/targets.php | 3 +- web/pages/ingame/weapons.php | 6 ++- 16 files changed, 130 insertions(+), 37 deletions(-) diff --git a/web/pages/ingame/accuracy.php b/web/pages/ingame/accuracy.php index 33b1118..f3f3ba6 100644 --- a/web/pages/ingame/accuracy.php +++ b/web/pages/ingame/accuracy.php @@ -200,6 +200,7 @@ if ($db->num_rows($result) != 0) { + display_page_title('Your Weapon Accuracy'); $tblWeaponstats->draw($result, $db->num_rows($result), 100); } diff --git a/web/pages/ingame/actioninfo.php b/web/pages/ingame/actioninfo.php index 4fd4523..3683009 100644 --- a/web/pages/ingame/actioninfo.php +++ b/web/pages/ingame/actioninfo.php @@ -112,7 +112,8 @@ hlstats_Events_PlayerActions.actionId = hlstats_Actions.id AND hlstats_Players.hideranking<>'1' GROUP BY - hlstats_Events_PlayerActions.playerId + hlstats_Events_PlayerActions.playerId, + hlstats_Actions.reward_player ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder @@ -151,7 +152,8 @@ hlstats_Events_TeamBonuses.actionId = hlstats_Actions.id AND hlstats_Players.hideranking<>'1' GROUP BY - hlstats_Events_TeamBonuses.playerId + hlstats_Events_TeamBonuses.playerId, + hlstats_Actions.reward_player ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder @@ -173,8 +175,7 @@ list($numitems, $totalact) = $db->fetch_row($resultCount); } - -?> -draw($result, $numitems, 100, 'center'); ?> diff --git a/web/pages/ingame/actions.php b/web/pages/ingame/actions.php index aad552c..e110365 100644 --- a/web/pages/ingame/actions.php +++ b/web/pages/ingame/actions.php @@ -43,7 +43,7 @@ // Action Statistics $player = valid_request(intval($_GET['player']), true); - $uniqueid = valid_request(strval($_GET['uniqueid']), false); + // $uniqueid = valid_request(strval($_GET['uniqueid']), false); $db->query("SELECT name FROM hlstats_Games WHERE code='$game'"); if ($db->num_rows() < 1) error("No such game '$game'."); @@ -56,7 +56,7 @@ new TableColumn( 'description', 'Action', - 'width=45&link=' . urlencode("mode=actioninfo&action=%k&game=$game") + 'width=45&link=' . urlencode("mode=actioninfo&action=%k&game=$game&player=$player") ), new TableColumn( 'obj_count', @@ -107,8 +107,8 @@ $tblPlayerActions->sort $tblPlayerActions->sortorder, $tblPlayerActions->sort2 $tblPlayerActions->sortorder "); -?> -draw($result, $db->num_rows($result), 100); ?> diff --git a/web/pages/ingame/bans.php b/web/pages/ingame/bans.php index c275cb7..f56ca37 100644 --- a/web/pages/ingame/bans.php +++ b/web/pages/ingame/bans.php @@ -138,5 +138,7 @@ list($numitems) = $db->fetch_row($resultCount); + display_page_title('Server bans'); + $table->draw($result, 25, 100); ?> diff --git a/web/pages/ingame/clans.php b/web/pages/ingame/clans.php index 7c81fc9..57ab79e 100644 --- a/web/pages/ingame/clans.php +++ b/web/pages/ingame/clans.php @@ -174,5 +174,7 @@ COUNT(hlstats_Players.playerId) >= $minmembers "); + display_page_title('Clan Statistics'); + $table->draw($result, $db->num_rows($resultCount), 100); ?> diff --git a/web/pages/ingame/footer.php b/web/pages/ingame/footer.php index a096c51..b9559b2 100644 --- a/web/pages/ingame/footer.php +++ b/web/pages/ingame/footer.php @@ -40,16 +40,82 @@ die('Do not access this file directly.'); } + if (!isset($_GET['hide'])) { - if (!isset($_GET['hide'])) { + if (isset($_GET['player'])){ + $player = valid_request(intval($_GET['player']), true); + } - if (isset($_GET['game'])){ - echo "Bans"; - echo " "; - } - - echo "Help"; + if (isset($_GET['game']) && isset($_GET['player'])){ + echo "Your Stats: "; + echo "StatsMe"; + echo " "; + echo "Maps"; + echo " "; + echo "Kills"; + echo " "; + echo "Accuracy"; + echo " "; + echo "Weapons"; + echo " "; + echo "Targets"; + echo " "; + echo "Actions"; + echo " "; + + } + + echo "
"; + + + + if (isset($_GET['game'])){ + echo "Server Stats: "; + echo "MOTD"; + echo " "; + echo "Servers"; + echo " "; + echo "Players"; + echo " "; + echo "Clans"; + echo " "; + echo "Actions"; + echo " "; + echo "Bans"; + echo " "; + echo "Help"; + } + + +?> +

+ +
+
+ + + HLstatsX Community Edition v + +
+
+ + + Theme + + based on + + Windmill Dashboard + + +
+
+ + - + \ No newline at end of file diff --git a/web/pages/ingame/help.php b/web/pages/ingame/help.php index 6fb188e..9f5cc2f 100644 --- a/web/pages/ingame/help.php +++ b/web/pages/ingame/help.php @@ -45,8 +45,9 @@ $server_id = valid_request($_GET['server_id'], true); } + display_page_title('Help'); + ?> -  HLstatsX Community Edition

@@ -168,7 +169,8 @@
 Commands display the results ingame(Type in chat, not console) Makes you invisible on player rankings, unranked.
- +

+
@@ -246,3 +248,4 @@
 Participating Servers  Address
+
\ No newline at end of file diff --git a/web/pages/ingame/kills.php b/web/pages/ingame/kills.php index 9ffba14..3c4185f 100644 --- a/web/pages/ingame/kills.php +++ b/web/pages/ingame/kills.php @@ -137,7 +137,9 @@ new TableColumn( 'name', 'Victim', - 'width=32&flag=1&link=' . urlencode('mode=statsme&player=%k') + 'width=32&flag=1)' + // Remove player link for now as it breaks the 'Your Stats' menu + //'width=32&flag=1&link=' . urlencode('mode=statsme&player=%k') ), new TableColumn( 'kills', @@ -297,6 +299,7 @@ if ($numitems > 0) { + display_page_title('Your Kill Statistics'); $tblPlayerKillStats->draw($result, $numitems, 100); } ?> diff --git a/web/pages/ingame/mapinfo.php b/web/pages/ingame/mapinfo.php index bfd6e92..835ccc5 100644 --- a/web/pages/ingame/mapinfo.php +++ b/web/pages/ingame/mapinfo.php @@ -56,11 +56,13 @@ new TableColumn( 'killerName', 'Player', - 'width=60&align=left&flag=1&link=' . urlencode('mode=statsme&player=%k') + 'width=60&align=left&flag=1' + // Remove player link for now as it breaks the 'Your Stats' menu + //'width=60&align=left&flag=1&link=' . urlencode('mode=statsme&player=%k&game=' . $game) ), new TableColumn( 'frags', - 'Kills on $map', + 'Kills on ' . $map, 'width=15&align=right' ), new TableColumn( @@ -119,9 +121,8 @@ "); list($numitems, $totalkills) = $db->fetch_row($resultCount); -?> + display_page_title('Your Map Statistics'); -draw($result, $numitems, 100, 'center'); ?> diff --git a/web/pages/ingame/maps.php b/web/pages/ingame/maps.php index 0acdd79..a9b031d 100644 --- a/web/pages/ingame/maps.php +++ b/web/pages/ingame/maps.php @@ -118,7 +118,7 @@ new TableColumn( 'map', 'Map Name', - 'width=18&align=left&link=' . urlencode("mode=mapinfo&map=%k&game=$game") + 'width=18&align=left&link=' . urlencode("mode=mapinfo&map=%k&game=$game&player=$player") ), new TableColumn( 'kills', @@ -227,5 +227,7 @@ $tblMaps->sort2 $tblMaps->sortorder "); + display_page_title('Maps Played'); + $tblMaps->draw($result, $db->num_rows($result), 100); ?> diff --git a/web/pages/ingame/motd.php b/web/pages/ingame/motd.php index 3fae9df..17c8ca0 100644 --- a/web/pages/ingame/motd.php +++ b/web/pages/ingame/motd.php @@ -50,7 +50,9 @@ // // Message of the day // - + if (!isset($_GET['hide'])) { + display_page_title($g_options['sitename'] . ' Statistics'); + } // // General // @@ -90,7 +92,9 @@ new TableColumn( 'lastName', 'Playername', - 'width=50&flag=1&link=' . urlencode('mode=statsme&player=%k') + 'width=50&flag=1' + // Remove player link for now as it breaks the 'Your Stats' menu + //'width=50&flag=1&link=' . urlencode('mode=statsme&player=%k') ), new TableColumn( 'skill', diff --git a/web/pages/ingame/players.php b/web/pages/ingame/players.php index f7be43a..c30624c 100644 --- a/web/pages/ingame/players.php +++ b/web/pages/ingame/players.php @@ -242,6 +242,8 @@ "); list($numitems) = $db->fetch_row($resultCount); - + + display_page_title('Player Statistics'); + $table->draw($result, 25, 100); ?> diff --git a/web/pages/ingame/servers.php b/web/pages/ingame/servers.php index f732188..38112df 100644 --- a/web/pages/ingame/servers.php +++ b/web/pages/ingame/servers.php @@ -45,9 +45,11 @@ $server_id = valid_request($_GET['server_id'], true); } ?> + + - + @@ -124,3 +126,4 @@
 Participating Servers Server Name  Address  Map  Played
+
\ No newline at end of file diff --git a/web/pages/ingame/statsme.php b/web/pages/ingame/statsme.php index e93f8ef..ce71098 100644 --- a/web/pages/ingame/statsme.php +++ b/web/pages/ingame/statsme.php @@ -140,13 +140,12 @@ } ?> - - - - + + +
Statistics Summary
-
Name: '; echo '' . htmlspecialchars($playerdata['lastName'], ENT_COMPAT) . ''; @@ -339,3 +338,4 @@ ?>
+
\ No newline at end of file diff --git a/web/pages/ingame/targets.php b/web/pages/ingame/targets.php index 29d3b8f..ff79587 100644 --- a/web/pages/ingame/targets.php +++ b/web/pages/ingame/targets.php @@ -218,6 +218,7 @@ if ($db->num_rows($result) != 0) { - $tblWeaponstats2->draw($result, $db->num_rows($result), 100); + display_page_title('Your Kill Statistics'); + $tblWeaponstats2->draw($result, $db->num_rows($result), 100); } ?> diff --git a/web/pages/ingame/weapons.php b/web/pages/ingame/weapons.php index e59160e..87850ff 100644 --- a/web/pages/ingame/weapons.php +++ b/web/pages/ingame/weapons.php @@ -217,11 +217,13 @@ hlstats_Servers.game='$game' AND hlstats_Events_Frags.killerId=$player AND (hlstats_Weapons.game='$game' OR hlstats_Weapons.weaponId IS NULL) GROUP BY - hlstats_Events_Frags.weapon + hlstats_Events_Frags.weapon, + hlstats_Weapons.modifier ORDER BY $tblWeapons->sort $tblWeapons->sortorder, $tblWeapons->sort2 $tblWeapons->sortorder "); - $tblWeapons->draw($result, $db->num_rows($result), 100); + display_page_title('Your Weapon Statistics'); + $tblWeapons->draw($result, $db->num_rows($result), 100); ?>