blob: b0e1316e96f7b7b48c3956def7d7e29cab0a4700 (
plain) (
blame)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
<?php
$platoon_temp_count = 0; $squad_temp_count = 0;
?>
<html>
<head>
<title>Roster Current</title>
<style type="text/css">
p {color: white; }
body {background-color: black; }
th.header {
width:175px;
background:#333;
}
td.rudi {
text-align: center;
vertical-align: middle;
}
</style>
</head>
<body>
<?php
/*
echo "<table align=\"center\">";
echo "<tr>
<th>Rank</th>
<th>Name</th>
<th>Weapon</th>
<th>Status</th>
</tr>";
$p = 1;
$s = 1;
$u = 1;
$members = $this->data;
while($u != count($members))
{
while($p != $stats['platoon'])
{
echo "<tr>
<th>a platoon</th>
</tr>";
while($s != $stats['squad'])
{
if($members[$u]->squad_id)
echo "<tr>
<td>{$members[$u]->rank_short}</td>
<td>{$members[$u]->name}</td>
<td>{$members[$u]->weapon_name}</td>
<td>{$members[$u]->status}</td>
</tr>";
echo "<tr>
<th>a squad</th>
</tr>";
++$s;
}
++$p;
}
++$u;
}
echo "</table>";
*/
?>
<table align="center">
<?php for($platoon_count = 0; $platoon_count <= $stats['platoon']; ++$platoon_count): ?>
<?php if($this->getMembersOfPlatoon($platoon_count) > 0): ?>
<?php if($platoon_count):?>
<tr>
<!-- Platoon table marker -->
<th class="header" colspan="5"><?php echo $platoon_count . ' Platoon'; ?></th></tr>
<?php endif; ?>
<tr>
<!-- Table header -->
<th class="header">Rank</th>
<th class="header">Name</th>
<th class="header">Role</th>
<th class="header">Weapon</th>
<th class="header">Status</th>
</tr>
<?php foreach($this->data as $member): ?>
<?php if($member->platoon_id == $platoon_count && $member->status_id < 2): ?>
<tr>
<!-- Rank -->
<td class="rudi"><img src="<?php echo "{$this->images_path}/ranks/small/{$member->rank_short}.png"; ?>" alt="<?php echo $member->rank_short; ?>" /></td>
<!-- Name -->
<td class="rudi"><a href="?load=rudi&profile=<?php echo $member->member_id ?>"><?php echo $member->last_name . ', ' . $member->first_name; ?></a></td>
<!-- Roles -->
<td class="rudi">
<?php
decho(count($member->Roles) . ' roles attached to: ' . $member->last_name);
for($role = 0; $role < count($member->Roles); ++$role)
{
if($member->Roles[$role]->role_name)
{
decho($role . " = (" . $member->Roles[$role]->role_name . ")");
echo $member->Roles[$role]->role_name;
echo ' ';
}
else
{
echo "Soldier";
}
}
?>
</td>
<!-- Weapon -->
<td class="rudi"><?php echo $member->weapon_manufacturer . ' ' . $member->weapon_model; ?></td>
<!-- Status -->
<td class="rudi"><?php echo $member->status; ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endfor; ?>
</table>
</body>
</html>
|