<?php
include("serverConnect.php");
include("functions.php");
include("simulation.php");
include("path.php");

session_start();

if (isset($_SESSION['id'])) {
	//update honor
    
    
}
else {
	header('Location: index.html');
}
?>

<!DOCTYPE html>
<html>
<head>
	<title>Neo Feudal</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="shortcut icon" type="image/png" href="logo.png" />

	<meta charset="UTF-8">
  
	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
	<link rel="stylesheet" href="style.css">
	<link rel="stylesheet" href="menu.css">
  
</head>
<body>
<div id="topbar">
    <div class="navbar-header">
        <a class="navbar-brand" href="home.php" style="font-family:Roboto;color:#fff;">Neo Feudal</a>
    </div>
    <ul id="menu">
        <li><a href="#">Geography</a>
            <ul>
                <li><a href="map.php">Map</a></li>
                <?
                $req = $bdd->prepare('SELECT * FROM cRegions WHERE owner = ?');
                $req->execute(array($_SESSION['id']));
                while ($data = $req->fetch()) {
                    ?>
                    <li><a href="changeRegion.php?id=<? echo $data['id']; ?>"><? echo $data['name']; ?></a></li>
                    <?
                }
                ?>
            </ul>
        </li>
        <li><a href="#">Economy</a>
            <ul>
                <li><a href="trade.php">Trade</a></li>
                <li><a href="transports.php">Transports</a></li>
                <li><a href="summary.php">Summary</a></li>
            </ul>
        </li>
        <li><a href="#">Military</a>
            <ul>
                <li><a href="#">Formation</a></li>
                <li><a href="#">Creation</a></li>
            </ul>
        </li>
        <li><a href="#">Government</a>
            <ul>
                <li><a href="messages.php">Messages</a></li>
                <li><a href="politics.php">Politics</a></li>
                <li><a href="#">Diplomacy</a></li>
                <li><a href="#">Research</a></li>
                <li><a href="options.php">Options</a></li>
            </ul>
        </li>
        <li>
            <table><tr>
                <td id="funds"></td>
                <td>Honor : 10</td>
                <td>June 3012</td>
            </tr></table>
        </li>
    </ul>
</div>

<div id="main">