-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayer.list.php
More file actions
80 lines (70 loc) · 2.03 KB
/
player.list.php
File metadata and controls
80 lines (70 loc) · 2.03 KB
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
70
71
72
73
74
75
76
77
78
79
80
<?php
namespace Pmeth\RBI;
require 'bootstrap.php';
use Pmeth\Common;
$playermapper = new PlayerROMMapper($myrom);
$teammapper = new TeamROMMapper($myrom);
if (false === $request->getGetVar('teamoffset')) {
$filteredteam = null;
$playerlist = $playermapper->getAllPlayers();
} else {
$filteredteam = $teammapper->get($request->getGetVar('teamoffset'));
$playerlist = $playermapper->getPlayersByTeam($filteredteam);
}
$teamlist = $teammapper->getAllTeams();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
font-family: 'Courier New';
font-weight: bold;
background-color: black;
color: white;
}
header, menu {
margin: 0;
padding: 0;
}
header a, menu a {
color: yellow;
text-decoration: none;
}
header a:hover, menu a:hover {
text-decoration: underline;
}
</style>
<title></title>
</head>
<body>
<?php
include('partials/header.partial.php');
include('partials/menu.partial.php');
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" >
Team:
<select name="teamoffset">
<option value="">All Teams</option>
<?php foreach ($teamlist as $team) : ?>
<option
value='<?php echo $team->getOffset(); ?>'
<?php
if (
is_object($filteredteam) &&
$filteredteam->getOffset() == $team->getOffset()
) :
?>
selected='selected'
<?php endif; ?>
><?php echo $team->getName(); ?></option>
<?php endforeach; ?>
</select>
<input type="submit" value="FILTER" />
</form>
<?php
echo $playerlist->toHTMLTable();
?>
</body>
</html>