mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-05-01 03:39:21 +02:00
New serverinfo page
This commit is contained in:
parent
c9f61d65bf
commit
820f886354
@ -8,19 +8,20 @@
|
|||||||
|
|
||||||
$config['site_title'] = 'Znote AAC';
|
$config['site_title'] = 'Znote AAC';
|
||||||
$config['site_title_context'] = 'Because open communities are good communities. :3';
|
$config['site_title_context'] = 'Because open communities are good communities. :3';
|
||||||
|
$config['server_path'] = 'C:\Users\Alvaro\Documents\GitHub\forgottenserver';
|
||||||
|
|
||||||
// ------------------------ \\
|
// ------------------------ \\
|
||||||
// MYSQL CONNECTION DETAILS \\
|
// MYSQL CONNECTION DETAILS \\
|
||||||
// ------------------------ \\
|
// ------------------------ \\
|
||||||
|
|
||||||
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
||||||
$config['sqlUser'] = 'tfs10';
|
$config['sqlUser'] = 'root';
|
||||||
|
|
||||||
// phpmyadmin password for OT server:
|
// phpmyadmin password for OT server:
|
||||||
$config['sqlPassword'] = 'tfs10';
|
$config['sqlPassword'] = 'djramos1';
|
||||||
|
|
||||||
// The database name to connect to. (This is usually same as username).
|
// The database name to connect to. (This is usually same as username).
|
||||||
$config['sqlDatabase'] = 'tfs10';
|
$config['sqlDatabase'] = 'znote';
|
||||||
|
|
||||||
// Hostname is usually localhost or 127.0.0.1.
|
// Hostname is usually localhost or 127.0.0.1.
|
||||||
$config['sqlHost'] = 'localhost';
|
$config['sqlHost'] = 'localhost';
|
||||||
|
@ -1,6 +1,66 @@
|
|||||||
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
|
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
|
||||||
|
|
||||||
<h1>Server Information</h1>
|
<h1>Server Information</h1>
|
||||||
<p>Edit this page for server information.</p>
|
Here you will find all basic information about <?php echo '<b>'.$config['site_title'].'</b>'; ?>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// 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');
|
||||||
|
|
||||||
|
if ($stages_path->config['enabled'] != 0) {
|
||||||
|
|
||||||
|
// Stages are beeing used
|
||||||
|
echo "<h2>Server stages</h2>
|
||||||
|
<table class='table table-striped table-hover'>
|
||||||
|
<tbody><tr class='yellow'><td>Minium level</td><td>Maximun level</td><td>Multiplier</td></tr>";
|
||||||
|
|
||||||
|
foreach ($stages_path->children()->stage as $stages) {
|
||||||
|
|
||||||
|
if($stages['maxlevel'] === NULL) {
|
||||||
|
echo '<tr><td><center>'.$stages['minlevel'].'</center></td><td><center>Infinite</center></td><td><center>x'.$stages['multiplier'].'</center></td></tr>';
|
||||||
|
} else {
|
||||||
|
echo '<tr><td><center>'.$stages['minlevel'].'</center></td><td><center>'.$stages['maxlevel'].'</center></td><td><center>x'.$stages['multiplier'].'</center></td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</tbody></table>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Not using stages
|
||||||
|
echo "<h2>Server rates</h2>
|
||||||
|
<table class='table table-striped table-hover'>
|
||||||
|
<tbody><tr class='yellow'><td>Experience rate</td><td>Skills rate</td><td>Magic rate</td><td>Loot rate</td></tr>
|
||||||
|
<tr><td><center>x".$lua_path['rateExp']."</center></td><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' => $lua_path['protectionLevel'],
|
||||||
|
'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 "<h2>Server general information</h2><ul>";
|
||||||
|
|
||||||
|
foreach ($information as $key => $value) {
|
||||||
|
echo "<li>".$key." - <b>".$value."</b></li>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</ul>';
|
||||||
|
|
||||||
|
?>
|
||||||
<?php include 'layout/overall/footer.php'; ?>
|
<?php include 'layout/overall/footer.php'; ?>
|
Loading…
x
Reference in New Issue
Block a user