Rev 172 | Rev 193 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 172 | Rev 192 | ||
---|---|---|---|
1 | <?php header('Content-Type: text/html; charset=UTF-8'); ?> |
1 | <?php header('Content-Type: text/html; charset=UTF-8'); ?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
3 | "http://www.w3.org/TR/html4/strict.dtd"> |
3 | "http://www.w3.org/TR/html4/strict.dtd"> |
4 | <html lang="de"> |
4 | <html lang="de"> |
5 | <head> |
5 | <head> |
6 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
6 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
7 | <title>Seri-o-meter</title> |
7 | <title>Seri-o-meter</title> |
8 | <?php
|
8 | <?php
|
9 | // require_once 'css/lessphp/lessc.inc.php';
|
9 | // require_once 'css/lessphp/lessc.inc.php';
|
10 | // lessc::ccompile('style.less', 'style-less.css');
|
10 | // lessc::ccompile('style.less', 'style-less.css');
|
11 | // require_once 'css/least/LEAST.php';
|
11 | // require_once 'css/least/LEAST.php';
|
12 | // de\pointedears\css\least\LEAST::compile('style.css', 'style-least.css');
|
12 | // de\pointedears\css\least\LEAST::compile('style.css', 'style-least.css');
|
13 | ?>
|
13 | ?>
|
14 | <link rel="stylesheet" href="style.css" type="text/css"> |
14 | <link rel="stylesheet" href="style.css" type="text/css"> |
- | 15 | <script type="text/javascript" src="/scripts/builder.php?src=object"></script> |
|
15 | <script type="text/javascript"> |
16 | <script type="text/javascript"> |
16 | /* |
17 | /* |
17 | function setStyle(obj, style) |
18 | function setStyle(obj, style) |
18 | { |
19 | { |
19 | var styleProperties = Object.getOwnPropertyNames(style); |
20 | var styleProperties = Object.getOwnPropertyNames(style); |
20 | for (var i = styleProperties.length; i--;) |
21 | for (var i = styleProperties.length; i--;) |
21 | { |
22 | { |
22 | var prop = styleProperties[i]; |
23 | var prop = styleProperties[i]; |
23 | obj.style[prop] = style[prop]; |
24 | obj.style[prop] = style[prop]; |
24 | } |
25 | } |
25 | } |
26 | } |
26 | 27 | ||
27 | function editor() |
28 | function editor() |
28 | { |
29 | { |
29 | var div = document.createElement("div"); |
30 | var div = document.createElement("div"); |
30 | setStyle(div, { |
31 | setStyle(div, { |
31 | position: "fixed", |
32 | position: "fixed", |
32 | right: "0", |
33 | right: "0", |
33 | top: "0", |
34 | top: "0", |
34 | width: "200px", |
35 | width: "200px", |
35 | bottom: "0", |
36 | bottom: "0", |
36 | backgroundColor: "#ccc" |
37 | backgroundColor: "#ccc" |
37 | }); |
38 | }); |
38 | document.body.appendChild(div); |
39 | document.body.appendChild(div); |
39 | 40 | ||
40 | function findRules(selectorText) |
41 | function findRules(selectorText) |
41 | { |
42 | { |
42 | var slice = Array.prototype.slice; |
43 | var slice = Array.prototype.slice; |
43 | function toArray(obj) |
44 | function toArray(obj) |
44 | { |
45 | { |
45 | return slice.call(obj); |
46 | return slice.call(obj); |
46 | } |
47 | } |
47 | 48 | ||
48 | var rx = new RegExp("(^|\\s)" + selectorText.replace(/[^$.(){}\[\]]/, "\\$&") + "\\s*$"); |
49 | var rx = new RegExp("(^|\\s)" + selectorText.replace(/[^$.(){}\[\]]/, "\\$&") + "\\s*$"); |
49 | var hits = toArray(document.styleSheets).map(function (styleSheet) { |
50 | var hits = toArray(document.styleSheets).map(function (styleSheet) { |
50 | return toArray(styleSheet.cssRules || styleSheet.rules).filter(function (rule) { |
51 | return toArray(styleSheet.cssRules || styleSheet.rules).filter(function (rule) { |
51 | return rx.test(rule.selectorText); |
52 | return rx.test(rule.selectorText); |
52 | }); |
53 | }); |
53 | }).filter(function (hit) { |
54 | }).filter(function (hit) { |
54 | return hit.length > 0; |
55 | return hit.length > 0; |
55 | }); |
56 | }); |
56 | 57 | ||
57 | return Array.prototype.concat.apply([], hits); |
58 | return Array.prototype.concat.apply([], hits); |
58 | } |
59 | } |
59 | 60 | ||
60 | var afterRule = findRules(".heroes .o::after"); |
61 | var afterRule = findRules(".heroes .o::after"); |
61 | var rxBgImage = new RegExp( |
62 | var rxBgImage = new RegExp( |
62 | "{RADIALGRADIENT}\\(\\s*({POSITION}\\s*,\\s*)?({SHAPE}\\s*,\\s*)?{COLORSTOP}(\\s*,\\s*{COLORSTOP})+\\s*\\)" |
63 | "{RADIALGRADIENT}\\(\\s*({POSITION}\\s*,\\s*)?({SHAPE}\\s*,\\s*)?{COLORSTOP}(\\s*,\\s*{COLORSTOP})+\\s*\\)" |
63 | .replace(/\{RADIALGRADIENT\}/g, "(-(webkit|moz|o|ms)-)?radial-gradient") |
64 | .replace(/\{RADIALGRADIENT\}/g, "(-(webkit|moz|o|ms)-)?radial-gradient") |
64 | .replace(/\{POSITION\}/g, "{LENGTH}(\\s+{LENGTH})?") |
65 | .replace(/\{POSITION\}/g, "{LENGTH}(\\s+{LENGTH})?") |
65 | .replace(/\{SHAPE\}/g, "\\s*((circle|ellipse)(\\s+({EDGE}))?|{LENGTH}(\\s+{LENGTH}))") |
66 | .replace(/\{SHAPE\}/g, "\\s*((circle|ellipse)(\\s+({EDGE}))?|{LENGTH}(\\s+{LENGTH}))") |
66 | .replace(/\{EDGE\}/g, "cover|closest-corner|closest-side|farthest-corner|farthest-side") |
67 | .replace(/\{EDGE\}/g, "cover|closest-corner|closest-side|farthest-corner|farthest-side") |
67 | .replace(/\{COLORSTOP\}/g, "{COLOR}(\\s*{PERCENTAGE})?") |
68 | .replace(/\{COLORSTOP\}/g, "{COLOR}(\\s*{PERCENTAGE})?") |
68 | .replace(/\{LENGTH\}/g, "{NUMBER}{UNIT}") |
69 | .replace(/\{LENGTH\}/g, "{NUMBER}{UNIT}") |
69 | .replace(/\{COLOR\}/g, "({COLORNAME}|{RGB}|{RGBA})") |
70 | .replace(/\{COLOR\}/g, "({COLORNAME}|{RGB}|{RGBA})") |
70 | .replace(/\{RGB\}/g, "rgb\\s*\\(\\s*{COLORCOMP}(\\s*,\\s*{COLORCOMP}){2}\\s*\\)") |
71 | .replace(/\{RGB\}/g, "rgb\\s*\\(\\s*{COLORCOMP}(\\s*,\\s*{COLORCOMP}){2}\\s*\\)") |
71 | .replace(/\{RGBA\}/g, "rgba\\s*\\(\\s*{COLORCOMP}(\\s*,\\s*{COLORCOMP}){2}\\s*,\\s*{PERCENTAGE}\\s*\\)") |
72 | .replace(/\{RGBA\}/g, "rgba\\s*\\(\\s*{COLORCOMP}(\\s*,\\s*{COLORCOMP}){2}\\s*,\\s*{PERCENTAGE}\\s*\\)") |
72 | .replace(/\{COLORCOMP\}/g, "{NUMBER}%?") |
73 | .replace(/\{COLORCOMP\}/g, "{NUMBER}%?") |
73 | .replace(/\{COLORNAME\}/g, "black|transparent") |
74 | .replace(/\{COLORNAME\}/g, "black|transparent") |
74 | .replace(/\{PERCENTAGE\}/g, "{NUMBER}%?") |
75 | .replace(/\{PERCENTAGE\}/g, "{NUMBER}%?") |
75 | .replace(/\{NUMBER\}/g, "\\d+") |
76 | .replace(/\{NUMBER\}/g, "\\d+") |
76 | .replace(/\{UNIT\}/g, "(px|%|em|ex|pt)") |
77 | .replace(/\{UNIT\}/g, "(px|%|em|ex|pt)") |
77 | , "g"); |
78 | , "g"); |
78 | console.log(rxBgImage); |
79 | console.log(rxBgImage); |
79 | var value = afterRule[0].style.getPropertyValue("background-image"); |
80 | var value = afterRule[0].style.getPropertyValue("background-image"); |
80 | console.log(value); |
81 | console.log(value); |
81 | var backgroundImages = value.match(rxBgImage); |
82 | var backgroundImages = value.match(rxBgImage); |
82 | console.log(backgroundImages); |
83 | console.log(backgroundImages); |
83 | } |
84 | } |
84 | */ |
85 | */ |
- | 86 | var _getProperty; |
|
- | 87 | ||
85 | function net() |
88 | function net() |
86 | { |
89 | { |
87 | var map = { |
90 | var map = { |
88 | "gene-roddenberry's-andromeda": "andromeda", |
91 | "gene-roddenberry's-andromeda": "andromeda", |
89 | "battlestar-galactica-2004": "battlestar-galactica", |
92 | "battlestar-galactica-2004": "battlestar-galactica", |
90 | "battlestar-galactica-2004-de": "battlestar-galactica", |
93 | "battlestar-galactica-2004-de": "battlestar-galactica", |
91 | "buffy-the-vampire-slayer": "buffy", |
94 | "buffy-the-vampire-slayer": "buffy", |
92 | "lois-clark-the-new-adventures-of-superman": "lois-clark-the-new-adventures-of-superman-1993", |
95 | "lois-clark-the-new-adventures-of-superman": "lois-clark-the-new-adventures-of-superman-1993", |
93 | get: function (key) { |
96 | }; |
- | 97 | ||
94 | return this.hasOwnProperty(key) ? this[key] : key; |
98 | var translations = { |
95 | } |
99 | "akte-x": "the-x-files", |
96 | }; |
100 | }; |
97 | 101 | ||
98 | var f = function (e) { |
102 | var f = function (e) { |
99 | if (e && e.shiftKey && e.ctrlKey) |
103 | if (e && e.shiftKey && e.ctrlKey) |
100 | { |
104 | { |
101 | var key = map.get(this.textContent.toLowerCase() |
105 | var key = this.textContent.toLowerCase() |
102 | .replace(/[&:.,()–]/g, "").replace(/\s+/g, "-").replace("-de", "")); |
106 | .replace(/[&:.,()–]/g, "").replace(/\s+/g, "-") |
- | 107 | .replace("-de", ""); |
|
- | 108 | ||
- | 109 | if (typeof _getProperty == "undefined") |
|
- | 110 | { |
|
- | 111 | _getProperty = jsx.object.getProperty; |
|
- | 112 | } |
|
- | 113 | ||
- | 114 | key = _getProperty(map, key, key); |
|
- | 115 | ||
- | 116 | if (e.altKey) |
|
- | 117 | { |
|
- | 118 | var baseURL = "http://serienjunkies.org/serie/"; |
|
- | 119 | } |
|
- | 120 | else |
|
- | 121 | { |
|
- | 122 | key = _getProperty(translations, key, key).replace(/-/g, "_"); |
|
- | 123 | baseURL = "http://www.tubeplus.me/search/tv-shows/"; |
|
- | 124 | } |
|
- | 125 | ||
103 | window.open("http://serienjunkies.org/serie/" + encodeURIComponent(key)); |
126 | window.open(baseURL + encodeURIComponent(key)); |
- | 127 | ||
104 | e.preventDefault(); |
128 | e.preventDefault(); |
105 | } |
129 | } |
106 | }; |
130 | }; |
107 | 131 | ||
108 | try |
132 | try |
109 | { |
133 | { |
110 | for (var a = document.links, i = a.length; i--;) |
134 | for (var a = document.links, i = a.length; i--;) |
111 | { |
135 | { |
112 | var e = a[i]; |
136 | var e = a[i]; |
113 | e.addEventListener("click", f, false); |
137 | e.addEventListener("click", f, false); |
114 | } |
138 | } |
115 | } |
139 | } |
116 | catch (e) {} |
140 | catch (e) {} |
117 | } |
141 | } |
118 | </script> |
142 | </script> |
119 | </head> |
143 | </head> |
120 | 144 | ||
121 | <body onload="net() // editor()"> |
145 | <body onload="net() // editor()"> |
122 | <h1 class="hidden">Seri-o-meter</h1> |
146 | <h1 class="hidden">Seri-o-meter</h1> |
123 | <?php // var_dump($serien); ?> |
147 | <?php // var_dump($serien); ?> |
124 | <table> |
148 | <table> |
125 | <?php
|
149 | <?php
|
126 | if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') |
150 | if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') |
127 | {
|
151 | {
|
128 | function strftime_portable ($format, $timestamp = null) |
152 | function strftime_portable ($format, $timestamp = null) |
129 | {
|
153 | {
|
130 | if ($timestamp === null) |
154 | if ($timestamp === null) |
131 | {
|
155 | {
|
132 | $timestamp = time(); |
156 | $timestamp = time(); |
133 | }
|
157 | }
|
134 | 158 | ||
135 | $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format); |
159 | $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format); |
136 | return strftime($format, $timestamp); |
160 | return strftime($format, $timestamp); |
137 | }
|
161 | }
|
138 | }
|
162 | }
|
139 | else
|
163 | else
|
140 | {
|
164 | {
|
141 | function strftime_portable ($format, $timestamp = null) |
165 | function strftime_portable ($format, $timestamp = null) |
142 | {
|
166 | {
|
143 | if ($timestamp === null) |
167 | if ($timestamp === null) |
144 | {
|
168 | {
|
145 | $timestamp = time(); |
169 | $timestamp = time(); |
146 | }
|
170 | }
|
147 | 171 | ||
148 | return strftime($format, $timestamp); |
172 | return strftime($format, $timestamp); |
149 | }
|
173 | }
|
150 | }
|
174 | }
|
151 | 175 | ||
152 | setlocale(LC_ALL, 'de_CH.UTF-8'); |
176 | setlocale(LC_ALL, 'de_CH.UTF-8'); |
- | 177 | $this->setLanguage('de'); |
|
153 | 178 | ||
154 | $min_series = $this->min_series; |
179 | $min_series = $this->min_series; |
155 | foreach ($this->serien as $name => $serie) |
180 | foreach ($this->serien as $name => $serie) |
156 | {
|
181 | {
|
157 | ?>
|
182 | ?>
|
158 | <tr> |
183 | <tr> |
159 | <td style="text-align: center"><?php
|
184 | <td style="text-align: center"><?php
|
160 | $recommended = ($name === $min_series); |
185 | $recommended = ($name === $min_series); |
161 | if ($recommended) { ?>→<?php } |
- | |
162 | if (isset($serie['ignore']) && $serie['ignore']) |
186 | if (isset($serie['ignore']) && $serie['ignore']) |
163 | {
|
187 | {
|
164 | ?>→<span style="color: red; font-weight: bold">⃠</span><?php |
188 | ?>▮▮<?php |
- | 189 | }
|
|
- | 190 | else if ($recommended) |
|
- | 191 | {
|
|
- | 192 | ?>→<?php |
|
165 | }
|
193 | }
|
166 | ?></td>
|
194 | ?></td>
|
167 | <th<?php if ($recommended) { ?> class="recommended"<?php } ?>><?php |
195 | <th<?php if ($recommended) { ?> class="recommended"<?php } ?>><?php |
168 | $ep_list = isset($serie['episode_list']); |
196 | $ep_list = isset($serie['episode_list']); |
169 | if ($ep_list) |
197 | if ($ep_list) |
170 | {
|
198 | {
|
171 | ?><a href="<?php |
199 | ?><a href="<?php |
172 | echo htmlspecialchars($serie['episode_list']); |
200 | echo $this->escape($serie['episode_list']); |
173 | ?>" title="Episodenliste"><?php |
201 | ?>" title="<?php echo $this->escape($this->_('Episode list')); ?>"><?php |
174 | }
|
202 | }
|
175 | echo $name; |
203 | echo $name; |
176 | if ($ep_list) { ?></a><?php } |
204 | if ($ep_list) { ?></a><?php } |
177 | ?><br>
|
205 | ?><br>
|
178 | <span style="font-weight: normal"><?php
|
206 | <span style="font-weight: normal"><?php
|
179 | if (array_key_exists('channel', $serie)) echo $serie['channel']; |
207 | if (array_key_exists('channel', $serie)) echo $serie['channel']; |
180 | 208 | ||
181 | if (array_key_exists('showtimes', $serie)) |
209 | if (array_key_exists('showtimes', $serie)) |
182 | {
|
210 | {
|
183 | echo ', ' . $serie['showtimes']; |
211 | echo ', ' . $serie['showtimes']; |
184 | }
|
212 | }
|
185 | ?></span></th>
|
213 | ?></span></th>
|
186 | <td<?php if ($recommended) { ?> class="recommended"<?php } ?>> |
214 | <td<?php if ($recommended) { ?> class="recommended"<?php } ?>> |
187 | <div>Gesehen: <?php
|
215 | <div><?php echo $this->_('Watched:'); ?> <?php |
188 | echo implode(', ', $serie['coverage']) . ' ('. $serie['count']; |
216 | echo implode(', ', $serie['coverage']) . ' ('. $serie['count']; |
189 | ?> von <?php $total = $serie['total']; echo $total; ?> Episoden)<?php |
217 | ?> von <?php $total = $serie['total']; echo $total; ?> Episoden)<?php |
190 | if (isset($serie['last_seen'])) |
218 | if (isset($serie['last_seen'])) |
191 | {
|
219 | {
|
192 | ?>; zuletzt am <?php |
220 | ?>; zuletzt am <?php |
193 | echo utf8_encode(strftime_portable('%A, %e. %B %Y %H:%M %z', $serie['last_seen'])); |
221 | echo utf8_encode(strftime_portable('%A, %e. %B %Y %H:%M %z', $serie['last_seen'])); |
194 | }
|
222 | }
|
195 | ?></div>
|
223 | ?></div>
|
196 | <div class="box"> |
224 | <div class="box"> |
197 | <div class="meter" |
225 | <div class="meter" |
198 | style="width: <?php
|
226 | style="width: <?php
|
199 | $percentage = $serie['percentage']; |
227 | $percentage = $serie['percentage']; |
200 | echo $percentage; ?>%" |
228 | echo $percentage; ?>%" |
201 | ></div> |
229 | ></div> |
202 | <?php
|
230 | <?php
|
203 | if (array_key_exists('seasons', $serie)) |
231 | if (array_key_exists('seasons', $serie)) |
204 | {
|
232 | {
|
205 | $offset = 0; |
233 | $offset = 0; |
206 | foreach ($serie['seasons'] as $key => $season) |
234 | foreach ($serie['seasons'] as $key => $season) |
207 | {
|
235 | {
|
208 | ?>
|
236 | ?>
|
209 | <div class="season" |
237 | <div class="season" |
210 | <?php
|
238 | <?php
|
211 | if (!is_numeric($key)) |
239 | if (!is_numeric($key)) |
212 | {
|
240 | {
|
213 | ?> title="<?php echo htmlspecialchars($key); ?>"<?php |
241 | ?> title="<?php echo $this->escape($key); ?>"<?php |
214 | }
|
242 | }
|
215 | ?>
|
243 | ?>
|
216 | style="<?php
|
244 | style="<?php
|
217 | if ($key === 0) |
245 | if ($key === 0) |
218 | {
|
246 | {
|
219 | ?>border-left: none; <?php |
247 | ?>border-left: none; <?php |
220 | }
|
248 | }
|
221 | ?>left: <?php echo $offset; ?>%; |
249 | ?>left: <?php echo $offset; ?>%; |
222 | width: <?php echo $season / $total * 100; ?>%" |
250 | width: <?php echo $season / $total * 100; ?>%" |
223 | ><?php
|
251 | ><?php
|
224 | if (is_numeric($key)) |
252 | if (is_numeric($key)) |
225 | {
|
253 | {
|
226 | echo ($key + 1); |
254 | echo ($key + 1); |
227 | }
|
255 | }
|
228 | else
|
256 | else
|
229 | {
|
257 | {
|
230 | echo $key; |
258 | echo $key; |
231 | }
|
259 | }
|
232 | ?></div>
|
260 | ?></div>
|
233 | <?php
|
261 | <?php
|
234 | $offset += round($season / $total * 100, 1); |
262 | $offset += round($season / $total * 100, 1); |
235 | }
|
263 | }
|
236 | }
|
264 | }
|
237 | 265 | ||
238 | if (isset($serie['episodes'])) |
266 | if (isset($serie['episodes'])) |
239 | {
|
267 | {
|
240 | $prevNumber = null; |
268 | $prevNumber = null; |
241 | foreach ($serie['episodes'] as $episode => $description) |
269 | foreach ($serie['episodes'] as $episode => $description) |
242 | {
|
270 | {
|
243 | $episode_str = $episode; |
271 | $episode_str = $episode; |
244 | if (isset($serie['season_ranges']) && is_array($serie['season_ranges'])) |
272 | if (isset($serie['season_ranges']) && is_array($serie['season_ranges'])) |
245 | {
|
273 | {
|
246 | foreach ($serie['season_ranges'] as $season_key => $season_range) |
274 | foreach ($serie['season_ranges'] as $season_key => $season_range) |
247 | {
|
275 | {
|
248 | if ($episode >= $season_range[0] && $episode <= $season_range[1]) |
276 | if ($episode >= $season_range[0] && $episode <= $season_range[1]) |
249 | {
|
277 | {
|
250 | $episode_str = sprintf("%u (%ux%02u)", $episode, $season_key, $episode - $season_range[0] + 1); |
278 | $episode_str = sprintf("%u (%ux%02u)", $episode, $season_key, $episode - $season_range[0] + 1); |
251 | }
|
279 | }
|
252 | }
|
280 | }
|
253 | }
|
281 | }
|
254 | ?>
|
282 | ?>
|
255 | <div class="coverage" |
283 | <div class="coverage" |
256 | style="<?php
|
284 | style="<?php
|
257 | if (is_null($prevNumber) || $prevNumber !== $episode - 1) |
285 | if (is_null($prevNumber) || $prevNumber !== $episode - 1) |
258 | {
|
286 | {
|
259 | ?>border-left: 1px solid rgba(0, 218, 0, 0.5); <?php |
287 | ?>border-left: 1px solid rgba(0, 218, 0, 0.5); <?php |
260 | }
|
288 | }
|
261 | ?>
|
289 | ?>
|
262 | border-right: 1px solid rgba(0, 218, 0, 0.5); |
290 | border-right: 1px solid rgba(0, 218, 0, 0.5); |
263 | background-color: transparent; |
291 | background-color: transparent; |
264 | left: <?php echo ($episode - 1) / $total * 100; ?>%; |
292 | left: <?php echo ($episode - 1) / $total * 100; ?>%; |
265 | width: <?php echo 1 / $total * 100; ?>%" |
293 | width: <?php echo 1 / $total * 100; ?>%" |
266 | title="<?php
|
294 | title="<?php
|
267 | echo "{$episode_str}: " . htmlspecialchars($description); |
295 | echo "{$episode_str}: " . $this->escape($description); |
268 | ?>"></div><?php |
296 | ?>"></div><?php |
269 | $prevNumber = $episode; |
297 | $prevNumber = $episode; |
270 | }
|
298 | }
|
271 | }
|
299 | }
|
272 | 300 | ||
273 | if (isset($serie['seen'])) |
301 | if (isset($serie['seen'])) |
274 | {
|
302 | {
|
275 | foreach ($serie['seen'] as $range) |
303 | foreach ($serie['seen'] as $range) |
276 | {
|
304 | {
|
277 | if (!is_array($range)) |
305 | if (!is_array($range)) |
278 | {
|
306 | {
|
279 | $range = array($range, $range); |
307 | $range = array($range, $range); |
280 | }
|
308 | }
|
281 | /*
|
309 | /*
|
282 | for ($i = $episode[0]; $i < $episode[1]; ++$i)
|
310 | for ($i = $episode[0]; $i < $episode[1]; ++$i)
|
283 | {
|
311 | {
|
284 | ?>
|
312 | ?>
|
285 | <div class="coverage"
|
313 | <div class="coverage"
|
286 | style="left: <?php echo ($episode[0] - 1) / $total * 100; ?>%;
|
314 | style="left: <?php echo ($episode[0] - 1) / $total * 100; ?>%;
|
287 | width: <?php echo ($episode[1] - $episode[0] + 1) / $total * 100; ?>%"
|
315 | width: <?php echo ($episode[1] - $episode[0] + 1) / $total * 100; ?>%"
|
288 | ></div>
|
316 | ></div>
|
289 | <?php
|
317 | <?php
|
290 | }
|
318 | }
|
291 | }
|
319 | }
|
292 | else
|
320 | else
|
293 | */
|
321 | */
|
294 | 322 | ||
295 | for ($episode = $range[0]; $episode <= $range[1]; ++$episode) |
323 | for ($episode = $range[0]; $episode <= $range[1]; ++$episode) |
296 | {
|
324 | {
|
297 | $episode_str = $episode; |
325 | $episode_str = $episode; |
298 | if (isset($serie['season_ranges']) && is_array($serie['season_ranges'])) |
326 | if (isset($serie['season_ranges']) && is_array($serie['season_ranges'])) |
299 | {
|
327 | {
|
300 | foreach ($serie['season_ranges'] as $season_key => $season_range) |
328 | foreach ($serie['season_ranges'] as $season_key => $season_range) |
301 | {
|
329 | {
|
302 | if ($episode >= $season_range[0] && $episode <= $season_range[1]) |
330 | if ($episode >= $season_range[0] && $episode <= $season_range[1]) |
303 | {
|
331 | {
|
304 | $episode_str = sprintf("%u (%ux%02u)", $episode, $season_key, $episode - $season_range[0] + 1); |
332 | $episode_str = sprintf("%u (%ux%02u)", $episode, $season_key, $episode - $season_range[0] + 1); |
305 | }
|
333 | }
|
306 | }
|
334 | }
|
307 | }
|
335 | }
|
308 | ?>
|
336 | ?>
|
309 | <div class="coverage" |
337 | <div class="coverage" |
310 | style="left: <?php echo ($episode - 1) / $total * 100; ?>%; |
338 | style="left: <?php echo ($episode - 1) / $total * 100; ?>%; |
311 | width: <?php echo 1 / $total * 100; ?>%" |
339 | width: <?php echo 1 / $total * 100; ?>%" |
312 | <?php
|
340 | <?php
|
313 | if (isset($serie['episodes']) && array_key_exists($episode, $serie['episodes'])) |
341 | if (isset($serie['episodes']) && array_key_exists($episode, $serie['episodes'])) |
314 | {
|
342 | {
|
315 | ?>title="<?php |
343 | ?>title="<?php |
316 | echo "{$episode_str}: " . htmlspecialchars($serie['episodes'][$episode]); |
344 | echo "{$episode_str}: " . $this->escape($serie['episodes'][$episode]); |
317 | ?>"<?php |
345 | ?>"<?php |
318 | }
|
346 | }
|
319 | ?>></div>
|
347 | ?>></div>
|
320 | <?php
|
348 | <?php
|
321 | }
|
349 | }
|
322 | }
|
350 | }
|
323 | }
|
351 | }
|
324 | ?>
|
352 | ?>
|
325 | <span class="percentage"><?php echo round($percentage, 1); ?>%</span> |
353 | <span class="percentage"><?php echo round($percentage, 1); ?>%</span> |
326 | </div> |
354 | </div> |
327 | </td> |
355 | </td> |
328 | </tr> |
356 | </tr> |
329 | <?php
|
357 | <?php
|
330 | }
|
358 | }
|
331 | ?>
|
359 | ?>
|
332 | </table> |
360 | </table> |
333 | </body> |
361 | </body> |
334 | </html> |
- | |
335 | 362 | </html> |
|
- | 363 |