Example #1
0
    deleteGame($_GET["delete"]);
}
// Jõekääru mängu kustutamiseks
if (isset($_GET["delete"])) {
    //saadan kaasa id, mida kustutada
    deleteGameJoekaaru($_GET["delete"]);
}
// Rääma pargis mängitud mängude muutmine
if (isset($_POST["edit"])) {
    editGame($_POST["id"], $_POST["game_name"], $_POST["comment"]);
}
// Jõekääru pargis mängitud mängude muutmine
if (isset($_POST["edit"])) {
    editGameJoekaaru($_POST["id"], $_POST["game_name"], $_POST["comment"]);
}
$game_history = getGameHistory();
$game_history_joekaaru = getGameHistoryJoekaaru();
?>

<p>
	Sisse logitud kasutajaga <?php 
echo $_SESSION["user_email"];
?>
	<a href="?logout=1"> Logi välja</a>
</p>

<h1>Minu mängitud mängud Rääma Pargis</h1>

<table border=1 >
<tr>
	<th>Id</th>
?>
		        <div class="col-md-10">
		            <div class="container-fluid" id ="games_container" style="display:show">
						<table class="table table-condensed table-hover" id="games_head">
							<thead>
								<tr class = "table_headers">
									<th>Game</th>
									<th>Home</th>												
									<th>Away</th>
									<th>Date</th>
									<th>Time</th>
								</tr>
							</thead>
							<tbody id="games_body">
								<?php 
getGameHistory();
?>
						  	</tbody>						
			  			</table>
					</div>
		        </div>
		    </div>
	    </div>
			
		
		<!--js-->
		<script src="https://code.jquery.com/jquery.js"></script>
	    <script src="assets/js/bootstrap.min.js"></script>

	</body>
</html>