mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Remade serverinfo.php. Loads stages.xml, imports config.lua from textarea instead of requiring access to OT directory. Gives much more server information.
This commit is contained in:
9
engine/XML/stages.xml
Normal file
9
engine/XML/stages.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stages>
|
||||
<config enabled="0" />
|
||||
<stage minlevel="1" maxlevel="8" multiplier="7" />
|
||||
<stage minlevel="9" maxlevel="20" multiplier="6" />
|
||||
<stage minlevel="21" maxlevel="50" multiplier="5" />
|
||||
<stage minlevel="51" maxlevel="100" multiplier="4" />
|
||||
<stage minlevel="101" multiplier="5" />
|
||||
</stages>
|
@@ -40,23 +40,6 @@ function data_dump($print = false, $var = false, $title = false) {
|
||||
echo '</pre><br>';
|
||||
}
|
||||
|
||||
function getConfigLua() {
|
||||
$filename = config('server_path') . '/config.lua';
|
||||
if (!file_exists($filename)) {
|
||||
return;
|
||||
}
|
||||
$contents = file_get_contents($filename);
|
||||
$array = explode("\n", $contents);
|
||||
$output = [];
|
||||
foreach ($array as $arr) {
|
||||
if (strpos($arr, '--') !== 0) {
|
||||
$output[] = $arr;
|
||||
}
|
||||
}
|
||||
$ini = implode("\n", $output);
|
||||
return parse_ini_string($ini);
|
||||
}
|
||||
|
||||
function accountAccess($accountId, $TFS) {
|
||||
$accountId = (int)$accountId;
|
||||
$access = 0;
|
||||
|
Reference in New Issue
Block a user