-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontroller.php
More file actions
157 lines (148 loc) · 5.64 KB
/
Copy pathcontroller.php
File metadata and controls
157 lines (148 loc) · 5.64 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
<?php
include("function.php");
$action = $_REQUEST["action"];
switch($action) {
case "add_anime":
try {
$data = $_POST["source"];
if(empty(@$_POST["source"]))
throw new Exception("Nu am găsit nici-o sursă. Cred că ai uitat să completezi.");
$ep = $_POST["eps_name"];
if(empty($ep) || strlen($ep) < 7)
throw new Exception("Numele episodului trebuie să fie completat obligatoriu!");
if(!empty(@$_POST["inpart"]))
$part = true;
else
$part = false;
if(!empty(@$_POST["beta"]))
$beta = true;
else
$beta = false;
if(!empty(@$_POST["manga"]))
$manga = true;
else
$manga = false;
$whos = array(
"tl"=>(!empty($_POST["tl"]) ? $_POST["tl"] : "Unknown"),
"tlc"=>(!empty($_POST["tlc"]) ? $_POST["tlc"] : "Unknown"),
"edit"=>(!empty($_POST["edit"]) ? $_POST["edit"] : "Unknown"),
"enc"=>(!empty($_POST["enc"]) ? $_POST["enc"] : "Unknown"));
if(!empty(@$_FILES['img']["tmp_name"])){
$handle = new upload($_FILES['img']);
$fn = time().'image_resized';
$dir = __DIR__ . (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? '//temp_img//' : '/temp_img/');
if($handle->uploaded) {
$handle->file_new_name_body = $fn;
$handle->image_resize = true;
$handle->file_force_extension = true;
$handle->image_convert = 'jpg';
$handle->file_new_name_ext = 'jpg';
$handle->image_x = 476;
$handle->image_y = 264;
$handle->process($dir);
if($handle->processed) {
$handle->clean();
$read = fopen($dir.$fn.".jpg", "r");
$ds = fread($read, filesize($dir.$fn.".jpg"));
$pvars=array('image' => base64_encode($ds));
unlink($dir.$fn.".jpg");
}
}
}
$id = $db->register_eps($ep, $ws->ws($data, $whos, $beta, $part), $sh->sh($data, $whos, $pvars, $beta, $part, $ep));
header("Location: show.php?id=$id&meta=new");
}
catch (Exception $e) {
header("Location: index.php?status=error&msg=".$e->getMessage());
}
break;
case "flro":
try {
$release = $_POST["releasetype"];
switch($release) {
case"ws":
$release = "TL..........: [url=https://www.wien-subs.ro/]Echipa de Traducători Wien-Subs[/url]
Enc.........: [url=https://www.wien-subs.ro/]Echipa de Encodări Wien-Subs[/url]
TLC.........: [url=https://www.wien-subs.ro/]Echipa de Corectare Wien-Subs[/url]
FanSub......: [url=https://www.wien-subs.ro/]Wien-Subs România[/url]";
break;
case"sh":
$release = "TL..........: [url=https://shinobifansub.com/]Echipa de Traducători Shinobi[/url]
Enc.........: [url=https://shinobifansub.com/]Echipa de Encodări Shinobi[/url]
TLC.........: [url=https://shinobifansub.com/]Echipa de Corectare Shinobi[/url]
FanSub......: [url=https://shinobifansub.com/]Shinobi Fansub[/url]";
break;
case"both":
$release = "TL..........: [url=https://shinobifansub.com/]Shinobi[/url] & [url=https://www.wien-subs.ro/]Wien-Subs[/url]
Enc.........: [url=https://shinobifansub.com/]Shinobi[/url] & [url=https://www.wien-subs.ro/]Wien-Subs[/url]
TLC.........: [url=https://shinobifansub.com/]Shinobi[/url] & [url=https://www.wien-subs.ro/]Wien-Subs[/url]
FanSub......: [url=https://shinobifansub.com/]Shinobi Fansub[/url] & [url=https://www.wien-subs.ro/]Wien-Subs România[/url]";
break;
default:
$release = "";
break;
}
$mi = $common->mediainfo($_POST["mediainfo"]);
$mal = $common->mal($_POST["mal"]);
if(isset($_POST["desc"]) == true && strlen($_POST["desc"]) > 3)
$desc = $_POST["desc"];
else
$desc = $mal["desc"];
$var = null;
$keep= '
[center][size=4][b][u]'.$mal["name"].'[/u][/b][/size]
[img]'.$mal["image"].'[/img]
[/center]
[b]Type[/b]: TV
[b]Synonims[/b]: '.$mal["alias"].'
[b]Episodes[/b]: [u]'.$mal["eps"].'[/u]
[b]Status[/b]: [u]Finished Airing[/u]
[b]Aired[/b]: [u]'.$mal["aried"].'[/u]
[b]Studios[/b]: [u]'.$mal["studio"].'[/u]
[b]Source[/b]: [u]'.$mal["source"].'[/u]
[b]Genres[/b]: [u]'.$mal["gen"].'[/u]
[b]Duration[/b]: [u]'.$mal["dura"].'[/u]
[b]Rating[/b]: [u]'.$mal["rating"].'[/u]
[b]MyAnimeList[/b]: '.$mal["url"].'
[b]IMDB[/b]: '.$_POST["imdb"].'
[b][color=red]Torent Info[/color][/b]
General
Filename.......: '.ucwords($mi["fname"]).'
Container......: '.strtoupper($mi["container"]).'
Duration.......: '.$mi["duration"].'
Size...........: '.$mi["size"].'
Video
Codec..........: [color=orange]'.strtoupper($mi["codec"]).'[/color] / [color=orange]'.$mi["bit"].'[/color]
Type...........: Progressive
Resolution.....: [u]'.$mi["width"].'[/u]x[u]'.$mi["height"].'[/u]
Aspect ratio...: '.$mi["aspect"].'
Bit rate.......: '.$mi["bitrate"].'
Audio#1
Format.........: [color=#4bb702]'.$mi["audiof"].'[/color]
Channels.......: '.strtoupper($mi["ch"]).' channels
Bit rate.......: '.$mi["abitrate"].' Kbps
Language.......: Japanese
Subtitle#1
Language....: [color=red]Română[/color]
Type........: '.$_POST["subtype"].'
'.$release.'
[center][quote=[b][color=red]Descriere[/color][/b]]
[i][b][color=teal]'.$desc.'[/i][/quote][/b][/color]
[b]Screens[/b]
'.$_POST["ss"].'
[videohd=http://www.youtube.com/watch?v='.$common->youtube_id_from_url($_POST["ytb"]).']
[/center]
';
$id = $db->register_eps("FileList: ".$mal["name"], $keep, str_replace(" ", ".", $mal["name"]).".".$_POST["types"]);
sleep(1);
header("Location: show.php?id=$id&meta=new");
}
catch (Exception $e) {
}
break;
case "search":
die($common->search($_POST["aname"]));
break;
default:
return 0;
}