-
Notifications
You must be signed in to change notification settings - Fork 0
/
competition.php
69 lines (56 loc) · 2.48 KB
/
competition.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php require_once('assets/config.php'); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>W.S.K.V. Débaldérin</title>
<!--<base href="http://www.debalderin.wur.nl/">-->
<base href="http://localhost/DBD/">
<link rel="stylesheet" href="assets/css/responsive.css">
<link rel="shortcut icon" href="assets/img/dbd_logo.ico" >
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="assets/js/general.js"></script>
<script type="text/javascript" src="assets/js/competition.js"></script>
<!--[if IE]>
<script>
$(document).ready(function () {
document.createElement('main');
});
</script>
<![endif]-->
<meta name="viewport" content="initial-scale=1">
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/nl_NL/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<?php include_once("analyticstracking.php"); ?>
<?php include('header.php'); ?>
<main>
<div id="competitionWrapper">
<?php
// Load the teams from database
$team_selection = '<label>Selecteer team: </label><select id="select_team">';
try {
$stmt = $db->prepare("SELECT * FROM teams");
$stmt->execute();
} catch (PDOException $ex) { die("Failed to run query: " . $ex->getMessage()); }
if ($stmt->rowCount() > 0) {
foreach ($stmt as $team) {
$team_selection .= '<option value="' . $team['team_id'] . '">' . $team['team_name'] . '</option>';
}
echo $team_selection . '</select>';
}
?>
<div id="ajax_competition_content"><!-- The team competition info will be loaded here --></div>
</div>
</main>
<?php include('footer.php'); ?>
</body>
</html>