<div class="box">
    <h1>{tr:admin_page}</h1>
    
    <?php
    
    $sections = array('statistics', 'transfers', 'guests');
    
    try {
        if(count(Config::overrides()))
            $sections[] = 'config';
    } catch(ConfigOverrideDisabledException $e) {}
    
    $section = 'statistics';
    if(array_key_exists('as', $_REQUEST))
        $section = $_REQUEST['as'];
    
    if(!in_array($section, $sections)) throw new GUIUnknownAdminSectionException($section);
    
    ?>
    
    <div class="menu">
        <ul>
        <?php foreach($sections as $s) { ?>
            <li class="<?php if($s == $section) echo 'current' ?>">
                <a href="?s=admin&as=<?php echo $s ?>">
                    <?php echo Lang::tr('admin_'.$s.'_section') ?>
                </a>
            </li>
        <?php } ?>
        </ul>
    </div>
    
    <div class="<?php echo $section ?>_section section">
        <?php Template::display('admin_'.$section.'_section') ?>
    </div>
</div>

<div class="box">
    <h1>{tr:admin_page}</h1>
    
    <?php
    
    $sections = array('statistics', 'transfers', 'guests');
    
    if(Config::get('config_overrides'))
        $sections[] = 'config';
    
    $section = 'statistics';
    if(array_key_exists('as', $_REQUEST))
        $section = $_REQUEST['as'];
    
    if(!in_array($section, $sections)) throw new GUIUnknownAdminSectionException($section);
    
    ?>
    
    <div class="menu">
        <ul>
        <?php foreach($sections as $s) { ?>
            <li class="<?php if($s == $section) echo 'current' ?>">
                <a href="?s=admin&as=<?php echo $s ?>">
                    <?php echo Lang::tr('admin_'.$s.'_section') ?>
                </a>
            </li>
        <?php } ?>
        </ul>
    </div>
    
    <div class="<?php echo $section ?>_section section">
        <?php Template::display('admin_'.$section.'_section') ?>
    </div>
</div>

Fix overrides enabled check to stop getting exceptions
Fix overrides enabled check to stop getting exceptions


git-svn-id: 28fe03dfd74dd77dcc8ecfe99fabcec8eed81bba@3461 8555b757-d854-4b86-925a-82fd84c90ff4
