<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<h1>Server Information</h1>
Here you will find all basic information about <?php echo '<b>'.$config['site_title'].'</b>'; ?>
<?php
// Check if PATH is correct
if (file_exists($config['server_path'].'/config.lua')) {
// Checks OS from config.php ($config['os'])
if ($config['os'] == 'LINUX') {
if (file_exists($config['server_path'].'/data/XML/stages.xml')) {
$stages_path = simplexml_load_file($config['server_path'].'/data/XML/stages.xml');
} else {
echo 'Couldn\'t locate stages.xml';
}
} else {
if (file_exists($config['server_path'].'/data/XML/stages.xml')) {
$stages_path = simplexml_load_file($config['server_path'].'/data/XML/stages.xml');
} else {
echo 'Couldn\'t locate stages.xml';
}
}
$lua_path = parse_ini_file($config['server_path'].'/config.lua');
echo '<h2>Server rates</h2>';
if ($stages_path->config['true'] != 0) {
// Stages are beeing used
$stages = array (
//MinLevel, Maxlevel, multiplier
array(351, 50), //Max level
array(1, 80, 300), //first multiplier
array(81, 123, 250), // second
array(124, 130, 225),
array(131, 150, 200),
array(151, 230, 150),
array(231, 350, 100)
);
echo '<tr><td><center>'.$stages[0][0].'</center></td><td><center>Infinite</center></td><td><center>x'.$stages[0][1].'</center></td></tr>';
echo '<tr><td><center>'.$stages[1][0].'</center></td><td><center>'.$stages[1][1].'</center></td><td><center>x'.$stages[1][2].'</center></td></tr>';
echo '<tr><td><center>'.$stages[2][0].'</center></td><td><center>'.$stages[2][1].'</center></td><td><center>x'.$stages[2][2].'</center></td></tr>';
echo '<tr><td><center>'.$stages[3][0].'</center></td><td><center>'.$stages[3][1].'</center></td><td><center>x'.$stages[3][2].'</center></td></tr>';
echo '<tr><td><center>'.$stages[4][0].'</center></td><td><center>'.$stages[4][1].'</center></td><td><center>x'.$stages[4][2].'</center></td></tr>';
echo '<tr><td><center>'.$stages[5][0].'</center></td><td><center>'.$stages[5][1].'</center></td><td><center>x'.$stages[5][2].'</center></td></tr>';
echo '<tr><td><center>'.$stages[6][0].'</center></td><td><center>'.$stages[6][1].'</center></td><td><center>x'.$stages[6][2].'</center></td></tr>';
echo '</tbody></table>';
} else {
// Not using stages
echo "<table class='table table-striped table-hover'>
<tbody><tr class='yellow'><td>Experience rate</td></tr>
<tr><td><center>x".$lua_path['rateExp']."</center></td></tr>
</tbody></table>";
}
echo "<table class='table table-striped table-hover'>
<tbody><tr class='yellow'><td>Skills rate</td><td>Magic rate</td><td>Loot rate</td></tr>
<tr><td><center>x".$lua_path['rateSkill']."</center></td><td><center>x".$lua_path['rateMagic']."</center></td><td><center>x".$lua_path['rateLoot']."</center></td></tr>
</tbody></table>";
// General info
$information = array(
'World type' => $lua_path['worldType'],
'Protection level' => $lua_path['protectionLevel'],
'Kills to red skull' => '7',
'Kills to black skull' => '14',
'Remove ammo' => 'false',
'Remove runes' => 'false',
'Vocations' => 'Sorcerer,Druid,Paladin,Knight,Warlock',
'House rent period' => $lua_path['houseRentPeriod'],
'Location' => $lua_path['location'],
'Owner name' => 'Vish Vandor'
);
echo "<h2>Server general information</h2><ul>";
foreach ($information as $key => $value) {
echo "<li>".$key." - <b>".$value."</b></li>";
}
echo '</ul>';
} else {
echo '<h1>Invliad PATH, please check your config file</h1>';
}
include 'layout/overall/footer.php'; ?>