Merge pull request #127 from Alvaritos/master

Check for correct path - serverinfo Fix #124
This commit is contained in:
Stefan A. Brannfjell 2014-05-21 19:46:18 +02:00
commit feb0feffee

View File

@ -4,6 +4,10 @@
Here you will find all basic information about <?php echo '<b>'.$config['site_title'].'</b>'; ?> Here you will find all basic information about <?php echo '<b>'.$config['site_title'].'</b>'; ?>
<?php <?php
// Check if PATH is correct
if (file_exists($config['server_path'].'/data/xml/stages.xml') && file_exists($config['server_path'].'/config.lua'))
{
// Check if server stages are enabled // Check if server stages are enabled
$stages_path = simplexml_load_file($config['server_path'].'/data/xml/stages.xml'); $stages_path = simplexml_load_file($config['server_path'].'/data/xml/stages.xml');
$lua_path = parse_ini_file($config['server_path'].'/config.lua'); $lua_path = parse_ini_file($config['server_path'].'/config.lua');
@ -62,5 +66,10 @@ foreach ($information as $key => $value) {
echo '</ul>'; echo '</ul>';
} else {
echo '<h1>Invliad PATH, please check your config file</h1>';
}
?> ?>
<?php include 'layout/overall/footer.php'; ?> <?php include 'layout/overall/footer.php'; ?>