-
Notifications
You must be signed in to change notification settings - Fork 1
/
player_bio.php
52 lines (48 loc) · 1.81 KB
/
player_bio.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
<?php
$year = $_GET["year"];
$name = $_GET["name"];
$rosterFile = fopen("data/roster.csv","r");
$years = array();
while(! feof($rosterFile)) {
$array = fgetcsv($rosterFile);
if($array[1] == $name) {
array_push($years, $array[0]);
if($array[0] == $year) $player = $array;
}
}
fclose($rosterFile);
?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel"><?php echo $player[1]; ?></h4>
</div>
<div class="modal-body">
<div class="row clearfix">
<div class="col-md-2 column">
<div class="player">
<div class="photo">
<img src="http://colonyultimate.com/team/photos/<?php if (file_exists('photos/' . strtolower(str_replace(" ", "-", $player[1])) . '.png')) echo strtolower(str_replace(" ", "-", $player[1])); else if($player[2] == "Pillage") echo 'nophoto'; else echo 'nophoto2'; ?>.png" />
</div>
<div class="number"><?php echo $player[3]; ?></div>
</div>
</div>
<div class="col-md-10 column">
<form class="form-horizontal">
<div class="form-group">
<label for="inputPassword" class="col-sm-3 control-label"><span class="label label-danger">Bio</span></label>
<div class="col-sm-9">
<p class="form-control-static"><?php echo $player[4]; ?></p>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-sm-3 control-label"><span class="label label-danger">Years on team</span></label>
<div class="col-sm-9">
<p class="form-control-static"><?php echo implode(', ', $years); ?></p>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>