-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathepisode.php
More file actions
168 lines (149 loc) · 6.73 KB
/
episode.php
File metadata and controls
168 lines (149 loc) · 6.73 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
$anime_id = '238';
$anime_title = "TSI";
if(isset($_GET['id']))
{
$anime_id = $_GET['id'];
$anime_title = $_GET['title'];
}
include('config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="iGodMan">
<meta name="authorUrl" content="#">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/app.css">
<link rel="icon" type="image/x-icon" href="assets/img/icon.png">
<title>Watch Online <?php echo $anime_title; ?> Full Season Episodes in English For Free | TSIAnime | Toonsouthindia.com</title>
</head>
<style>
#summary{
max-height:200px;
overflow: auto;
}
</style>
<body>
<div class="bg-opacity">
<div class="my-5 container">
<?php include('header.php');?>
<div class="row pt-5 mt-5">
<div class="col-lg-4 text-center">
<div class="poster" id="poster">
<div class="img" height="200"></div>
</div>
<div class="watch-btn pt-3">
<a href="watch.php?type=anime&id=<?php echo $anime_id;?>&episode=1&title=<?php echo $anime_title;?>">
<button type="button" name="" id="watch" class="btn btn-danger">Watch Episode</button>
</a>
</div>
</div>
<div class="col-lg-8">
<table class="table table-borderless text-white mt-3">
<tbody>
<tr>
<th>Series Title</th>
<td>:</td>
<td id="title"></td>
</tr>
<tr>
<th>Genre</th>
<td>:</td>
<td id="genre"></td>
</tr>
<tr>
<th>Total Episode</th>
<td>:</td>
<td id="total_episode"></td>
</tr>
<tr>
<th>Status</th>
<td>:</td>
<td id="status"></td>
</tr>
<tr>
<th>Type</th>
<td>:</td>
<td id="type"></td>
</tr>
<tr>
<th>Summary</th>
<td>:</td>
<td id="summary"></td>
</tr>
<tr>
<th>Sub</th>
<td>:</td>
<td id="sub"></td>
</tr>
<tr>
<th>Views</th>
<td>:</td>
<td id="views"><?php
$sql = mysqli_query($conn, "SELECT * FROM anime_views_data WHERE anime_id = $anime_id");
if($view = mysqli_fetch_assoc($sql))
{
echo $view['views'];
}
else{echo '1';}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<input type="text" name="" id="title_input" hidden>
<?php include('footer.php');?>
</div>
</div>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery.min.js"></script>
<script>
$(document).ready(function () {
var anime_id = '<?php echo $anime_id; ?>';
$.getJSON('https://api.gdriveplayer.us/v1/animes/id/' + anime_id,
function (data) {
var title = data[0].title;
$("#poster").html('<img src="'+ data[0].poster +'" width="200" class="Tamilanime_poster">');
$("#title").html(data[0].title);
$("#genre").html(data[0].genre);
$("#total_episode").html(data[0].total_episode);
$("#status").html(data[0].status);
$("#type").html(data[0].type);
$("#summary").html('<p style="max-height:80px; overflow:auto;">'+data[0].summary+'</p>');
$("#sub").html(data[0].sub);
$("#title_input").val(title);
$(".watch-btn").html(`<a href="watch.php?type=anime&id=<?php echo $anime_id;?>&episode=1&tot_eps=`+ data[0].total_episode +`&title=<?php echo $anime_title;?>">
<button type="button" name="" id="watch" class="btn btn-danger col-6">Watch Episode</button>
</a>`);
window.title_in = title;
}).then(function(){
var anime_title = window.title_in;
var views = $("#views").html();
var fd = new FormData();
fd.append('anime_id', anime_id);
fd.append('anime_title', anime_title);
fd.append('views', views);
$.ajax({
url: 'ajax/views.php',
data: fd,
type:'post',
contentType: false,
processData: false,
success: function (response)
{
console.log(response);
}
});
})
});
</script>
</body>
</html>