-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathresults.php
44 lines (41 loc) · 1.04 KB
/
results.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
<?php
include_once('tvclass.php');
if(!empty($_POST['show_id'])) {
$show_id = intval($_POST['show_id']);
$show_name = $_POST['show'];
$shows = TVAnalyzer::AnalyzeShow($show_name,$show_id);
if(!is_array($shows)) {
echo $shows;
exit();
}
foreach($shows as $show)
{
echo '<tr>
<td colspan="3" class="show">'.$show->ShowName.'</td>
</tr>';
if(is_array($show->Episodes)) {
$season = $show->Episodes[0]->SeasonNumber;
echo '<tr>
<td colspan="3" class="season">Season '.$season.'</td>
</tr>';
}
foreach($show->Episodes as $epi) {
if($epi->SeasonNumber != $season) {
$season = $epi->SeasonNumber;
echo '<tr>
<td colspan="3" class="season">Season '.$season.'</td>
</tr>';
}
echo '<tr';
if($epi->Missing) echo ' style="background-color:#600000;"';
echo '>
<td class="episode">Episode '.$epi->EpisodeNumber.'</td>
<td>'.$epi->EpisodeName.'</td>
<td>';
echo $epi->Missing ? 'Missing!' : 'Yes';
echo '</td>
</tr>';
}
}
}
?>