mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
67 lines
2.3 KiB
PHP
67 lines
2.3 KiB
PHP
<?php
|
|
global $global, $config;
|
|
if (!isset($global['systemRootPath'])) {
|
|
require_once '../videos/configuration.php';
|
|
}
|
|
|
|
if (empty($_GET['type'])) {
|
|
forbiddenPage("Wrong Type");
|
|
}
|
|
|
|
if (!User::isLogged()) {
|
|
gotToLoginAndComeBackHere(__("Please login first"));
|
|
}
|
|
|
|
$iframeURL = '';
|
|
$titleTag = '';
|
|
|
|
switch ($_GET['type']) {
|
|
case "upload":
|
|
$titleTag = __("Upload");
|
|
if ((isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && User::isVerified()) || (isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && !$advancedCustomUser->onlyVerifiedEmailCanUpload) || !isset($advancedCustomUser->onlyVerifiedEmailCanUpload)) {
|
|
if (!empty($config->getEncoderURL())) {
|
|
$iframeURL = $config->getEncoderURL()."?noNavbar=1&".getCredentialsURL();
|
|
} else {
|
|
if (empty($iframeURL)) {
|
|
forbiddenPage("Your encoder is empty");
|
|
}
|
|
}
|
|
} else {
|
|
if (empty($iframeURL)) {
|
|
forbiddenPage("You cannot upload 1");
|
|
}
|
|
}
|
|
break;
|
|
case "network":
|
|
$titleTag = __("Network");
|
|
if ((isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && User::isVerified()) || (isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && !$advancedCustomUser->onlyVerifiedEmailCanUpload) || !isset($advancedCustomUser->onlyVerifiedEmailCanUpload)) {
|
|
if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) {
|
|
$iframeURL = $advancedCustom->encoderNetwork."?".getCredentialsURL();
|
|
} else {
|
|
if (empty($iframeURL)) {
|
|
forbiddenPage("Network is disabled");
|
|
}
|
|
}
|
|
} else {
|
|
if (empty($iframeURL)) {
|
|
forbiddenPage("You cannot upload 1");
|
|
}
|
|
}
|
|
break;
|
|
case "log":
|
|
$titleTag = __("Log");
|
|
$iframeURL = $global['webSiteRootURL']."view/logs.php";
|
|
break;
|
|
|
|
}
|
|
if (empty($iframeURL)) {
|
|
forbiddenPage("Invalid Type {$_GET['type']}");
|
|
}
|
|
|
|
$_page = new Page(array($titleTag));
|
|
|
|
?>
|
|
<iframe src="<?php echo $iframeURL; ?>" style="width: 100%; height: calc( 100vh - 50px );"></iframe>
|
|
<?php
|
|
$_page->print();
|
|
?>
|