diff --git a/serverinfo.php b/serverinfo.php
index 8f54f0a..8674e25 100644
--- a/serverinfo.php
+++ b/serverinfo.php
@@ -4,63 +4,72 @@
Here you will find all basic information about '.$config['site_title'].''; ?>
config['enabled'] != 0) {
+if (file_exists($config['server_path'].'/data/xml/stages.xml') && file_exists($config['server_path'].'/config.lua'))
+{
+ // Check if server stages are enabled
+ $stages_path = simplexml_load_file($config['server_path'].'/data/xml/stages.xml');
+ $lua_path = parse_ini_file($config['server_path'].'/config.lua');
- // Stages are beeing used
- echo "
Server stages
-
- Minium level | Maximun level | Multiplier |
";
+ if ($stages_path->config['enabled'] != 0) {
- foreach ($stages_path->children()->stage as $stages) {
+ // Stages are beeing used
+ echo "Server stages
+
+ Minium level | Maximun level | Multiplier |
";
- if($stages['maxlevel'] === NULL) {
- echo ''.$stages['minlevel'].' | Infinite | x'.$stages['multiplier'].' |
';
- } else {
- echo ''.$stages['minlevel'].' | '.$stages['maxlevel'].' | x'.$stages['multiplier'].' |
';
+ foreach ($stages_path->children()->stage as $stages) {
+
+ if($stages['maxlevel'] === NULL) {
+ echo ''.$stages['minlevel'].' | Infinite | x'.$stages['multiplier'].' |
';
+ } else {
+ echo ''.$stages['minlevel'].' | '.$stages['maxlevel'].' | x'.$stages['multiplier'].' |
';
+ }
}
+
+ echo '
';
+
+ } else {
+
+ // Not using stages
+ echo "Server rates
+
+ Experience rate | Skills rate | Magic rate | Loot rate |
+ x".$lua_path['rateExp']." | x".$lua_path['rateSkill']." | x".$lua_path['rateMagic']." | x".$lua_path['rateLoot']." |
+
";
}
- echo '
';
+ // General info
+
+ $information = array(
+
+ 'World type' => $lua_path['worldType'],
+ 'Protection level' => $lua_path['protectionLevel'],
+ 'Kills to red skull' => $lua_path['killsToRedSkull'],
+ 'Kills to black skull' => $lua_path['killsToBlackSkull'],
+ 'Remove ammo' => $lua_path['removeAmmoWhenUsingDistanceWeapon'],
+ 'Remove runes' => $lua_path['removeChargesFromRunes'],
+ 'Time to decrease frags' => $lua_path['timeToDecreaseFrags'],
+ 'House rent period' => $lua_path['houseRentPeriod'],
+ 'AFK Kickout minutes' => $lua_path['kickIdlePlayerAfterMinutes'],
+ 'Location' => $lua_path['location'],
+ 'Owner name' => $lua_path['ownerName']
+
+ );
+
+ echo "Server general information
";
+
+ foreach ($information as $key => $value) {
+ echo "- ".$key." - ".$value."
";
+ }
+
+ echo '
';
} else {
- // Not using stages
- echo "Server rates
-
- Experience rate | Skills rate | Magic rate | Loot rate |
- x".$lua_path['rateExp']." | x".$lua_path['rateSkill']." | x".$lua_path['rateMagic']." | x".$lua_path['rateLoot']." |
-
";
+ echo 'Invliad PATH, please check your config file
';
}
-// General info
-
-$information = array(
-
- 'World type' => $lua_path['worldType'],
- 'Protection level' => $lua_path['protectionLevel'],
- 'Kills to red skull' => $lua_path['killsToRedSkull'],
- 'Kills to black skull' => $lua_path['killsToBlackSkull'],
- 'Remove ammo' => $lua_path['removeAmmoWhenUsingDistanceWeapon'],
- 'Remove runes' => $lua_path['removeChargesFromRunes'],
- 'Time to decrease frags' => $lua_path['timeToDecreaseFrags'],
- 'House rent period' => $lua_path['houseRentPeriod'],
- 'AFK Kickout minutes' => $lua_path['kickIdlePlayerAfterMinutes'],
- 'Location' => $lua_path['location'],
- 'Owner name' => $lua_path['ownerName']
-
-);
-
-echo "Server general information
";
-
-foreach ($information as $key => $value) {
- echo "- ".$key." - ".$value."
";
-}
-
-echo '
';
-
?>
\ No newline at end of file