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
|
<h2 class="ribbon full">
<a href="/profile/view/<?= $user->username ?>"><?= $user->username ?>'s</a> Anime List
</h2>
<div class="triangle-ribbon"></div>
<br class="cl" />
<table class="table"><tr>
<td><?= $this->html->link("Completed", "#finished", array('class' => 'anchorLink')); ?> </td>
<td><?= $this->html->link("Watching", "#watching", array('class' => 'anchorLink')); ?> </td>
<td><?= $this->html->link("Plans to Watch", "#planning", array('class' => 'anchorLink')); ?> </td>
<td><?= $this->html->link("On-Hold", "#paused", array('class' => 'anchorLink')); ?> </td>
<td><?= $this->html->link("Dropped", "#dropped", array('class' => 'anchorLink')); ?> </td>
</tr>
</table>
<?php function tableHelper($input, &$t) {
echo '<table class="table">';
echo "<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>";
$i = 1;
foreach ($input as $anime) {
echo '<tr>';
echo "<td> $i </td>";
echo "<td> <a href=\"/anime/view/$anime->series_animedb_id/\">$anime->series_title </a></td>";
echo "<td>";
echo ($anime->my_score != 0) ? $anime->my_score : "-";
echo "</td>";
echo "<td> $anime->series_type </td>";
echo "<td>";
echo $anime->my_watched_episodes;
echo "/";
echo ($anime->series_episodes != 0) ? $anime->series_episodes : "-";
echo "</td>";
echo "</tr>";
$i += 1;
}
echo "</table>";
}
?>
<div class="two_col container_12">
<div class="grid_10">
<?php if (isset($watching)): ?>
<a name="watching" id="watching"><h2 class="ribbon">Watching</h2></a>
<div class="triangle-ribbon"></div>
<br class="cl" />
</div>
<div class="grid_2">
<button class="large" style="margin-left:40px; margin-top:10px"><a href="/animelist/addsearch">Add</a></button>
</div>
</div>
<?php tableHelper($watching, $this); ?>
<?php endif; ?>
<?php if (isset($finished)): ?>
<a name="finished" id="finished"><h2 class="ribbon">Finished Animes</h2></a>
<div class="triangle-ribbon"></div>
<br class="cl" />
<?php tableHelper($finished, $this); ?>
<?php endif; ?>
<?php if (isset($planning)): ?>
<a name="planning" id="planning"><h2 class="ribbon">Plans to Watch</h2></a>
<div class="triangle-ribbon"></div>
<br class="cl" />
<?php tableHelper($planning, $this); ?>
<?php endif; ?>
<?php if(isset($paused)): ?>
<a name="paused" id="paused"><h2 class="ribbon">Paused</h2></a>
<div class="triangle-ribbon"></div>
<br class="cl" />
<?php tableHelper($paused, $this); ?>
<?php endif; ?>
<?php if (isset($dropped)): ?>
<a name="dropped" id="dropped"><h2 class="ribbon">Dropped</h2></a>
<div class="triangle-ribbon"></div>
<br class="cl" />
<?php tableHelper($dropped, $this); ?>
<?php endif; ?>
|