<?
include("const.php");

global 
$newstyle;
    
$ustyle findTheme($users[style]);
    if (
$newstyle[$ustyle] == 1)  // Checks if you are on the right theme for the LIST version of the menu
{   ?>
<!-- this is my show/hide script for the nav -->
<script type="text/javascript">
function hideshow(which){
if (!document.getElementById)
return
if (which.style.display=="block")
which.style.display="none"
else
which.style.display="block"
}
</script>

        <div id="menu"> 
            <ul id="list-menu">
                <li id="scores-menu" class="menu-no-drop"><a href="<?=$config[main]?>?action=scores">Scores</a></li>
                <li id="clan-menu" class="menu-no-drop"><a href="<?=$config[main]?>?action=clan">Clan</a></li>
                <li id="build-menu" class="menu-no-drop"><a href="<?=$config[main]?>?action=build">Build</a></li>
                <li id="diplomacy-menu" class="menu-drop-down"><a href="javascript:hideshow(document.getElementById('diplomacy-drop'))">Diplomacy</a>
                    <ul id="diplomacy-drop" style="display: none;" class="menu-dropped">
                        <li><a href="<?=$config[main]?>?action=military">Warlord's Hut</a></li>
                        <li><a href="<?=$config[main]?>?action=aid">Aid</a></li>
                        <li><a href="<?=$config[main]?>?action=espy">Espionages</a></li>
                    </ul>
                </li>
                <li id="use-turns-menu" class="menu-drop-down"><a href="javascript:hideshow(document.getElementById('use-turns-drop'))">Use Turns</a>
                    <ul id="use-turns-drop" style="display: none;" class="menu-dropped">
                        <li><a href="<?=$config[main]?>?action=magic">General's Hut</a></li>
                        <li><a href="<?=$config[main]?>?action=runes">Earn</a></li>
                        <li><a href="<?=$config[main]?>?action=land">Scout</a></li>
                    </ul>
                </li>            
                <li id="information-menu" class="menu-drop-down"><a href="javascript:hideshow(document.getElementById('information-drop'))">Information</a>
                    <ul id="information-drop" style="display: none;" class="menu-dropped">
                        <li><a href="<?=$config[main]?>?action=status">Army Status</a></li>
                        <li><a href="<?=$config[main]?>?action=search">Warlord Search</a></li>
                        <li><a href="<?=$config[main]?>?action=rattack">Attack History</a></li>
                    </ul>
                </li>        
                <li id="finance-menu" class="menu-drop-down"><a href="javascript:hideshow(document.getElementById('finance-drop'))">Finance</a>
                    <ul id="finance-drop" style="display: none;" class="menu-dropped">
                        <li><a href="<?=$config[main]?>?action=pubmarketbuy">Market</a></a></li>
                        <li><a href="<?=$config[main]?>?action=pvtmarketbuy">Mercenaries</a></a></li>
                        <li><a href="<?=$config[main]?>?action=bank">Cluny's Hut</a></a></li>
                        <li><a href="<?=$config[main]?>?action=lottery">Gamble</a></a></li>
                    </ul>
                </li>
            </ul>
        </div> <!-- end #menu -->
<?
 
}

else
{
    
?>
    <a href="http://www.redwallwarlords.com"><div id="home"></div></a>
    <table class="menus">

        <tr><th><hr><a href="<?=$config[main]?>?action=main">Main Menu</a><hr></th></tr>
        <tr><th>Information</th></tr>
        <tr><td><b><a href="<?=$config[main]?>?action=help">Help</a></b></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=status"><?=ucfirst($cterms[army])?> Status</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=scores">Scores</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=search"><?=ucfirst($cterms[warlord])?> Search</a></td></tr>
        <!--<tr><td><a href="<?=$config[main]?>?action=warlordinfo"><?=ucfirst($cterms[warlord])?> Info</a></td></tr>-->
        <tr><td><a href="<?=$config[main]?>?action=news">News Search</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=rattack">Recent Attacks</a></td></tr>
        <? if ($theme[emp_tracking]) { ?>
        <tr><td><a href="<?=$config[main]?>?action=emperors">Emperors</a></td></tr>
        <? ?>
        <? if ($theme[clans]) { ?>
        <tr><td><a href="<?=$config[main]?>?action=clancrier"><?=ucfirst($cterms[clan])?> Crier</a></td></tr>
        <!--<tr><td><a href="<?=$config[main]?>?action=clancontacts"><?=ucfirst($cterms[clan])?> Contacts</a></td></tr>-->
        <? }
            if((
$users[emp] == 1) || ($users[disabled] == 2)) {
        
?>
        <tr><td><a href="<?=$config[main]?>?action=throne">Throne Room</a></td></tr>
        <? ?>
        <tr><td><a href="<?=$config[main]?>?action=headquarters">Headquarters</a></td></tr>
                <tr><td><a href="<?=$config[main]?>?action=chat">The Lounge</a></td></tr>
        <tr><td><a href="<?=$config[forums]?>" target="new">Forums</a></td></tr>
        <tr><th>Use Turns</th></tr>
        <tr><td><a href="<?=$config[main]?>?action=buffturns">Buff Turns</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=runes">Earn <?=$uera[runes]?></a></td></tr>
        <!--<tr><td><a href="<?=$config[main]?>?action=farm">Forage</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=cash">Loot</a></td></tr>/-->
        <tr><td><a href="<?=$config[main]?>?action=land">Scout</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=build">Construct</a></td></tr>
        <tr><th>Finances</th></tr>
        <? if($theme[mercs]) { ?>
        <tr><td><a href="<?=$config[main]?>?action=pvtmarketbuy">Mercenaries</a></td></tr>
        <? ?>
        <tr><td><a href="<?=$config[main]?>?action=pubmarketbuy">Market</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=bank">Cluny's Hut</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=lottery">Gamble</a></td></tr>
        <tr><th>Diplomacy</th></tr>
        <tr><td><a href="<?=$config[main]?>?action=aid">Aid</a></td></tr>
        <? if ($theme[clans]) { ?>
        <tr><td><a href="<?=$config[main]?>?action=clan"><?=ucfirst($cterms[clan])?>s</a></td></tr>
            <? if($users[clan] || ($users[disabled] == 2)) {  ?>
        <tr><td><a href="<?=$config[main]?>?action=clanmsg"><?=ucfirst($cterms[clan])?> Forum</a></td></tr>
                <? if($theme[storehouse]) { ?>
        <tr><td><a href="<?=$config[main]?>?action=storehouse">Storehouse</a></td></tr>
        <?
                
}
            }
        }
?>
        <tr><td><a href="<?=$config[main]?>?action=espy">Espionages</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=military"><?=ucfirst($cterms[warlord])?>'s Hut</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=magic">General's Hut</a></td></tr>
        <tr><th>Management</th></tr>
        <tr><td><a href="<?=$config[main]?>?action=manage">Manage <?=ucfirst($cterms[army])?></a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=delete">Delete Account</a></td></tr>
        <? if ($users[disabled] == 2) { ?>
        <tr><th>Administration</th></tr>
        <tr><td><a href="<?=$config[main]?>?action=clanadmin"><?=ucfirst($cterms[clan])?> Admin</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=useradmin">User Admin</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=suseradmin">Single User</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=msgadmin">View Messages</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=clanmsgadmin">Clan Messages</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=avg">Top <?=$cterms[warlord]?>s</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=toptenof">Top Tens...</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=themeadmin">Theme Admin</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=miscadmin">Miscellaneous</a></td></tr>
        <tr><td><a href="<?=$config[main]?>?action=reset">Reset</a></td></tr>
        <? ?>
        <tr><th><hr><a href="<?=$config[main]?>?action=logout">Logout</a><hr></th></tr>
    </table>
<?
}