-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtab_moveepisode.php
95 lines (80 loc) · 2.82 KB
/
tab_moveepisode.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
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
## Get this series' information
$seriesid = mysql_real_escape_string($seriesid);
$query = "SELECT * FROM games WHERE id=$seriesid";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$series = mysql_fetch_object($result);
## Get this episode's information
$id = mysql_real_escape_string($id);
$query = "SELECT * FROM tvepisodes WHERE id=$id";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$episode = mysql_fetch_object($result);
## Get the season information
global $season;
$query = "SELECT * FROM tvseasons WHERE seriesid=$seriesid ORDER BY season";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($db = mysql_fetch_object($result)) {
if ($db->id == $episode->seasonid) {
$season = "$db->season";
}
}
if ($lid) {
$urllang = "&lid=$lid";
}
?>
<div id="bannerrotator">
<?=bannerdisplay($seriesid)?>
</div>
<table cellspacing="5" cellpadding="0" border="0" width="100%">
<tr>
<td valign="top" width="100%">
<div class="titlesection">
<h1><a href="/?tab=series&id=<?=$series->id?><?=$urllang?>"><?=stripslashes($series->SeriesName);?></a></h1>
<?php
if ($season == 0) {
echo "<h2><a href=\"/?tab=season&seriesid=$series->id&seasonid=$season->id$urllang\">Specials</a></h2>";
}
else {
echo "<h2><a href=\"/?tab=season&seriesid=$series->id&seasonid=$season->id$urllang\">Season $season</a></h2>";
}
?>
<h3><?=$episode->EpisodeNumber?> : <?=stripslashes($episode->EpisodeName);?></h3>
</div>
<div class="section">
<form action="<?=$fullurl?>" method="POST" name="episodeform">
<div id="red"><?=$errormessage?></div>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" id="datatable">
<tr>
<td width="100">Season Number:</td>
<td align="left">
<select name="seasonid" size="1">
<?php ## Display the seasons
$query = "SELECT * FROM tvseasons WHERE seriesid=$seriesid ORDER BY season";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($db = mysql_fetch_object($result)) {
if ($db->id == $episode->seasonid) {
echo "<option value='$db->id' selected>Season : $db->season</option>";
}
else{
echo "<option value='$db->id'>Season : $db->season</option>";
}
}
?>
</select>
</td>
<?php if ($adminuserlevel == 'ADMINISTRATOR') { ?>
<td style="text-align: left">
<div class="float-right">
<input type="submit" name="function" value="Move Episode" class="submit">
<?php $link = "/?tab=episode&seriesid=$seriesid&seasonid=$seasonid&id=$id$urllang";
echo '<INPUT TYPE="BUTTON" VALUE="Return To Episode Info" ONCLICK="window.location.href=\''.$link.'\'"> '; ?>
</div>
</td>
</tr>
<?php } ?>
</table>
</form>
</div>
</td>
</tr>
</table>