diff --git a/system/pages/bans.php b/system/pages/bans.php
index e2d42602..f55564f0 100644
--- a/system/pages/bans.php
+++ b/system/pages/bans.php
@@ -149,7 +149,7 @@ function getBanReason($reasonId)
function getBanType($typeId)
{
- switch($reasonId)
+ switch($typeId)
{
case 1:
return "IP Banishment";
diff --git a/system/pages/experiencestages.php b/system/pages/experiencestages.php
index b3825394..b2b63c3f 100644
--- a/system/pages/experiencestages.php
+++ b/system/pages/experiencestages.php
@@ -12,13 +12,16 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Experience Stages';
+if(file_exists($config['data_path'] . 'XML/stages.xml')) {
+ $stages = new DOMDocument();
+ $stages->load($config['data_path'] . 'XML/stages.xml');
+}
+
if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['experienceStages']))
{
$enabled = false;
- if(file_exists($config['data_path'] . 'XML/stages.xml')) {
- $stages = new DOMDocument();
- $stages->load($config['data_path'] . 'XML/stages.xml');
+ if(isset($stages)) {
foreach($stages->getElementsByTagName('config') as $node) {
if($node->getAttribute('enabled'))
$enabled = true;
@@ -34,23 +37,18 @@ if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['exp
else if(isset($config['lua']['rate_exp']))
$rate_exp = $config['lua']['rate_exp'];
- $content .= 'Server is not configured to use experience stages.
Current experience rate is: x' . $rate_exp . '';
+ echo 'Server is not configured to use experience stages.
Current experience rate is: x' . $rate_exp . '';
return;
}
}
-if(!isset($stages)) {
- $stages = new DOMDocument();
- $stages->load($config['data_path'] . 'XML/stages.xml');
-}
-
if(!$stages)
{
echo 'Error: cannot load stages.xml!';
return;
}
-$content .= '
Stages table | @@ -61,11 +59,11 @@ $content .= '||||
'.$stage->getAttribute('minlevel') . '-'. (isset($maxlevel[0]) ? $maxlevel : '*') . ' | x'.$stage->getAttribute('multiplier').' |