-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathyoutubethumb.php
More file actions
31 lines (27 loc) · 865 Bytes
/
youtubethumb.php
File metadata and controls
31 lines (27 loc) · 865 Bytes
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
<?php
header( 'Content-Encoding: UTF-8' );
header( 'Content-Type: image/svg+xml' );
include_once( 'includes/session.php' );
include_once( 'includes/functions_avatars.php' );
include_once( 'includes/functions_steam.php' );
include_once( 'includes/functions_cast.php' );
include_once( 'includes/functions_castvideo.php' );
// are we logged in? no → leave
if ( ! login_check() ) {
header( 'Location: /' );
exit();
} else {
$me = $_SESSION['u'];
}
// are we admin? no → leave
if ( in_array( $me, getAdmins() ) ) {
} else {
header( 'Location: /' );
exit();
}
/* User wanting to see a specific cast, and shownotes file exists */
if ( $season !== "00" && $episode !== "00" ) {
// We do no testing here, as this function will return an image even if
// this episode does not exist (it will test the user, though!)
echo generateImage( $season, $episode );
}