forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannel.php
57 lines (56 loc) · 2.24 KB
/
channel.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
<?php
global $global, $config, $isChannel;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
$isChannel = 1;
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
session_write_close();
$user_id = isChannel();
$user = new User($user_id);
if ($user->getStatus() === 'i') {
forbiddenPage(__("This user is inactive"));
}
$isMyChannel = $user_id == User::getId();
$channelPassword = User::getProfilePassword($user_id);
if (!empty($channelPassword)) {
forbiddenPage('This channel is password protected', false, $channelPassword);
}
AVideoPlugin::getChannel($user_id, $user);
$channelFluidLayout = true;
// verify the width to match with the old profile bg image
$bgImagePath = $global['systemRootPath'] . $user->getBackgroundURL();
$bgSize = getimagesize($bgImagePath);
if ($bgSize[0] < 2048) {
$channelFluidLayout = false;
}
$metaDescription = " Channel - {$_GET['channelName']}";
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo @$_GET['channelName'] . $config->getPageTitleSeparator() . __("Channel") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'view/channelHead.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?> userChannel">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container<?php echo!empty($channelFluidLayout) ? "-fluid" : ""; ?>">
<?php
include $global['systemRootPath'] . 'view/channelBody.php';
?>
</div>
<?php
//include $global['systemRootPath'] . 'view/include/footer.php';
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixFooter.php';
?>
</body>
</html>