1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Loading some pages in a iframe

This commit is contained in:
Daniel 2021-11-22 13:10:54 -03:00
parent 5a92782541
commit 244089213b
26 changed files with 712 additions and 636 deletions

1
.gitignore vendored
View file

@ -73,3 +73,4 @@ sitemap.xml
/plugin/WebRTCLiveCam/ /plugin/WebRTCLiveCam/
/plugin/Wix/ /plugin/Wix/
/plugin/Live/standAloneFiles/WebRTCServer/configuration.php /plugin/Live/standAloneFiles/WebRTCServer/configuration.php
/plugin/Fishr/

View file

@ -7,9 +7,10 @@ $channelListSwitch = Plugin::isEnabledByName('FirstPageChannelList');
if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && empty($channelListSwitch)) { if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && empty($channelListSwitch)) {
$defaultSwitch = true; $defaultSwitch = true;
} }
$delay = 0.5;
?> ?>
<div class="row"> <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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
Default Default
@ -23,7 +24,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
</div> </div>
</div> </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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
Netflix Netflix
@ -38,7 +39,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
</div> </div>
</div> </div>
<div class="clearfix hidden-md hidden-lg"></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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
Channel Channel
@ -52,7 +53,7 @@ if (empty($netflixSwitch) && empty($gallerySwitch) && empty($youtubeSwitch) && e
</div> </div>
</div> </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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
Gallery Gallery

View file

@ -1,9 +1,10 @@
<?php <?php
$obj = AVideoPlugin::getObjectDataIfEnabled('PlayerSkins'); $obj = AVideoPlugin::getObjectDataIfEnabled('PlayerSkins');
$dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/'; $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
$delay = 0.2;
?> ?>
<div class="row"> <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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
Default Default
@ -25,7 +26,7 @@ $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
$file = basename($filename); // $file is set to "index.php" $file = basename($filename); // $file is set to "index.php"
$fileEx = basename($filename, ".css"); // $file is set to "index" $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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
<?php echo ucfirst($fileEx); ?> <?php echo ucfirst($fileEx); ?>

View file

@ -1,12 +1,13 @@
<div class="row"> <div class="row">
<?php <?php
$savedTheme = $config->getTheme(); $savedTheme = $config->getTheme();
$delay = 0.2;
foreach (glob("{$global['systemRootPath']}view/css/custom/*.css") as $filename) { foreach (glob("{$global['systemRootPath']}view/css/custom/*.css") as $filename) {
//echo "$filename size " . filesize($filename) . "\n"; //echo "$filename size " . filesize($filename) . "\n";
$file = basename($filename); // $file is set to "index.php" $file = basename($filename); // $file is set to "index.php"
$fileEx = basename($filename, ".css"); // $file is set to "index" $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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
<?php echo ucfirst($fileEx); ?> <?php echo ucfirst($fileEx); ?>

View file

@ -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"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a <?php echo $href; ?> > <a <?php echo $href; ?> >

View file

@ -248,7 +248,9 @@ class Configuration {
global $global; global $global;
$destination = Video::getStoragePath()."cache/og_200X200.jpg"; $destination = Video::getStoragePath()."cache/og_200X200.jpg";
$return = self::_getFavicon(true); $return = self::_getFavicon(true);
if(file_exists($return['file'])){
convertImageToOG($return['file'], $destination); convertImageToOG($return['file'], $destination);
}
return getCDN() . "videos/cache/og_200X200.jpg"; return getCDN() . "videos/cache/og_200X200.jpg";
} }

View file

@ -1847,7 +1847,7 @@ function convertImage($originalImage, $outputImage, $quality) {
return 0; return 0;
} }
if (!is_resource($imageTmp)) { 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; return 0;
} }
// quality is a value from 0 (worst) to 100 (best) // quality is a value from 0 (worst) to 100 (best)

View file

@ -1397,6 +1397,7 @@ if (typeof gtag !== \"function\") {
sqlDAL::close($res); sqlDAL::close($res);
if ($res != false) { if ($res != false) {
foreach ($downloadedArray as $row) { foreach ($downloadedArray as $row) {
$row['creator'] = Video::getCreatorHTML($row['id'], '', true, true);
$row = cleanUpRowFromDatabase($row); $row = cleanUpRowFromDatabase($row);
$user[] = self::getUserInfoFromRow($row); $user[] = self::getUserInfoFromRow($row);
} }
@ -1469,6 +1470,7 @@ if (typeof gtag !== \"function\") {
sqlDAL::close($res); sqlDAL::close($res);
if ($res != false) { if ($res != false) {
foreach ($downloadedArray as $row) { foreach ($downloadedArray as $row) {
$row['creator'] = Video::getCreatorHTML($row['id'], '', true, true);
$row = cleanUpRowFromDatabase($row); $row = cleanUpRowFromDatabase($row);
$user[] = self::getUserInfoFromRow($row); $user[] = self::getUserInfoFromRow($row);
} }

View file

@ -4736,7 +4736,7 @@ if (!class_exists('Video')) {
return false; return false;
} }
static function getCreatorHTML($users_id, $html = '', $small = false) { static function getCreatorHTML($users_id, $html = '', $small = false, $ignoreLinks=false) {
global $global; global $global;
if ($small) { if ($small) {
$template = $global['systemRootPath'] . 'view/videoCreatorSmall.html'; $template = $global['systemRootPath'] . 'view/videoCreatorSmall.html';
@ -4756,9 +4756,15 @@ if (!class_exists('Video')) {
'{subscriptionButton}', '{subscriptionButton}',
'{html}'); '{html}');
if($ignoreLinks){
$channelLink = '#';
}else{
$channelLink = User::getChannelLink($users_id);
}
$replace = array( $replace = array(
User::getPhoto($users_id), User::getPhoto($users_id),
User::getChannelLink($users_id), $channelLink,
strip_tags($name), strip_tags($name),
User::getEmailVerifiedIcon($users_id), User::getEmailVerifiedIcon($users_id),
Subscribe::getButton($users_id), Subscribe::getButton($users_id),

View file

@ -53,7 +53,7 @@ class BulkEmbed extends PluginAbstract {
return ''; 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>';
} }

View file

@ -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();

View file

@ -465,7 +465,7 @@ class Layout extends PluginAbstract {
public function navBarAfter() { public function navBarAfter() {
global $global; global $global;
$obj = $this->getDataObject(); $obj = $this->getDataObject();
if(!empty($obj->categoriesTopButtons)){ if(!AVideoPlugin::isEnabledByName('YouPHPFlix2') && !empty($obj->categoriesTopButtons)){
if(!empty($obj->categoriesTopButtonsShowOnlyOnFirstPage) && !isFirstPage()){ if(!empty($obj->categoriesTopButtonsShowOnlyOnFirstPage) && !isFirstPage()){
return ''; return '';
} }

View file

@ -1,5 +1,5 @@
<li> <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"> class="faa-parent animated-hover">
<i class="fas fa-link faa-burst"></i> <?php echo $buttonTitle; ?> <i class="fas fa-link faa-burst"></i> <?php echo $buttonTitle; ?>
</a> </a>

View file

@ -1026,14 +1026,14 @@ li.dropdown-submenu > ul > li > a{
.swal-modal.swal-modal-iframe-large .swal-content, .swal-modal.swal-modal-iframe-large .swal-content,
.swal-modal.swal-modal-iframe-full .swal-content{ .swal-modal.swal-modal-iframe-full .swal-content{
width: 100%; width: 100%;
height: calc(100% - 50px); height: 100%;
} }
.swal-modal.swal-modal-iframe iframe, .swal-modal.swal-modal-iframe iframe,
.swal-modal.swal-modal-iframe-small iframe, .swal-modal.swal-modal-iframe-small iframe,
.swal-modal.swal-modal-iframe-large iframe, .swal-modal.swal-modal-iframe-large iframe,
.swal-modal.swal-modal-iframe-full iframe{ .swal-modal.swal-modal-iframe-full iframe{
width: 100%; width: 100%;
height: 100%; height: calc(100% - 50px);
} }
#avideoModalIframeDiv{ #avideoModalIframeDiv{
display: none; display: none;
@ -1064,6 +1064,9 @@ li.dropdown-submenu > ul > li > a{
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
} }
.swal-modal.swal-modal-iframe-full iframe{
height: 100%;
}
.swal-modal-iframe-full #avideoModalIframeDiv{ .swal-modal-iframe-full #avideoModalIframeDiv{
display: block; 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-large .swal-content,
.swal-modal.swal-modal-iframe-full .swal-content{ .swal-modal.swal-modal-iframe-full .swal-content{
height: 100%;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }

View file

@ -308,7 +308,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
$("#sidebar").removeClass('animate__bounceOutLeft'); $("#sidebar").removeClass('animate__bounceOutLeft');
$("#sidebar").show(); $("#sidebar").show();
$("#sidebar").addClass('animate__animated animate__bounceInLeft'); $("#sidebar").addClass('animate__animated animate__bounceInLeft');
setTimeout(function(){ setTimeout(function () {
$('body').addClass('youtube'); $('body').addClass('youtube');
}, 500); }, 500);
youTubeMenuIsOpened = true; youTubeMenuIsOpened = true;
@ -316,7 +316,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
function YPTSidebarClose() { function YPTSidebarClose() {
$("#sidebar").removeClass('animate__bounceInLeft'); $("#sidebar").removeClass('animate__bounceInLeft');
$("#sidebar").addClass('animate__bounceOutLeft'); $("#sidebar").addClass('animate__bounceOutLeft');
setTimeout(function(){ setTimeout(function () {
$('body').removeClass('youtube'); $('body').removeClass('youtube');
$("#sidebar").hide(); $("#sidebar").hide();
}, 500); }, 500);
@ -402,7 +402,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
$user = User::getChannelOwner($_SESSION['channelName']); $user = User::getChannelOwner($_SESSION['channelName']);
?> ?>
<li> <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']); ?>" <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;"> class="img img-circle " style="height: 33px; width: 33px; margin-right: 15px;">
</a> </a>
@ -464,7 +464,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->doNotShowUploadMP4Button)) { if (empty($advancedCustom->doNotShowUploadMP4Button)) {
?> ?>
<li> <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" > 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); ?> <span class="fas fa-upload faa-bounce"></span> <?php echo empty($advancedCustom->uploadMP4ButtonLabel) ? __("Direct upload") : __($advancedCustom->uploadMP4ButtonLabel); ?>
</a> </a>
@ -474,7 +474,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->doNotShowImportMP4Button)) { if (empty($advancedCustom->doNotShowImportMP4Button)) {
?> ?>
<li> <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); ?> <span class="fas fa-hdd faa-ring"></span> <?php echo empty($advancedCustom->importMP4ButtonLabel) ? __("Direct Import Local Videos") : __($advancedCustom->importMP4ButtonLabel); ?>
</a> </a>
</li> </li>
@ -483,7 +483,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->doNotShowEmbedButton)) { if (empty($advancedCustom->doNotShowEmbedButton)) {
?> ?>
<li> <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); ?> <span class="fa fa-link faa-burst"></span> <?php echo empty($advancedCustom->embedButtonLabel) ? __("Embed a video link") : __($advancedCustom->embedButtonLabel); ?>
</a> </a>
</li> </li>
@ -492,7 +492,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (AVideoPlugin::isEnabledByName("Articles")) { if (AVideoPlugin::isEnabledByName("Articles")) {
?> ?>
<li> <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"); ?> <i class="far fa-newspaper faa-horizontal"></i> <?php echo __("Add Article"); ?>
</a> </a>
</li> </li>
@ -597,7 +597,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
} else { } else {
?> ?>
<li> <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"); ?> <i class="fas fa-sign-in-alt"></i> <?php echo __("Sign In"); ?>
</a> </a>
</li> </li>
@ -637,17 +637,17 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
/> />
</button> </button>
<script> <script>
function toogleRightProfile(){ function toogleRightProfile() {
if($('#rightProfileBtnGroup').hasClass('open')){ if ($('#rightProfileBtnGroup').hasClass('open')) {
$('#rightProfileButton').removeClass('glowBox'); $('#rightProfileButton').removeClass('glowBox');
$('#rightProfileBtnGroup .dropdown-menu').removeClass('animate__bounceInRight'); $('#rightProfileBtnGroup .dropdown-menu').removeClass('animate__bounceInRight');
$('#rightProfileBtnGroup .dropdown-menu').addClass('animate__bounceOutRight'); $('#rightProfileBtnGroup .dropdown-menu').addClass('animate__bounceOutRight');
setTimeout(function(){ setTimeout(function () {
$('#rightProfileBtnGroup').removeClass('open'); $('#rightProfileBtnGroup').removeClass('open');
$('#rightProfileButton').attr('aria-expanded', false); $('#rightProfileButton').attr('aria-expanded', false);
},500); }, 500);
}else{ } else {
$('#rightProfileButton').addClass('glowBox'); $('#rightProfileButton').addClass('glowBox');
$('#rightProfileBtnGroup .dropdown-menu').removeClass('animate__bounceOutRight'); $('#rightProfileBtnGroup .dropdown-menu').removeClass('animate__bounceOutRight');
$('#rightProfileBtnGroup .dropdown-menu').addClass('animate__bounceInRight'); $('#rightProfileBtnGroup .dropdown-menu').addClass('animate__bounceInRight');
@ -697,7 +697,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <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> <span class="fa fa-user-circle"></span>
<?php echo __("My Account"); ?> <?php echo __("My Account"); ?>
</a> </a>
@ -707,7 +707,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (User::canUpload(true)) { if (User::canUpload(true)) {
?> ?>
<li> <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-film"></span>
<span class="glyphicon glyphicon-headphones"></span> <span class="glyphicon glyphicon-headphones"></span>
<?php echo __("My videos"); ?> <?php echo __("My videos"); ?>
@ -717,7 +717,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
} }
?> ?>
<li> <li>
<a href="<?php echo User::getChannelLink(); ?>" > <a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>');
return false;" >
<span class="fas fa-play-circle"></span> <span class="fas fa-play-circle"></span>
<?php echo __($advancedCustomUser->MyChannelLabel); ?> <?php echo __($advancedCustomUser->MyChannelLabel); ?>
</a> </a>
@ -728,7 +729,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if ((($config->getAuthCanViewChart() == 0) && (User::canUpload())) || (($config->getAuthCanViewChart() == 1) && (User::canViewChart()))) { if ((($config->getAuthCanViewChart() == 0) && (User::canUpload())) || (($config->getAuthCanViewChart() == 1) && (User::canViewChart()))) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>charts"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'charts');return false;">
<span class="fas fa-tachometer-alt"></span> <span class="fas fa-tachometer-alt"></span>
<?php echo __("Dashboard"); ?> <?php echo __("Dashboard"); ?>
</a> </a>
@ -737,7 +738,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
} if (User::canUpload()) { } if (User::canUpload()) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>subscribes"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'subscribes');return false;">
<span class="fa fa-check"></span> <span class="fa fa-check"></span>
<?php echo __("My Subscribers"); ?> <?php echo __("My Subscribers"); ?>
</a> </a>
@ -747,7 +748,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>categories"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'categories');return false;">
<span class="glyphicon glyphicon-list"></span> <span class="glyphicon glyphicon-list"></span>
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
@ -757,7 +758,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
} }
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>comments"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'comments');return false;">
<span class="fa fa-comment"></span> <span class="fa fa-comment"></span>
<?php echo __("Comments"); ?> <?php echo __("Comments"); ?>
</a> </a>
@ -817,7 +818,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<div> <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> <i class="fas fa-stream"></i>
<?php echo __("EPG"); ?> <?php echo __("EPG"); ?>
</a> </a>
@ -826,7 +827,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
</li> </li>
<li> <li>
<div> <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> <i class="fas fa-tv"></i>
<?php echo __("TV"); ?> <?php echo __("TV"); ?>
</a> </a>
@ -908,7 +909,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<div> <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-film"></span>
<span class="glyphicon glyphicon-headphones"></span> <span class="glyphicon glyphicon-headphones"></span>
<?php echo __("My videos"); ?> <?php echo __("My videos"); ?>
@ -921,7 +923,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
<li> <li>
<div> <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> <span class="fas fa-play-circle"></span>
<?php echo __($advancedCustomUser->MyChannelLabel); ?> <?php echo __($advancedCustomUser->MyChannelLabel); ?>
</a> </a>
@ -935,7 +938,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<div> <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> <span class="fas fa-tachometer-alt"></span>
<?php echo __("Dashboard"); ?> <?php echo __("Dashboard"); ?>
</a> </a>
@ -946,7 +950,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<div> <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> <span class="fa fa-check"></span>
<?php echo __("My Subscribers"); ?> <?php echo __("My Subscribers"); ?>
</a> </a>
@ -958,7 +963,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
<li> <li>
<div> <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> <span class="glyphicon glyphicon-list"></span>
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
@ -969,7 +975,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
?> ?>
<li> <li>
<div> <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> <span class="fa fa-comment"></span>
<?php echo __("Comments"); ?> <?php echo __("Comments"); ?>
</a> </a>
@ -1004,31 +1011,36 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
<h2 class="text-danger"><?php echo __("Admin Menu"); ?></h2> <h2 class="text-danger"><?php echo __("Admin Menu"); ?></h2>
<ul class="nav navbar" style="margin-bottom: 10px;"> <ul class="nav navbar" style="margin-bottom: 10px;">
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>admin/"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'admin/');
return false;">
<i class="fas fa-star"></i> <i class="fas fa-star"></i>
<?php echo __("Admin Panel"); ?> <?php echo __("Admin Panel"); ?>
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>users"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'users');
return false;">
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<?php echo __("Users"); ?> <?php echo __("Users"); ?>
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>usersGroups"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'usersGroups');
return false;">
<span class="fa fa-users"></span> <span class="fa fa-users"></span>
<?php echo __("Users Groups"); ?> <?php echo __("Users Groups"); ?>
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>categories"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
return false;">
<span class="glyphicon glyphicon-list"></span> <span class="glyphicon glyphicon-list"></span>
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>update"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'update');
return false;">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
<?php echo __("Update version"); ?> <?php echo __("Update version"); ?>
<?php <?php
@ -1039,21 +1051,23 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>siteConfigurations"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'siteConfigurations');
return false;">
<span class="glyphicon glyphicon-cog"></span> <span class="glyphicon glyphicon-cog"></span>
<?php echo __("Site Configurations"); ?> <?php echo __("Site Configurations"); ?>
</a> </a>
</li> </li>
<!-- <!--
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>locale"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'locale');return false;">
<span class="glyphicon glyphicon-flag"></span> <span class="glyphicon glyphicon-flag"></span>
<?php echo __("Create more translations"); ?> <?php echo __("Create more translations"); ?>
</a> </a>
</li> </li>
--> -->
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>plugins"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'plugins');
return false;">
<i class="fas fa-puzzle-piece"></i> <i class="fas fa-puzzle-piece"></i>
<?php echo __("Plugins"); ?> <?php echo __("Plugins"); ?>
</a> </a>
@ -1069,7 +1083,8 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
</a> </a>
</li> </li>
<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"); ?> <i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
</a> </a>
</li> </li>
@ -1087,7 +1102,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
$menus[] = ' $menus[] = '
?> ?>
<li> <li>
<a href="<?php echo $global[\'webSiteRootURL\']; ?>users"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'users\');return false;">
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<?php echo __("Users"); ?> <?php echo __("Users"); ?>
</a> </a>
@ -1098,7 +1113,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (Permissions::canAdminUserGroups()) { if (Permissions::canAdminUserGroups()) {
$menus[] = '?> $menus[] = '?>
<li> <li>
<a href="<?php echo $global[\'webSiteRootURL\']; ?>usersGroups"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'usersGroups\');return false;">
<span class="fa fa-users"></span> <span class="fa fa-users"></span>
<?php echo __("Users Groups"); ?> <?php echo __("Users Groups"); ?>
</a> </a>
@ -1124,7 +1139,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (Permissions::canSeeLogs()) { if (Permissions::canSeeLogs()) {
$menus[] = ' ?> $menus[] = ' ?>
<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"); ?> <i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
</a> </a>
</li> </li>
@ -1199,7 +1214,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
<h3 class="text-danger"><?php echo __("Channels"); ?></h3> <h3 class="text-danger"><?php echo __("Channels"); ?></h3>
</li> </li>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>channels"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'channels');return false;">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
<?php echo __("Browse Channels"); ?> <?php echo __("Browse Channels"); ?>
</a> </a>
@ -1214,7 +1229,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
<!-- categories --> <!-- categories -->
<li> <li>
<h3> <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); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
</h3> </h3>
@ -1304,7 +1319,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->disablePlayLink)) { if (empty($advancedCustom->disablePlayLink)) {
?> ?>
<li class="nav-item"> <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> <i class="fas fa-play-circle"></i>
<?php echo __("Play a Link"); ?> <?php echo __("Play a Link"); ?>
</a> </a>
@ -1314,7 +1329,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->disableHelpLeftMenu)) { if (empty($advancedCustom->disableHelpLeftMenu)) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>help"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'help');return false;">
<span class="glyphicon glyphicon-question-sign"></span> <span class="glyphicon glyphicon-question-sign"></span>
<?php echo __("Help"); ?> <?php echo __("Help"); ?>
</a> </a>
@ -1325,7 +1340,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->disableAboutLeftMenu)) { if (empty($advancedCustom->disableAboutLeftMenu)) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>about"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'about');return false;">
<span class="glyphicon glyphicon-info-sign"></span> <span class="glyphicon glyphicon-info-sign"></span>
<?php echo __("About"); ?> <?php echo __("About"); ?>
</a> </a>
@ -1336,7 +1351,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
if (empty($advancedCustom->disableContactLeftMenu)) { if (empty($advancedCustom->disableContactLeftMenu)) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>contact"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+'contact');return false;">
<span class="glyphicon glyphicon-comment"></span> <span class="glyphicon glyphicon-comment"></span>
<?php echo __("Contact"); ?> <?php echo __("Contact"); ?>
</a> </a>

View file

@ -34,7 +34,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
} else { } else {
?> ?>
<li> <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> </li>
<?php <?php
} }
@ -44,7 +44,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) { if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) {
?> ?>
<li> <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); ?> <span class="fa fa-cogs"></span> <?php echo empty($advancedCustom->encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?>
</a> </a>
</li> </li>
@ -54,7 +54,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
if (!empty($config->getEncoderURL())) { if (!empty($config->getEncoderURL())) {
?> ?>
<li> <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); ?> <span class="fa fa-cog"></span> <?php echo empty($advancedCustom->encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?>
</a> </a>
</li> </li>
@ -62,7 +62,7 @@ if (empty($advancedCustom->openEncoderInIFrame) || !isSameDomainAsMyAVideo($conf
} else { } else {
?> ?>
<li> <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> </li>
<?php <?php
} }

View file

@ -1259,9 +1259,22 @@ function avideoModalIframeLarge(url) {
avideoModalIframeWithClassName(url, 'swal-modal-iframe-large'); avideoModalIframeWithClassName(url, 'swal-modal-iframe-large');
} }
var avideoModalIframeFullScreenOriginalURL = false;
function avideoModalIframeFullScreen(url) { function avideoModalIframeFullScreen(url) {
if(!avideoModalIframeFullScreenOriginalURL){
avideoModalIframeFullScreenOriginalURL = document.location.href;
}
window.history.pushState("", "", url);
avideoModalIframeWithClassName(url, 'swal-modal-iframe-full'); 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) { function avideoModalIframeFull(url) {
avideoModalIframeFullScreen(url); avideoModalIframeFullScreen(url);
} }
@ -1270,10 +1283,10 @@ function avideoModalIframeWithClassName(url, className) {
url = addGetParam(url, 'avideoIframe', 1); url = addGetParam(url, 'avideoIframe', 1);
var html = ''; var html = '';
html = '<div id="avideoModalIframeDiv" class="clearfix">'; 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 += '<i class="fas fa-chevron-left"></i>';
html += '</button></div>'; html += '</button><img src="'+webSiteRootURL +'videos/userPhoto/logo.png" class="img img-responsive " style="max-height:34px;"></div>';
html += '<iframe frameBorder="0" src="' + url + '" allow="camera *;microphone *" ></iframe>'; html += '<iframe frameBorder="0" class="animate__animated animate__bounceInDown" src="' + url + '" allow="camera *;microphone *" ></iframe>';
var span = document.createElement("span"); var span = document.createElement("span");
span.innerHTML = html; span.innerHTML = html;
swal({ swal({

View file

@ -660,7 +660,7 @@
return false; return false;
} }
}).autocomplete("instance")._renderItem = function (ul, item) { }).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> </script>

View file

@ -13,6 +13,8 @@ if (!empty($_GET['evideo'])) {
$v = Video::decodeEvideo(); $v = Video::decodeEvideo();
$evideo = $v['evideo']; $evideo = $v['evideo'];
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
$playlist_index = 0; $playlist_index = 0;
if (!empty($evideo)) { if (!empty($evideo)) {
$video = $v['video']; $video = $v['video'];
@ -25,6 +27,7 @@ if (!empty($evideo)) {
$autoPlayPoster = ''; $autoPlayPoster = '';
$autoPlayThumbsSprit = ''; $autoPlayThumbsSprit = '';
} else { } else {
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/category.php'; require_once $global['systemRootPath'] . 'objects/category.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php'; require_once $global['systemRootPath'] . 'objects/subscribe.php';
@ -53,6 +56,7 @@ if (!empty($evideo)) {
} }
session_write_close(); session_write_close();
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (!empty($_GET['playlist_id'])) { if (!empty($_GET['playlist_id'])) {
$isSerie = 1; $isSerie = 1;
if (preg_match("/^[0-9]+$/", $_GET['playlist_id'])) { if (preg_match("/^[0-9]+$/", $_GET['playlist_id'])) {
@ -120,6 +124,7 @@ if (!empty($evideo)) {
$catLink = "cat/{$_GET['catName']}/"; $catLink = "cat/{$_GET['catName']}/";
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
// add this because if you change the video category the video was not loading anymore // add this because if you change the video category the video was not loading anymore
$catName = @$_GET['catName']; $catName = @$_GET['catName'];
@ -143,6 +148,7 @@ if (!empty($evideo)) {
$video = AVideoPlugin::getVideo(); $video = AVideoPlugin::getVideo();
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (!empty($_GET['v']) && (empty($video) || $video['id'] != $_GET['v'])) { if (!empty($_GET['v']) && (empty($video) || $video['id'] != $_GET['v'])) {
$video = false; $video = false;
} }
@ -176,6 +182,7 @@ if (!empty($evideo)) {
//} //}
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
$modeYouTubeTimeLog['Code part 1.6'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['Code part 1.6'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
if (!empty($autoPlayVideo)) { if (!empty($autoPlayVideo)) {
@ -183,6 +190,7 @@ if (!empty($evideo)) {
$autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id'], '<br /><small>' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '</small>'); $autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id'], '<br /><small>' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '</small>');
$autoPlayVideo['url'] = Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], false, $get); $autoPlayVideo['url'] = Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], false, $get);
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
} }
$modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
@ -195,6 +203,7 @@ if (!empty($evideo)) {
$obj = new Video("", "", $video['id']); $obj = new Video("", "", $video['id']);
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (!empty($video) && $video['type'] == "video") { if (!empty($video) && $video['type'] == "video") {
$poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg"; $poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg";
} else { } else {
@ -232,6 +241,7 @@ if (!empty($evideo)) {
} else { } else {
$poster = "" . getCDN() . "view/img/notfound.jpg"; $poster = "" . getCDN() . "view/img/notfound.jpg";
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
$objSecure = AVideoPlugin::getObjectDataIfEnabled('SecureVideosDirectory'); $objSecure = AVideoPlugin::getObjectDataIfEnabled('SecureVideosDirectory');
$modeYouTubeTimeLog['Code part 3'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['Code part 3'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
@ -246,6 +256,7 @@ if (!empty($evideo)) {
$autoPlayPoster = ''; $autoPlayPoster = '';
$autoPlayThumbsSprit = ""; $autoPlayThumbsSprit = "";
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (empty($_GET['videoName']) && !empty($video)) { if (empty($_GET['videoName']) && !empty($video)) {
$_GET['videoName'] = $video['clean_title']; $_GET['videoName'] = $video['clean_title'];
@ -262,6 +273,7 @@ if (!empty($evideo)) {
$modeYouTubeTimeLog['Code part 5'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['Code part 5'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $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 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"/> <link href="<?php echo getCDN(); ?>plugin/Gallery/style.css" rel="stylesheet" type="text/css"/>
<?php <?php
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (!empty($_GET['v'])) { if (!empty($_GET['v'])) {
getOpenGraph($_GET['v']); getOpenGraph($_GET['v']);
getLdJson($_GET['v']); getLdJson($_GET['v']);
@ -300,6 +314,7 @@ TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
getOpenGraph(0); getOpenGraph(0);
getLdJson(0); getLdJson(0);
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
?> ?>
</head> </head>

View file

@ -1,12 +1,17 @@
<?php <?php
$TimeLogLimitMYBR = 0.01;
$timeLogNameMYBR = TimeLogStart("modeYoutubeBottomRight.php");
if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) { if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
return false; return false;
} }
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
?> ?>
<div class="col-lg-12 col-sm-12 col-xs-12 text-center"> <div class="col-lg-12 col-sm-12 col-xs-12 text-center">
<?php echo getAdsSideRectangle(); ?> <?php echo getAdsSideRectangle(); ?>
</div> </div>
<?php <?php
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
if (!empty($playlist_id)) { if (!empty($playlist_id)) {
include $global['systemRootPath'] . 'view/include/playlist.php'; include $global['systemRootPath'] . 'view/include/playlist.php';
?> ?>
@ -48,12 +53,13 @@ if (!empty($playlist_id)) {
</div> </div>
<?php <?php
$style = 'margin: 10px 0; padding: 15px 5px;'; $style = 'margin: 10px 0; padding: 15px 5px;';
if(!PlayerSkins::isAutoplayEnabled()){ if (!PlayerSkins::isAutoplayEnabled()) {
$style .= 'display: none;'; $style .= 'display: none;';
} }
echo Video::getVideosListItem($autoPlayVideo['id'], 'autoPlayVideoDiv', $style); echo Video::getVideosListItem($autoPlayVideo['id'], 'autoPlayVideoDiv', $style);
} }
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
$modeYouTubeTimeLog['After autoplay and playlist '] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['After autoplay and playlist '] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
@ -65,9 +71,11 @@ $modeYouTubeTime = microtime(true);
<!--googleoff: all--> <!--googleoff: all-->
<div id="videosList"> <div id="videosList">
<?php <?php
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
if (empty($playlist_id)) { if (empty($playlist_id)) {
include $global['systemRootPath'] . 'view/videosList.php'; include $global['systemRootPath'] . 'view/videosList.php';
} }
TimeLogEnd($timeLogNameMYBR, __LINE__, $TimeLogLimitMYBR);
?> ?>
</div> </div>
<!--googleon: all--> <!--googleon: all-->

View file

@ -1,4 +1,6 @@
<?php <?php
$TimeLogLimitMYB = 0.05;
$timeLogNameMYB = TimeLogStart("modeYoutubeBundle.php");
$isCompressed = AVideoPlugin::loadPluginIfEnabled('TheaterButton') && TheaterButton::isCompressed(); $isCompressed = AVideoPlugin::loadPluginIfEnabled('TheaterButton') && TheaterButton::isCompressed();
if (!$isCompressed) { if (!$isCompressed) {
@ -12,9 +14,12 @@ if (!$isCompressed) {
</div> </div>
<?php <?php
} }
if(!empty($video['id'])){ TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
?> if (!empty($video['id'])) {
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
?>
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
<div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent"> <div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent">
<?php <?php
@ -31,27 +36,33 @@ if(!empty($video['id'])){
} }
?> ?>
<?php <?php
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
require "{$global['systemRootPath']}view/modeYoutubeBottom.php"; require "{$global['systemRootPath']}view/modeYoutubeBottom.php";
$modeYouTubeTimeLog['After include bottom '] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['After include bottom '] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
?> ?>
</div> </div>
<div class="col-sm-5 col-md-5 col-lg-4 rightBar clearfix" id="yptRightBar" > <div class="col-sm-5 col-md-5 col-lg-4 rightBar clearfix" id="yptRightBar" >
<div class="list-group-item clearfix"> <div class="list-group-item clearfix">
<?php <?php
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
require "{$global['systemRootPath']}view/modeYoutubeBottomRight.php"; require "{$global['systemRootPath']}view/modeYoutubeBottomRight.php";
$modeYouTubeTimeLog['After include bottom right '] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['After include bottom right '] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
?> ?>
</div> </div>
</div> </div>
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
</div> </div>
<?php <?php
}else{ } else {
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php'; require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
?> ?>
<div class="row" id="modeYoutubeBottom" style="margin: 0;"> <div class="row" id="modeYoutubeBottom" style="margin: 0;">
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
<div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent"> <div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent">
<?php <?php
@ -87,7 +98,8 @@ if(!empty($video['id'])){
</div> </div>
</div> </div>
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
</div> </div>
<?php <?php
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
} }
?> ?>

View file

@ -54,7 +54,7 @@ $metaDescription = __("Trending");
//var_dump($rows); //var_dump($rows);
foreach ($videos as $key => $value) { 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']; ?>"> <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 <?php
$images = Video::getImageFromFilename($value['filename'], $value['type']); $images = Video::getImageFromFilename($value['filename'], $value['type']);

View 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");
?>

View file

@ -2,19 +2,25 @@
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
$videos_id = intval(@$_REQUEST['videos_id']); 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)) { if (empty($videos_id)) {
forbiddenPage("Videos ID is required"); forbiddenPage("Videos ID is required");
} }
if (!Video::canEdit($videos_id)) { $rowsCount = getRowCount();
forbiddenPage("You cannot see this info");
}
$rows = VideoStatistic::getAllFromVideos_id($videos_id); $rows = VideoStatistic::getAllFromVideos_id($videos_id);
$total = VideoStatistic::getTotalFromVideos_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; ?>} {"data": <?php echo json_encode($rows); ?>, "draw": <?php echo intval(@$_REQUEST['draw']); ?>, "recordsTotal":<?php echo $total; ?>, "recordsFiltered":<?php echo $total; ?>}

View file

@ -4,18 +4,20 @@ if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
} }
$videos_id = intval(@$_REQUEST['videos_id']); if (!empty($_REQUEST['hash'])) {
$string = decryptString($_REQUEST['hash']);
if (empty($videos_id)) { $obj = json_decode($string);
forbiddenPage("Videos IF is required"); $videos_id = intval($obj->videos_id);
} } else {
$videos_id = intval(@$_REQUEST['videos_id']);
if (!Video::canEdit($videos_id)) { if (!Video::canEdit($videos_id)) {
forbiddenPage("You cannot see this info"); forbiddenPage("You cannot see this info");
}
}
if (empty($videos_id)) {
forbiddenPage("Videos ID is required");
} }
$v = new Video('', '', $videos_id); $v = new Video('', '', $videos_id);
//var_dump($total);exit; //var_dump($total);exit;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@ -26,6 +28,19 @@ $v = new Video('', '', $videos_id);
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
?> ?>
<link rel="stylesheet" type="text/css" href="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.css"/> <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> </head>
<body class="<?php echo $global['bodyClass']; ?>"> <body class="<?php echo $global['bodyClass']; ?>">
@ -33,14 +48,22 @@ $v = new Video('', '', $videos_id);
include $global['systemRootPath'] . 'view/include/navbar.php'; include $global['systemRootPath'] . 'view/include/navbar.php';
?> ?>
<div class="container-fluid"> <div class="container-fluid">
<br>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading clearfix" id="viewInfoTitle">
<h1>
<?php <?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>
<div class="panel-body"> <div class="panel-body">
<h3> <h3>
@ -87,9 +110,9 @@ $v = new Video('', '', $videos_id);
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
var VideoViewsInfo = $('#VideoViewsInfo').DataTable({ var VideoViewsInfo = $('#VideoViewsInfo').DataTable({
"order": [[ 1, "desc" ]], "order": [[1, "desc"]],
serverSide: true, 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": [ "columns": [
{data: 'users_id', render: function (data, type, row) { {data: 'users_id', render: function (data, type, row) {
return row.users return row.users

View file

@ -3,19 +3,20 @@ global $global, $config;
if (!isset($global['systemRootPath'])) { if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
} }
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (isBot()) { if (isBot()) {
return; return;
} }
require_once $global['systemRootPath'] . 'objects/video.php'; $TimeLogLimitVL = 0.01;
$timeLogNameVL = TimeLogStart("videosList.php");
$post = $_POST; $post = $_POST;
if (!empty($_POST['video_id'])) { if (!empty($_POST['video_id'])) {
$video = Video::getVideo($_POST['video_id'], "viewable"); $video = Video::getVideo($_POST['video_id'], "viewable");
} }
$_POST = $post; $_POST = $post;
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
$catLink = ""; $catLink = "";
if (!empty($_GET['catName'])) { if (!empty($_GET['catName'])) {
$catLink = "cat/{$_GET['catName']}/"; $catLink = "cat/{$_GET['catName']}/";
@ -51,8 +52,10 @@ $_SESSION['rowCount'] = $_REQUEST['rowCount'];
$_SESSION['sort'] = $_POST['sort']; $_SESSION['sort'] = $_POST['sort'];
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
$videos = Video::getAllVideos("viewableNotUnlisted"); $videos = Video::getAllVideos("viewableNotUnlisted");
$total = Video::getTotalVideos("viewableNotUnlisted"); $total = Video::getTotalVideos("viewableNotUnlisted");
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
$totalPages = ceil($total / $_REQUEST['rowCount']); $totalPages = ceil($total / $_REQUEST['rowCount']);
$_POST = $post; $_POST = $post;
if (empty($totalPages)) { if (empty($totalPages)) {
@ -84,6 +87,7 @@ $objGallery = AVideoPlugin::getObjectData("Gallery");
if (empty($video['id'])) { if (empty($video['id'])) {
$video['id'] = 0; $video['id'] = 0;
} }
TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
?> ?>
<div class="col-md-8 col-sm-12 " style="position: relative; z-index: 2;" > <div class="col-md-8 col-sm-12 " style="position: relative; z-index: 2;" >
<select class="form-control" id="sortBy" > <select class="form-control" id="sortBy" >
@ -119,13 +123,23 @@ if (empty($video['id'])) {
</div> </div>
<?php <?php
$program = AVideoPlugin::loadPluginIfEnabled('PlayLists'); TimeLogEnd($timeLogNameVL, __LINE__, $TimeLogLimitVL);
foreach ($videos as $key => $value) {
$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']) { if (!empty($video['id']) && $video['id'] == $value['id']) {
continue; // skip video 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 class="pages">
</ul> </ul>