mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Loading some pages in a iframe
This commit is contained in:
parent
5a92782541
commit
244089213b
26 changed files with 712 additions and 636 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -73,3 +73,4 @@ sitemap.xml
|
|||
/plugin/WebRTCLiveCam/
|
||||
/plugin/Wix/
|
||||
/plugin/Live/standAloneFiles/WebRTCServer/configuration.php
|
||||
/plugin/Fishr/
|
|
@ -7,9 +7,10 @@ $channelListSwitch = Plugin::isEnabledByName('FirstPageChannelList');
|
|||
if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && empty($channelListSwitch)) {
|
||||
$defaultSwitch = true;
|
||||
}
|
||||
$delay = 0.5;
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-3 col-lg-3">
|
||||
<div class="col-sm-6 col-md-3 col-lg-3 <?php echo getCSSAnimationClassAndStyle('animate__flipInY', 'layout', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Default
|
||||
|
@ -23,7 +24,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3 col-lg-3">
|
||||
<div class="col-sm-6 col-md-3 col-lg-3 <?php echo getCSSAnimationClassAndStyle('animate__flipInY', 'layout', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Netflix
|
||||
|
@ -38,7 +39,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
|
|||
</div>
|
||||
</div>
|
||||
<div class="clearfix hidden-md hidden-lg"></div>
|
||||
<div class="col-sm-6 col-md-3 col-lg-3">
|
||||
<div class="col-sm-6 col-md-3 col-lg-3 <?php echo getCSSAnimationClassAndStyle('animate__flipInY', 'layout', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Channel
|
||||
|
@ -52,7 +53,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3 col-lg-3">
|
||||
<div class="col-sm-6 col-md-3 col-lg-3 <?php echo getCSSAnimationClassAndStyle('animate__flipInY', 'layout', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Gallery
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
$obj = AVideoPlugin::getObjectDataIfEnabled('PlayerSkins');
|
||||
$dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
|
||||
$delay = 0.2;
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-6 <?php echo getCSSAnimationClassAndStyle('animate__fadeInUp', 'player', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Default
|
||||
|
@ -25,7 +26,7 @@ $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
|
|||
$file = basename($filename); // $file is set to "index.php"
|
||||
$fileEx = basename($filename, ".css"); // $file is set to "index"
|
||||
?>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-6 <?php echo getCSSAnimationClassAndStyle('animate__fadeInUp', 'player', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<?php echo ucfirst($fileEx); ?>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<div class="row">
|
||||
<?php
|
||||
$savedTheme = $config->getTheme();
|
||||
$delay = 0.2;
|
||||
foreach (glob("{$global['systemRootPath']}view/css/custom/*.css") as $filename) {
|
||||
//echo "$filename size " . filesize($filename) . "\n";
|
||||
$file = basename($filename); // $file is set to "index.php"
|
||||
$fileEx = basename($filename, ".css"); // $file is set to "index"
|
||||
?>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-4 <?php echo getCSSAnimationClassAndStyle('animate__fadeInUp', 'themess', $delay); ?>">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<?php echo ucfirst($fileEx); ?>
|
||||
|
|
|
@ -255,7 +255,7 @@ switch ($_GET['page']) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
<div class="panel <?php echo $panel; ?> adminLeftMenu <?php echo getCSSAnimationClassAndStyle('animate__flipInX', 'menu'); ?>">
|
||||
<div class="panel <?php echo $panel; ?> adminLeftMenu <?php echo getCSSAnimationClassAndStyle('animate__bounceInLeft', 'menu'); ?>">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a <?php echo $href; ?> >
|
||||
|
|
|
@ -248,7 +248,9 @@ class Configuration {
|
|||
global $global;
|
||||
$destination = Video::getStoragePath()."cache/og_200X200.jpg";
|
||||
$return = self::_getFavicon(true);
|
||||
if(file_exists($return['file'])){
|
||||
convertImageToOG($return['file'], $destination);
|
||||
}
|
||||
return getCDN() . "videos/cache/og_200X200.jpg";
|
||||
}
|
||||
|
||||
|
|
|
@ -1847,7 +1847,7 @@ function convertImage($originalImage, $outputImage, $quality) {
|
|||
return 0;
|
||||
}
|
||||
if (!is_resource($imageTmp)) {
|
||||
_error_log("convertImage: could not create a resource $originalImage, $outputImage, $quality, $ext");
|
||||
_error_log("convertImage: could not create a resource $originalImage, $outputImage, $quality, $ext ". json_encode(debug_backtrace()));
|
||||
return 0;
|
||||
}
|
||||
// quality is a value from 0 (worst) to 100 (best)
|
||||
|
|
|
@ -1397,6 +1397,7 @@ if (typeof gtag !== \"function\") {
|
|||
sqlDAL::close($res);
|
||||
if ($res != false) {
|
||||
foreach ($downloadedArray as $row) {
|
||||
$row['creator'] = Video::getCreatorHTML($row['id'], '', true, true);
|
||||
$row = cleanUpRowFromDatabase($row);
|
||||
$user[] = self::getUserInfoFromRow($row);
|
||||
}
|
||||
|
@ -1469,6 +1470,7 @@ if (typeof gtag !== \"function\") {
|
|||
sqlDAL::close($res);
|
||||
if ($res != false) {
|
||||
foreach ($downloadedArray as $row) {
|
||||
$row['creator'] = Video::getCreatorHTML($row['id'], '', true, true);
|
||||
$row = cleanUpRowFromDatabase($row);
|
||||
$user[] = self::getUserInfoFromRow($row);
|
||||
}
|
||||
|
|
|
@ -4736,7 +4736,7 @@ if (!class_exists('Video')) {
|
|||
return false;
|
||||
}
|
||||
|
||||
static function getCreatorHTML($users_id, $html = '', $small = false) {
|
||||
static function getCreatorHTML($users_id, $html = '', $small = false, $ignoreLinks=false) {
|
||||
global $global;
|
||||
if ($small) {
|
||||
$template = $global['systemRootPath'] . 'view/videoCreatorSmall.html';
|
||||
|
@ -4756,9 +4756,15 @@ if (!class_exists('Video')) {
|
|||
'{subscriptionButton}',
|
||||
'{html}');
|
||||
|
||||
if($ignoreLinks){
|
||||
$channelLink = '#';
|
||||
}else{
|
||||
$channelLink = User::getChannelLink($users_id);
|
||||
}
|
||||
|
||||
$replace = array(
|
||||
User::getPhoto($users_id),
|
||||
User::getChannelLink($users_id),
|
||||
$channelLink,
|
||||
strip_tags($name),
|
||||
User::getEmailVerifiedIcon($users_id),
|
||||
Subscribe::getButton($users_id),
|
||||
|
|
|
@ -53,7 +53,7 @@ class BulkEmbed extends PluginAbstract {
|
|||
return '';
|
||||
}
|
||||
|
||||
return '<li><a href="'.$global['webSiteRootURL'].'plugin/BulkEmbed/search.php" class="faa-parent animated-hover"><span class="fa fa-link faa-burst"></span> '.__("Bulk Embed").'</a></li>';
|
||||
return '<li><a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'plugin/BulkEmbed/search.php\');return false;" class="faa-parent animated-hover"><span class="fas fa-link faa-burst"></span> '.__("Bulk Embed").'</a></li>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
<?php
|
||||
|
||||
$config = dirname(__FILE__) . '/../../../videos/configuration.php';
|
||||
require_once $config;
|
||||
|
||||
if (!isCommandLineInterface()) {
|
||||
return die('Command Line only');
|
||||
}
|
||||
|
||||
$isCDNEnabled = AVideoPlugin::isEnabledByName('CDN');
|
||||
|
||||
if (empty($isCDNEnabled)) {
|
||||
return die('Plugin disabled');
|
||||
}
|
||||
|
||||
$storages = array('https://storage.wetube.club/', 'https://storage1.wetube.club/');
|
||||
|
||||
ob_end_flush();
|
||||
set_time_limit(300);
|
||||
ini_set('max_execution_time', 300);
|
||||
|
||||
$global['rowCount'] = $global['limitForUnlimitedVideos'] = 999999;
|
||||
$path = getVideosDir();
|
||||
$total = Video::getTotalVideos("", false, true, true, false, false);
|
||||
$videos = Video::getAllVideosLight("", false, true, false);
|
||||
$count = 0;
|
||||
|
||||
$countSiteIdNotEmpty = 0;
|
||||
$countStatusNotActive = 0;
|
||||
$countMoved = 0;
|
||||
|
||||
$videosDir = getVideosDir();
|
||||
$errorsFound = 0;
|
||||
foreach ($videos as $value) {
|
||||
$count++;
|
||||
$videos_id = $value['id'];
|
||||
$list = CDNStorage::getLocalFolder($videos_id);
|
||||
//echo "videos_id = {$videos_id} Files found " . count($list) . PHP_EOL;
|
||||
$m3u8 = false;
|
||||
$enckey = false;
|
||||
foreach ($list as $file) {
|
||||
if (is_array($file)) {
|
||||
foreach ($file as $file2) {
|
||||
if (preg_match('/index.m3u8$/', $file2)) {
|
||||
$m3u8 = true;
|
||||
} else if (preg_match('/enc.*.key$/', $file2)) {
|
||||
$enckey = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (preg_match('/index.m3u8$/', $file)) {
|
||||
$m3u8 = true;
|
||||
} else if (preg_match('/enc.*.key$/', $file)) {
|
||||
$enckey = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($m3u8 && !$enckey) {
|
||||
$errorsFound++;
|
||||
//$video = Video::getVideoLight($value);
|
||||
$paths = Video::getPaths($value['filename']);
|
||||
echo "[$errorsFound] Missing enc key for video {$videos_id} {$paths['path']}" . PHP_EOL;
|
||||
|
||||
foreach ($storages as $s) {
|
||||
$url = "{$s}tools/getenckey.json.php?folder={$value['filename']}";
|
||||
echo "{$url}" . PHP_EOL;
|
||||
$content = file_get_contents("{$s}tools/getenckey.json.php?folder={$value['filename']}");
|
||||
if(!empty($content)){
|
||||
$json = json_decode($content);
|
||||
if(!empty($json->pathinfo)){
|
||||
file_put_contents("{$paths['path']}missingkey", time());
|
||||
file_put_contents("{$paths['path']}{$json->pathinfo->basename}", base64_decode($json->content));
|
||||
echo "Saved from {$s} on {$paths['path']}{$json->pathinfo->basename}" . PHP_EOL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo PHP_EOL . " Done! " . PHP_EOL;
|
||||
die();
|
||||
|
|
@ -465,7 +465,7 @@ class Layout extends PluginAbstract {
|
|||
public function navBarAfter() {
|
||||
global $global;
|
||||
$obj = $this->getDataObject();
|
||||
if(!empty($obj->categoriesTopButtons)){
|
||||
if(!AVideoPlugin::isEnabledByName('YouPHPFlix2') && !empty($obj->categoriesTopButtons)){
|
||||
if(!empty($obj->categoriesTopButtonsShowOnlyOnFirstPage) && !isFirstPage()){
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/LiveLinks" data-toggle="tooltip" title="<?php echo __("Add an External a Live Streaming"); ?>" data-placement="left"
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'plugin/LiveLinks');return false;" data-toggle="tooltip" title="<?php echo __("Add an External a Live Streaming"); ?>" data-placement="left"
|
||||
class="faa-parent animated-hover">
|
||||
<i class="fas fa-link faa-burst"></i> <?php echo $buttonTitle; ?>
|
||||
</a>
|
||||
|
|
|
@ -1026,14 +1026,14 @@ li.dropdown-submenu > ul > li > a{
|
|||
.swal-modal.swal-modal-iframe-large .swal-content,
|
||||
.swal-modal.swal-modal-iframe-full .swal-content{
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
height: 100%;
|
||||
}
|
||||
.swal-modal.swal-modal-iframe iframe,
|
||||
.swal-modal.swal-modal-iframe-small iframe,
|
||||
.swal-modal.swal-modal-iframe-large iframe,
|
||||
.swal-modal.swal-modal-iframe-full iframe{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
#avideoModalIframeDiv{
|
||||
display: none;
|
||||
|
@ -1064,6 +1064,9 @@ li.dropdown-submenu > ul > li > a{
|
|||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.swal-modal.swal-modal-iframe-full iframe{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.swal-modal-iframe-full #avideoModalIframeDiv{
|
||||
display: block;
|
||||
|
@ -1071,7 +1074,6 @@ li.dropdown-submenu > ul > li > a{
|
|||
|
||||
.swal-modal.swal-modal-iframe-large .swal-content,
|
||||
.swal-modal.swal-modal-iframe-full .swal-content{
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -402,7 +402,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
$user = User::getChannelOwner($_SESSION['channelName']);
|
||||
?>
|
||||
<li>
|
||||
<a class="navbar-brand" href="<?php echo User::getChannelLinkFromChannelName($_SESSION['channelName']); ?>" >
|
||||
<a class="navbar-brand" href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLinkFromChannelName($_SESSION['channelName']); ?>');return false;" >
|
||||
<img src="<?php echo User::getPhoto($user['id']); ?>" alt="<?php echo User::getNameIdentificationById($user['id']); ?>"
|
||||
class="img img-circle " style="height: 33px; width: 33px; margin-right: 15px;">
|
||||
</a>
|
||||
|
@ -464,7 +464,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->doNotShowUploadMP4Button)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?upload=1" data-toggle="tooltip" title="<?php echo __("Upload files without encode"); ?>"
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'mvideos?upload=1');return false;" data-toggle="tooltip" title="<?php echo __("Upload files without encode"); ?>"
|
||||
data-placement="left" class="faa-parent animated-hover" >
|
||||
<span class="fas fa-upload faa-bounce"></span> <?php echo empty($advancedCustom->uploadMP4ButtonLabel) ? __("Direct upload") : __($advancedCustom->uploadMP4ButtonLabel); ?>
|
||||
</a>
|
||||
|
@ -474,7 +474,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->doNotShowImportMP4Button)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>view/import.php" data-toggle="tooltip" title="<?php echo __("Search for videos in your local disk"); ?>" data-placement="left" class="faa-parent animated-hover" >
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'view/import.php');return false;" data-toggle="tooltip" title="<?php echo __("Search for videos in your local disk"); ?>" data-placement="left" class="faa-parent animated-hover" >
|
||||
<span class="fas fa-hdd faa-ring"></span> <?php echo empty($advancedCustom->importMP4ButtonLabel) ? __("Direct Import Local Videos") : __($advancedCustom->importMP4ButtonLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -483,7 +483,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->doNotShowEmbedButton)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?link=1" data-toggle="tooltip" title="<?php echo __("Embed videos/files in your site"); ?>" data-placement="left" class="faa-parent animated-hover" >
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'mvideos?link=1');return false;" data-toggle="tooltip" title="<?php echo __("Embed videos/files in your site"); ?>" data-placement="left" class="faa-parent animated-hover" >
|
||||
<span class="fa fa-link faa-burst"></span> <?php echo empty($advancedCustom->embedButtonLabel) ? __("Embed a video link") : __($advancedCustom->embedButtonLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -492,7 +492,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (AVideoPlugin::isEnabledByName("Articles")) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?article=1" data-toggle="tooltip" title="<?php echo __("Write an article"); ?>" data-placement="left" class="faa-parent animated-hover">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'mvideos?article=1');return false;" data-toggle="tooltip" title="<?php echo __("Write an article"); ?>" data-placement="left" class="faa-parent animated-hover">
|
||||
<i class="far fa-newspaper faa-horizontal"></i> <?php echo __("Add Article"); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -597,7 +597,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
} else {
|
||||
?>
|
||||
<li>
|
||||
<a class="btn navbar-btn btn-default" href="<?php echo $global['webSiteRootURL']; ?>user" >
|
||||
<a class="btn navbar-btn btn-default" <?php echo $global['webSiteRootURL']; ?>user >
|
||||
<i class="fas fa-sign-in-alt"></i> <?php echo __("Sign In"); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -697,7 +697,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>user" style="border-radius: 4px 4px 0 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'user');return false;" style="border-radius: 4px 4px 0 0;">
|
||||
<span class="fa fa-user-circle"></span>
|
||||
<?php echo __("My Account"); ?>
|
||||
</a>
|
||||
|
@ -707,7 +707,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (User::canUpload(true)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'mvideos');return false;">
|
||||
<span class="glyphicon glyphicon-film"></span>
|
||||
<span class="glyphicon glyphicon-headphones"></span>
|
||||
<?php echo __("My videos"); ?>
|
||||
|
@ -717,7 +717,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo User::getChannelLink(); ?>" >
|
||||
<a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>');
|
||||
return false;" >
|
||||
<span class="fas fa-play-circle"></span>
|
||||
<?php echo __($advancedCustomUser->MyChannelLabel); ?>
|
||||
</a>
|
||||
|
@ -728,7 +729,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if ((($config->getAuthCanViewChart() == 0) && (User::canUpload())) || (($config->getAuthCanViewChart() == 1) && (User::canViewChart()))) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>charts">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'charts');return false;">
|
||||
<span class="fas fa-tachometer-alt"></span>
|
||||
<?php echo __("Dashboard"); ?>
|
||||
</a>
|
||||
|
@ -737,7 +738,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
} if (User::canUpload()) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>subscribes">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'subscribes');return false;">
|
||||
<span class="fa fa-check"></span>
|
||||
<?php echo __("My Subscribers"); ?>
|
||||
</a>
|
||||
|
@ -747,7 +748,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>categories">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'categories');return false;">
|
||||
<span class="glyphicon glyphicon-list"></span>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
|
@ -757,7 +758,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>comments">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'comments');return false;">
|
||||
<span class="fa fa-comment"></span>
|
||||
<?php echo __("Comments"); ?>
|
||||
</a>
|
||||
|
@ -817,7 +818,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>epg" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'epg');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<i class="fas fa-stream"></i>
|
||||
<?php echo __("EPG"); ?>
|
||||
</a>
|
||||
|
@ -826,7 +827,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>tv" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'tv');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<i class="fas fa-tv"></i>
|
||||
<?php echo __("TV"); ?>
|
||||
</a>
|
||||
|
@ -908,7 +909,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos" class="btn btn-success btn-block" style="border-radius: 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'mvideos');
|
||||
return false;" class="btn btn-success btn-block" style="border-radius: 0;">
|
||||
<span class="glyphicon glyphicon-film"></span>
|
||||
<span class="glyphicon glyphicon-headphones"></span>
|
||||
<?php echo __("My videos"); ?>
|
||||
|
@ -921,7 +923,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
<li>
|
||||
|
||||
<div>
|
||||
<a href="<?php echo User::getChannelLink(); ?>" class="btn btn-danger btn-block" style="border-radius: 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>');
|
||||
return false;" class="btn btn-danger btn-block" style="border-radius: 0;">
|
||||
<span class="fas fa-play-circle"></span>
|
||||
<?php echo __($advancedCustomUser->MyChannelLabel); ?>
|
||||
</a>
|
||||
|
@ -935,7 +938,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>charts" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'charts');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<span class="fas fa-tachometer-alt"></span>
|
||||
<?php echo __("Dashboard"); ?>
|
||||
</a>
|
||||
|
@ -946,7 +950,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>subscribes" class="btn btn-default btn-block" style="border-radius: 0">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'subscribes');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0">
|
||||
<span class="fa fa-check"></span>
|
||||
<?php echo __("My Subscribers"); ?>
|
||||
</a>
|
||||
|
@ -958,7 +963,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>categories" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<span class="glyphicon glyphicon-list"></span>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
|
@ -969,7 +975,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
?>
|
||||
<li>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>comments" class="btn btn-default btn-block" style="border-radius: 0 0 4px 4px;">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'comments');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0 0 4px 4px;">
|
||||
<span class="fa fa-comment"></span>
|
||||
<?php echo __("Comments"); ?>
|
||||
</a>
|
||||
|
@ -1004,31 +1011,36 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
<h2 class="text-danger"><?php echo __("Admin Menu"); ?></h2>
|
||||
<ul class="nav navbar" style="margin-bottom: 10px;">
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>admin/">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'admin/');
|
||||
return false;">
|
||||
<i class="fas fa-star"></i>
|
||||
<?php echo __("Admin Panel"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>users">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'users');
|
||||
return false;">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<?php echo __("Users"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>usersGroups">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'usersGroups');
|
||||
return false;">
|
||||
<span class="fa fa-users"></span>
|
||||
<?php echo __("Users Groups"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>categories">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
|
||||
return false;">
|
||||
<span class="glyphicon glyphicon-list"></span>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>update">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'update');
|
||||
return false;">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
<?php echo __("Update version"); ?>
|
||||
<?php
|
||||
|
@ -1039,21 +1051,23 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>siteConfigurations">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'siteConfigurations');
|
||||
return false;">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
<?php echo __("Site Configurations"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<!--
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>locale">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'locale');return false;">
|
||||
<span class="glyphicon glyphicon-flag"></span>
|
||||
<?php echo __("Create more translations"); ?>
|
||||
</a>
|
||||
</li>
|
||||
-->
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>plugins">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'plugins');
|
||||
return false;">
|
||||
<i class="fas fa-puzzle-piece"></i>
|
||||
<?php echo __("Plugins"); ?>
|
||||
</a>
|
||||
|
@ -1069,7 +1083,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>i/log" class="">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'i/log');
|
||||
return false;" class="">
|
||||
<i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1087,7 +1102,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
$menus[] = '
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global[\'webSiteRootURL\']; ?>users">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'users\');return false;">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<?php echo __("Users"); ?>
|
||||
</a>
|
||||
|
@ -1098,7 +1113,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (Permissions::canAdminUserGroups()) {
|
||||
$menus[] = '?>
|
||||
<li>
|
||||
<a href="<?php echo $global[\'webSiteRootURL\']; ?>usersGroups">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'usersGroups\');return false;">
|
||||
<span class="fa fa-users"></span>
|
||||
<?php echo __("Users Groups"); ?>
|
||||
</a>
|
||||
|
@ -1124,7 +1139,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (Permissions::canSeeLogs()) {
|
||||
$menus[] = ' ?>
|
||||
<li>
|
||||
<a href="<?php echo $global[\'webSiteRootURL\']; ?>i/log" class="">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'i/log\');return false;" class="">
|
||||
<i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1199,7 +1214,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
<h3 class="text-danger"><?php echo __("Channels"); ?></h3>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>channels">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'channels');return false;">
|
||||
<i class="fa fa-search"></i>
|
||||
<?php echo __("Browse Channels"); ?>
|
||||
</a>
|
||||
|
@ -1214,7 +1229,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
<!-- categories -->
|
||||
<li>
|
||||
<h3>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>listCategories" class="text-danger">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'listCategories');return false;" class="text-danger">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
</h3>
|
||||
|
@ -1304,7 +1319,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->disablePlayLink)) {
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo $global['webSiteRootURL']; ?>playLink">
|
||||
<a class="nav-link" href="#" onclick="avideoModalIframeFull(webSiteRootURL+'playLink');return false;">
|
||||
<i class="fas fa-play-circle"></i>
|
||||
<?php echo __("Play a Link"); ?>
|
||||
</a>
|
||||
|
@ -1314,7 +1329,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->disableHelpLeftMenu)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>help">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'help');return false;">
|
||||
<span class="glyphicon glyphicon-question-sign"></span>
|
||||
<?php echo __("Help"); ?>
|
||||
</a>
|
||||
|
@ -1325,7 +1340,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->disableAboutLeftMenu)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>about">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'about');return false;">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<?php echo __("About"); ?>
|
||||
</a>
|
||||
|
@ -1336,7 +1351,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
|||
if (empty($advancedCustom->disableContactLeftMenu)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>contact">
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'contact');return false;">
|
||||
<span class="glyphicon glyphicon-comment"></span>
|
||||
<?php echo __("Contact"); ?>
|
||||
</a>
|
||||
|
|
|
@ -34,7 +34,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
|
|||
} else {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>siteConfigurations" ><span class="fa fa-cogs"></span> <?php echo __("Configure an Encoder URL"); ?></a>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'siteConfigurations');return false;" ><span class="fa fa-cogs"></span> <?php echo __("Configure an Encoder URL"); ?></a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
|
|||
if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>i/network" data-toggle="tooltip" title="<?php echo __("Choose one of our encoders to upload a file or download it from the Internet"); ?>" data-placement="left" >
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'i/network');return false;" data-toggle="tooltip" title="<?php echo __("Choose one of our encoders to upload a file or download it from the Internet"); ?>" data-placement="left" >
|
||||
<span class="fa fa-cogs"></span> <?php echo empty($advancedCustom->encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -54,7 +54,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
|
|||
if (!empty($config->getEncoderURL())) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>i/upload" data-toggle="tooltip" title="<?php echo __("Upload a file or download it from the Internet"); ?>" data-placement="left" >
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'i/upload');return false;" data-toggle="tooltip" title="<?php echo __("Upload a file or download it from the Internet"); ?>" data-placement="left" >
|
||||
<span class="fa fa-cog"></span> <?php echo empty($advancedCustom->encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -62,7 +62,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
|
|||
} else {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>siteConfigurations"><span class="fa fa-cogs"></span> <?php echo __("Configure an Encoder URL"); ?></a>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'siteConfigurations');return false;"><span class="fa fa-cogs"></span> <?php echo __("Configure an Encoder URL"); ?></a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -1259,9 +1259,22 @@ function avideoModalIframeLarge(url) {
|
|||
avideoModalIframeWithClassName(url, 'swal-modal-iframe-large');
|
||||
}
|
||||
|
||||
var avideoModalIframeFullScreenOriginalURL = false;
|
||||
function avideoModalIframeFullScreen(url) {
|
||||
if(!avideoModalIframeFullScreenOriginalURL){
|
||||
avideoModalIframeFullScreenOriginalURL = document.location.href;
|
||||
}
|
||||
window.history.pushState("", "", url);
|
||||
avideoModalIframeWithClassName(url, 'swal-modal-iframe-full');
|
||||
}
|
||||
|
||||
function avideoModalIframeFullScreenClose() {
|
||||
$('.swal-overlay iframe').attr('src', 'about:blank');
|
||||
swal.close();
|
||||
window.history.pushState("", "", avideoModalIframeFullScreenOriginalURL);
|
||||
avideoModalIframeFullScreenOriginalURL = false;
|
||||
}
|
||||
|
||||
function avideoModalIframeFull(url) {
|
||||
avideoModalIframeFullScreen(url);
|
||||
}
|
||||
|
@ -1270,10 +1283,10 @@ function avideoModalIframeWithClassName(url, className) {
|
|||
url = addGetParam(url, 'avideoIframe', 1);
|
||||
var html = '';
|
||||
html = '<div id="avideoModalIframeDiv" class="clearfix">';
|
||||
html += '<button class="btn btn-default pull-left" onclick="swal.close();">';
|
||||
html += '<button class="btn btn-default pull-left" onclick="avideoModalIframeFullScreenClose();">';
|
||||
html += '<i class="fas fa-chevron-left"></i>';
|
||||
html += '</button></div>';
|
||||
html += '<iframe frameBorder="0" src="' + url + '" allow="camera *;microphone *" ></iframe>';
|
||||
html += '</button><img src="'+webSiteRootURL +'videos/userPhoto/logo.png" class="img img-responsive " style="max-height:34px;"></div>';
|
||||
html += '<iframe frameBorder="0" class="animate__animated animate__bounceInDown" src="' + url + '" allow="camera *;microphone *" ></iframe>';
|
||||
var span = document.createElement("span");
|
||||
span.innerHTML = html;
|
||||
swal({
|
||||
|
|
|
@ -660,7 +660,7 @@
|
|||
return false;
|
||||
}
|
||||
}).autocomplete("instance")._renderItem = function (ul, item) {
|
||||
return $("<li>").append("<div>" + item.name + "<br>" + item.email + "<br>" + item.user + "</div>").appendTo(ul);
|
||||
return $("<li>").append("<div>" + item.creator + item.email + "</div>").appendTo(ul);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -13,6 +13,8 @@ if (!empty($_GET['evideo'])) {
|
|||
$v = Video::decodeEvideo();
|
||||
$evideo = $v['evideo'];
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
$playlist_index = 0;
|
||||
if (!empty($evideo)) {
|
||||
$video = $v['video'];
|
||||
|
@ -25,6 +27,7 @@ if (!empty($evideo)) {
|
|||
$autoPlayPoster = '';
|
||||
$autoPlayThumbsSprit = '';
|
||||
} else {
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
require_once $global['systemRootPath'] . 'objects/category.php';
|
||||
require_once $global['systemRootPath'] . 'objects/subscribe.php';
|
||||
|
@ -53,6 +56,7 @@ if (!empty($evideo)) {
|
|||
}
|
||||
session_write_close();
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (!empty($_GET['playlist_id'])) {
|
||||
$isSerie = 1;
|
||||
if (preg_match("/^[0-9]+$/", $_GET['playlist_id'])) {
|
||||
|
@ -120,6 +124,7 @@ if (!empty($evideo)) {
|
|||
$catLink = "cat/{$_GET['catName']}/";
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
// add this because if you change the video category the video was not loading anymore
|
||||
$catName = @$_GET['catName'];
|
||||
|
||||
|
@ -143,6 +148,7 @@ if (!empty($evideo)) {
|
|||
$video = AVideoPlugin::getVideo();
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (!empty($_GET['v']) && (empty($video) || $video['id'] != $_GET['v'])) {
|
||||
$video = false;
|
||||
}
|
||||
|
@ -176,6 +182,7 @@ if (!empty($evideo)) {
|
|||
//}
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
$modeYouTubeTimeLog['Code part 1.6'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
if (!empty($autoPlayVideo)) {
|
||||
|
@ -183,6 +190,7 @@ if (!empty($evideo)) {
|
|||
$autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id'], '<br /><small>' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '</small>');
|
||||
$autoPlayVideo['url'] = Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], false, $get);
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
}
|
||||
$modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
|
@ -195,6 +203,7 @@ if (!empty($evideo)) {
|
|||
$obj = new Video("", "", $video['id']);
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (!empty($video) && $video['type'] == "video") {
|
||||
$poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg";
|
||||
} else {
|
||||
|
@ -232,6 +241,7 @@ if (!empty($evideo)) {
|
|||
} else {
|
||||
$poster = "" . getCDN() . "view/img/notfound.jpg";
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
$objSecure = AVideoPlugin::getObjectDataIfEnabled('SecureVideosDirectory');
|
||||
$modeYouTubeTimeLog['Code part 3'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
|
@ -246,6 +256,7 @@ if (!empty($evideo)) {
|
|||
$autoPlayPoster = '';
|
||||
$autoPlayThumbsSprit = "";
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
|
||||
if (empty($_GET['videoName']) && !empty($video)) {
|
||||
$_GET['videoName'] = $video['clean_title'];
|
||||
|
@ -262,6 +273,7 @@ if (!empty($evideo)) {
|
|||
$modeYouTubeTimeLog['Code part 5'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,8 +303,10 @@ TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
|||
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
|
||||
<link href="<?php echo getCDN(); ?>plugin/Gallery/style.css" rel="stylesheet" type="text/css"/>
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (!empty($_GET['v'])) {
|
||||
getOpenGraph($_GET['v']);
|
||||
getLdJson($_GET['v']);
|
||||
|
@ -300,6 +314,7 @@ TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
|||
getOpenGraph(0);
|
||||
getLdJson(0);
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
?>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
<?php
|
||||
$TimeLogLimitMYBR = 0.01;
|
||||
$timeLogNameMYBR = TimeLogStart("modeYoutubeBottomRight.php");
|
||||
if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
|
||||
?>
|
||||
<div class="col-lg-12 col-sm-12 col-xs-12 text-center">
|
||||
<?php echo getAdsSideRectangle(); ?>
|
||||
</div>
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
|
||||
if (!empty($playlist_id)) {
|
||||
include $global['systemRootPath'] . 'view/include/playlist.php';
|
||||
?>
|
||||
|
@ -54,6 +59,7 @@ if (!empty($playlist_id)) {
|
|||
echo Video::getVideosListItem($autoPlayVideo['id'], 'autoPlayVideoDiv', $style);
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
|
||||
|
||||
$modeYouTubeTimeLog['After autoplay and playlist '] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
|
@ -65,9 +71,11 @@ $modeYouTubeTime = microtime(true);
|
|||
<!--googleoff: all-->
|
||||
<div id="videosList">
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
|
||||
if (empty($playlist_id)) {
|
||||
include $global['systemRootPath'] . 'view/videosList.php';
|
||||
}
|
||||
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
|
||||
?>
|
||||
</div>
|
||||
<!--googleon: all-->
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
$TimeLogLimitMYB = 0.05;
|
||||
$timeLogNameMYB = TimeLogStart("modeYoutubeBundle.php");
|
||||
$isCompressed = AVideoPlugin::loadPluginIfEnabled('TheaterButton') && TheaterButton::isCompressed();
|
||||
|
||||
if (!$isCompressed) {
|
||||
|
@ -12,7 +14,10 @@ if (!$isCompressed) {
|
|||
</div>
|
||||
<?php
|
||||
}
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
if (!empty($video['id'])) {
|
||||
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
?>
|
||||
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
|
||||
<div class="col-lg-1"></div>
|
||||
|
@ -31,17 +36,21 @@ if(!empty($video['id'])){
|
|||
}
|
||||
?>
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
require "{$global['systemRootPath']}view/modeYoutubeBottom.php";
|
||||
$modeYouTubeTimeLog['After include bottom '] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-sm-5 col-md-5 col-lg-4 rightBar clearfix" id="yptRightBar" >
|
||||
<div class="list-group-item clearfix">
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
require "{$global['systemRootPath']}view/modeYoutubeBottomRight.php";
|
||||
$modeYouTubeTimeLog['After include bottom right '] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -49,6 +58,8 @@ if(!empty($video['id'])){
|
|||
</div>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
|
||||
?>
|
||||
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
|
||||
|
@ -89,5 +100,6 @@ if(!empty($video['id'])){
|
|||
<div class="col-lg-1"></div>
|
||||
</div>
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
}
|
||||
?>
|
|
@ -54,7 +54,7 @@ $metaDescription = __("Trending");
|
|||
//var_dump($rows);
|
||||
foreach ($videos as $key => $value) {
|
||||
?>
|
||||
<div class="col-lg-12 searchResult thumbsImage mb-2" style="overflow: hidden;">
|
||||
<div class="col-lg-12 searchResult thumbsImage mb-2 <?php echo getCSSAnimationClassAndStyle('animate__fadeInUp', 'trending', 0.2); ?> overflow: hidden;">
|
||||
<a class="galleryLink col-sm-4 col-md-4 col-lg-4" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>">
|
||||
<?php
|
||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||
|
|
38
view/videoViewsInfo.csv.php
Normal file
38
view/videoViewsInfo.csv.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
require_once '../videos/configuration.php';
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if (!empty($_REQUEST['hash'])) {
|
||||
$string = decryptString($_REQUEST['hash']);
|
||||
$obj = json_decode($string);
|
||||
$videos_id = intval($obj->videos_id);
|
||||
} else {
|
||||
$videos_id = intval(@$_REQUEST['videos_id']);
|
||||
if (!Video::canEdit($videos_id)) {
|
||||
forbiddenPage("You cannot see this info");
|
||||
}
|
||||
}
|
||||
if (empty($videos_id)) {
|
||||
forbiddenPage("Videos ID is required");
|
||||
}
|
||||
|
||||
$rowsCount = getRowCount();
|
||||
$video = new Video('', '', $videos_id);
|
||||
$filename = "{$videos_id}_".$video->getClean_title();
|
||||
$rows = VideoStatistic::getAllFromVideos_id($videos_id);
|
||||
//var_dump($rows);exit;
|
||||
$output = fopen("php://output", 'w') or die("Can't open php://output");
|
||||
$fields = array('when', 'ip', 'users', 'location_name', 'seconds_watching_video');
|
||||
fputcsv($output, $fields);
|
||||
foreach ($rows as $row) {
|
||||
$statistic = array();
|
||||
foreach ($fields as $value) {
|
||||
$statistic[$value] = $row[$value];
|
||||
}
|
||||
//var_dump($statistic);exit;
|
||||
fputcsv($output, $statistic);
|
||||
}
|
||||
header("Content-Type:application/csv");
|
||||
header("Content-Disposition:attachment;filename={$filename}.csv");
|
||||
fclose($output) or die("Can't close php://output");
|
||||
?>
|
|
@ -2,19 +2,25 @@
|
|||
require_once '../videos/configuration.php';
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if (!empty($_REQUEST['hash'])) {
|
||||
$string = decryptString($_REQUEST['hash']);
|
||||
$obj = json_decode($string);
|
||||
$videos_id = intval($obj->videos_id);
|
||||
} else {
|
||||
$videos_id = intval(@$_REQUEST['videos_id']);
|
||||
|
||||
if (!Video::canEdit($videos_id)) {
|
||||
forbiddenPage("You cannot see this info");
|
||||
}
|
||||
}
|
||||
if (empty($videos_id)) {
|
||||
forbiddenPage("Videos ID is required");
|
||||
}
|
||||
|
||||
if (!Video::canEdit($videos_id)) {
|
||||
forbiddenPage("You cannot see this info");
|
||||
}
|
||||
$rowsCount = getRowCount();
|
||||
|
||||
$rows = VideoStatistic::getAllFromVideos_id($videos_id);
|
||||
$total = VideoStatistic::getTotalFromVideos_id($videos_id);
|
||||
$totalPages = ceil($total / $_REQUEST['rowCount']);
|
||||
$totalPages = ceil($total / $rowsCount);
|
||||
|
||||
?>
|
||||
{"data": <?php echo json_encode($rows); ?>, "draw": <?php echo intval(@$_REQUEST['draw']); ?>, "recordsTotal":<?php echo $total; ?>, "recordsFiltered":<?php echo $total; ?>}
|
|
@ -4,18 +4,20 @@ if (!isset($global['systemRootPath'])) {
|
|||
require_once '../videos/configuration.php';
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['hash'])) {
|
||||
$string = decryptString($_REQUEST['hash']);
|
||||
$obj = json_decode($string);
|
||||
$videos_id = intval($obj->videos_id);
|
||||
} else {
|
||||
$videos_id = intval(@$_REQUEST['videos_id']);
|
||||
|
||||
if (empty($videos_id)) {
|
||||
forbiddenPage("Videos IF is required");
|
||||
}
|
||||
|
||||
if (!Video::canEdit($videos_id)) {
|
||||
forbiddenPage("You cannot see this info");
|
||||
}
|
||||
|
||||
}
|
||||
if (empty($videos_id)) {
|
||||
forbiddenPage("Videos ID is required");
|
||||
}
|
||||
$v = new Video('', '', $videos_id);
|
||||
|
||||
//var_dump($total);exit;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -26,6 +28,19 @@ $v = new Video('', '', $videos_id);
|
|||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.css"/>
|
||||
<style>
|
||||
#viewInfoTitle .thumbsImage{
|
||||
width: 150px;
|
||||
}
|
||||
#viewInfoTitle{
|
||||
position: relative;
|
||||
}
|
||||
#buttonsGroup{
|
||||
position: absolute;
|
||||
right:10px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="<?php echo $global['bodyClass']; ?>">
|
||||
|
@ -33,14 +48,22 @@ $v = new Video('', '', $videos_id);
|
|||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<br>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
|
||||
<h1>
|
||||
<div class="panel-heading clearfix" id="viewInfoTitle">
|
||||
<?php
|
||||
echo $v->getTitle();
|
||||
echo Video::getVideosListItem($videos_id);
|
||||
//echo $v->getTitle();
|
||||
$obj = new stdClass();
|
||||
$obj->videos_id = $videos_id;
|
||||
$hash = encryptString($obj);
|
||||
?>
|
||||
</h1>
|
||||
<div class="btn-group" role="group" aria-label="Basic example" id="buttonsGroup">
|
||||
<button type="button" class="btn btn-default" onclick="copyToClipboard(webSiteRootURL + 'view/videoViewsInfo.php?hash=<?php echo $hash; ?>');"><i class="fas fa-copy"></i> <?php echo __('Share link'); ?></button>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>view/videoViewsInfo.csv.php?videos_id=<?php echo $videos_id; ?>&rowCount=9999&hash=<?php echo $hash; ?>" class="btn btn-primary" >
|
||||
<i class="fas fa-file-csv"></i> <?php echo __('CSV File'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3>
|
||||
|
@ -89,7 +112,7 @@ $v = new Video('', '', $videos_id);
|
|||
var VideoViewsInfo = $('#VideoViewsInfo').DataTable({
|
||||
"order": [[1, "desc"]],
|
||||
serverSide: true,
|
||||
"ajax": "<?php echo $global['webSiteRootURL']; ?>view/videoViewsInfo.json.php?videos_id=<?php echo $videos_id; ?>",
|
||||
"ajax": "<?php echo $global['webSiteRootURL']; ?>view/videoViewsInfo.json.php?videos_id=<?php echo $videos_id; ?>&hash=<?php echo @$_REQUEST['hash']; ?>",
|
||||
"columns": [
|
||||
{data: 'users_id', render: function (data, type, row) {
|
||||
return row.users
|
||||
|
|
|
@ -3,19 +3,20 @@ global $global, $config;
|
|||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../videos/configuration.php';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
require_once $global['systemRootPath'] . 'objects/functions.php';
|
||||
if (isBot()) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||
$TimeLogLimitVL = 0.01;
|
||||
$timeLogNameVL = TimeLogStart("videosList.php");
|
||||
|
||||
$post = $_POST;
|
||||
if (!empty($_POST['video_id'])) {
|
||||
$video = Video::getVideo($_POST['video_id'], "viewable");
|
||||
}
|
||||
$_POST = $post;
|
||||
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
$catLink = "";
|
||||
if (!empty($_GET['catName'])) {
|
||||
$catLink = "cat/{$_GET['catName']}/";
|
||||
|
@ -51,8 +52,10 @@ $_SESSION['rowCount'] = $_REQUEST['rowCount'];
|
|||
$_SESSION['sort'] = $_POST['sort'];
|
||||
|
||||
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
$videos = Video::getAllVideos("viewableNotUnlisted");
|
||||
$total = Video::getTotalVideos("viewableNotUnlisted");
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
$totalPages = ceil($total / $_REQUEST['rowCount']);
|
||||
$_POST = $post;
|
||||
if (empty($totalPages)) {
|
||||
|
@ -84,6 +87,7 @@ $objGallery = AVideoPlugin::getObjectData("Gallery");
|
|||
if (empty($video['id'])) {
|
||||
$video['id'] = 0;
|
||||
}
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
?>
|
||||
<div class="col-md-8 col-sm-12 " style="position: relative; z-index: 2;" >
|
||||
<select class="form-control" id="sortBy" >
|
||||
|
@ -119,13 +123,23 @@ if (empty($video['id'])) {
|
|||
</div>
|
||||
|
||||
<?php
|
||||
$program = AVideoPlugin::loadPluginIfEnabled('PlayLists');
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
|
||||
$cacheName = "videosList_" . md5(json_encode($_REQUEST));
|
||||
$getVideosListItem = ObjectYPT::getSessionCache($cacheName);
|
||||
//$program = AVideoPlugin::loadPluginIfEnabled('PlayLists');
|
||||
if (empty($getVideosListItem)) {
|
||||
$getVideosListItem = '';
|
||||
foreach ($videos as $key => $value) {
|
||||
if (!empty($video['id']) && $video['id'] == $value['id']) {
|
||||
continue; // skip video
|
||||
}
|
||||
echo Video::getVideosListItem($value['id']);
|
||||
$getVideosListItem .= Video::getVideosListItem($value['id']);
|
||||
}
|
||||
ObjectYPT::setSessionCache($cacheName, $getVideosListItem);
|
||||
}
|
||||
echo $getVideosListItem;
|
||||
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
|
||||
?>
|
||||
<ul class="pages">
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue