forked from taylorhakes/Plex-TV-Analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
82 lines (75 loc) · 2.07 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<title>Missing Television Episodes</title>
<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="/js/jquery.treeTable.min.js"></script>
<link rel="stylesheet" href="/css/tv.css" type="text/css" />
<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css" />
<script type="text/javascript">
function SubmitForm() {
var show_id = "";
var show = "";
var lang = "";
let elems = document.querySelectorAll("#showSelector > option");
for (i in elems) {
if (elems[i].innerHTML.startsWith(" ")) {
if (elems[i].selected) {
show = elems[i].innerHTML.substring(24);
show_id = elems[i].value;
break;
}
} else {
lang = elems[i].value;
}
}
if (show_id === "" || show === "" || lang === "")
return;
$("#resultpart").html('<tr><td /><td><center><div class="loader"></div></center></td><td /></tr>');
$.post('results.php', { show_id: show_id, show: show, lang: lang},
function(data) {
$('#resultpart').html(data);
});
return false;
}
</script>
</head>
<body>
<div class="row">
<div style="margin: auto;">
<form class="form-inline">
<?php
include_once('tvclass.php');
echo '
<div class="form-group mb-2 mt-2">
<label for="showSelector" class="mr-4">Select a TVShow: </label>
<select class="form-control" id="showSelector">';
foreach(TVAnalyzer::GetUserShows() as $key => $value)
{
echo '<option value="'.$value.'">'.$key.'</option>';
}
echo ' </select>
<input value="Submit" type="button" name="getshows" id="getshows" class="btn btn-primary ml-2" onClick="SubmitForm(); return false;" />
</div>';
?>
</form>
</div>
</div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<table cellspacing="0" id="tvtable" class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>Episode Name</th>
<th>Available</th>
</tr>
</thead>
<tbody id="resultpart">
</tbody>
</table>
</div>
</body>
</html>