1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
daniel 2020-06-08 12:01:02 -03:00
parent 297f6307ab
commit 5e145f731d
10 changed files with 210 additions and 221 deletions

View file

@ -1,6 +1,9 @@
<?php <?php
global $global; global $global;
if(empty($global['systemRootPath'])){
require_once '../../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php'; require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
class CustomizeUser extends PluginAbstract { class CustomizeUser extends PluginAbstract {
@ -38,7 +41,7 @@ class CustomizeUser extends PluginAbstract {
$obj->userCanNotChangeUserGroup = false; $obj->userCanNotChangeUserGroup = false;
$o = new stdClass(); $o = new stdClass();
$o->type = array(0=>_("Default"))+UserGroups::getAllUsersGroupsArray(); $o->type = array(0=>__("Default"))+UserGroups::getAllUsersGroupsArray();
$o->value = 0; $o->value = 0;
$obj->userDefaultUserGroup = $o; $obj->userDefaultUserGroup = $o;
$obj->userMustBeLoggedIn = !isset($advancedCustom->userMustBeLoggedIn) ? false : $advancedCustom->userMustBeLoggedIn; $obj->userMustBeLoggedIn = !isset($advancedCustom->userMustBeLoggedIn) ? false : $advancedCustom->userMustBeLoggedIn;
@ -66,6 +69,7 @@ class CustomizeUser extends PluginAbstract {
$obj->showChannelHomeTab = true; $obj->showChannelHomeTab = true;
$obj->showChannelVideosTab = true; $obj->showChannelVideosTab = true;
$obj->showChannelProgramsTab = true; $obj->showChannelProgramsTab = true;
$obj->showBigVideoOnChannelVideosTab = true;
$obj->encryptPasswordsWithSalt = !isset($advancedCustom->encryptPasswordsWithSalt) ? false : $advancedCustom->encryptPasswordsWithSalt; $obj->encryptPasswordsWithSalt = !isset($advancedCustom->encryptPasswordsWithSalt) ? false : $advancedCustom->encryptPasswordsWithSalt;
$obj->requestCaptchaAfterLoginsAttempts = !isset($advancedCustom->requestCaptchaAfterLoginsAttempts) ? 0 : $advancedCustom->requestCaptchaAfterLoginsAttempts; $obj->requestCaptchaAfterLoginsAttempts = !isset($advancedCustom->requestCaptchaAfterLoginsAttempts) ? 0 : $advancedCustom->requestCaptchaAfterLoginsAttempts;
$obj->disableSignOutButton = false; $obj->disableSignOutButton = false;

View file

@ -24,16 +24,14 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
} }
$_GET = $get; $_GET = $get;
?> ?>
<div class="clear clearfix" id="bigVideo" style="background-color: rgb(<?php echo $obj->backgroundRGB; ?>);background: url(<?php echo $poster; ?>) no-repeat center center fixed; -webkit-background-size: cover; <div class="row" id="bigVideo" style="background-color: rgb(<?php echo $obj->backgroundRGB; ?>);background: url(<?php echo $poster; ?>) no-repeat center center fixed; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;
-o-background-size: cover; -o-background-size: cover;
background-size: cover; background-size: cover;
height: 0; height: 0;
padding-bottom: 56.25%;/* Aspect ratio */ padding-bottom: 56.25%;/* Aspect ratio */
margin: -120px -20px;
margin-bottom: 0;
position: relative;
margin-bottom: <?php echo $obj->BigVideoMarginBottom; ?>; margin-bottom: <?php echo $obj->BigVideoMarginBottom; ?>;
position: relative;
z-index: 0;" > z-index: 0;" >
<?php <?php
if (!isMobile() && !empty($video['trailer1'])) { if (!isMobile() && !empty($video['trailer1'])) {
@ -42,7 +40,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<iframe src="<?php echo parseVideos($video['trailer1'], 1, 1, 1, 0, 0, 'fill'); ?>" frameborder="0" allowtransparency="true" allow="autoplay"></iframe> <iframe src="<?php echo parseVideos($video['trailer1'], 1, 1, 1, 0, 0, 'fill'); ?>" frameborder="0" allowtransparency="true" allow="autoplay"></iframe>
</div> </div>
<div id="bg_container_overlay" ></div> <div id="bg_container_overlay" ></div>
<div class="posterDetails " style=" padding: 30px; padding-top: 120px; <div class="posterDetails " style=" padding: 30px;
background: -webkit-linear-gradient(bottom, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: -webkit-linear-gradient(bottom, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
background: -o-linear-gradient(top, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: -o-linear-gradient(top, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
background: linear-gradient(top, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: linear-gradient(top, rgba(<?php echo $obj->backgroundRGB; ?>,1) 2%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
@ -50,7 +48,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<?php <?php
} else { } else {
?> ?>
<div class="posterDetails " style=" padding: 30px; padding-top: 120px; <div class="posterDetails " style=" padding: 30px;
background: -webkit-linear-gradient(left, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: -webkit-linear-gradient(left, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
background: -o-linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: -o-linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
background: linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%); background: linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
@ -113,9 +111,9 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
</h4> </h4>
<div class="row"> <div class="row">
<?php <?php
$colClass = "col-md-2 col-sm-4 col-xs-6"; $colClass = "col-md-4 col-sm-6 col-xs-6";
if (!empty($obj->RemoveBigVideoDescription)) { if (!empty($obj->RemoveBigVideoDescription)) {
$colClass = "col-md-4 col-sm-4 col-xs-6"; $colClass = "col-md-4 col-sm-6 col-xs-6";
} }
if (empty($obj->landscapePosters) && !empty($images->posterPortrait)) { if (empty($obj->landscapePosters) && !empty($images->posterPortrait)) {
?> ?>
@ -128,7 +126,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<div class="<?php echo $colClass; ?>"> <div class="<?php echo $colClass; ?>">
<a href="<?php echo YouPHPFlix2::getLinkToVideo($video['id']); ?>"> <a href="<?php echo YouPHPFlix2::getLinkToVideo($video['id']); ?>">
<div class="thumbsImage"> <div class="thumbsImage">
<img alt="<?php echo $video['title']; ?>" class="img img-responsive posterPortrait thumbsJPG" src="<?php echo $images->poster; ?>" style="min-width: 135px; height: auto;" /> <img alt="<?php echo $video['title']; ?>" class="img img-responsive posterPortrait thumbsJPG" src="<?php echo $images->poster; ?>" />
<?php if (!empty($images->thumbsGif)) { ?> <?php if (!empty($images->thumbsGif)) { ?>
<img style="position: absolute; top: 0; display: none;" src="<?php echo $images->thumbsGif; ?>" alt="<?php echo $video['title']; ?>" id="thumbsGIFBig<?php echo $video['id']; ?>" class="thumbsGIF img-responsive img" /> <img style="position: absolute; top: 0; display: none;" src="<?php echo $images->thumbsGif; ?>" alt="<?php echo $video['title']; ?>" id="thumbsGIFBig<?php echo $video['id']; ?>" class="thumbsGIF img-responsive img" />
<?php } ?> <?php } ?>

View file

@ -286,7 +286,7 @@ footer .btn-outline {
height: 210px; height: 210px;
} }
#bigVideo .posterPortrait { #bigVideo .posterPortrait {
height: 30vh; height: auto;
} }
#bigVideo .mainInfoText{ #bigVideo .mainInfoText{
max-height: 29vh; max-height: 29vh;
@ -323,6 +323,9 @@ footer .btn-outline {
#carouselRows h2{ #carouselRows h2{
position: relative; position: relative;
} }
#carouselRows{
margin-top: -20%;
}
body.fullscreen{ body.fullscreen{
margin: 0; margin: 0;
@ -350,11 +353,6 @@ body.fullscreen{
overflow: hidden; overflow: hidden;
height: 450px !important; height: 450px !important;
} }
#bigVideo .posterPortrait {
height: 20vh;
min-height: 193px;
min-width: 135px !important;
}
} }
.paidOnlyLabel{ .paidOnlyLabel{
position: absolute; position: absolute;

View file

@ -17,5 +17,6 @@
TimeLogEnd($timeLog, __LINE__); TimeLogEnd($timeLog, __LINE__);
?> ?>
</div> </div>
<script src="<?php echo $global['webSiteRootURL']; ?>view/js/infinite-scroll.pkgd.min.js" type="text/javascript"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>plugin/Gallery/script.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>plugin/Gallery/script.js" type="text/javascript"></script>
<script src="<?php echo $jsURL; ?>" type="text/javascript"></script> <script src="<?php echo $jsURL; ?>" type="text/javascript"></script>

View file

@ -1,3 +1,2 @@
<link href="<?php echo $global['webSiteRootURL']; ?>view/js/webui-popover/jquery.webui-popover.min.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $global['webSiteRootURL']; ?>view/js/webui-popover/jquery.webui-popover.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/js/flickity/flickity.min.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/js/flickity/flickity.min.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $global['webSiteRootURL']; ?>view/js/infinite-scroll.pkgd.min.js" type="text/javascript"></script>

View file

@ -98,7 +98,7 @@ TimeLogEnd($timeLog, __LINE__);
} }
if ($advancedCustomUser->showChannelProgramsTab && !empty($palyListsObj)) { if ($advancedCustomUser->showChannelProgramsTab && !empty($palyListsObj)) {
?> ?>
<li class="nav-item <?php echo $active; ?>"> <li class="nav-item <?php echo $active; ?>" id="channelPlayListsLi">
<a class="nav-link " href="#channelPlayLists" data-toggle="tab" aria-expanded="true"> <a class="nav-link " href="#channelPlayLists" data-toggle="tab" aria-expanded="true">
<?php echo strtoupper(__("Playlists")); ?> <?php echo strtoupper(__("Playlists")); ?>
</a> </a>
@ -114,7 +114,7 @@ TimeLogEnd($timeLog, __LINE__);
if ($advancedCustomUser->showChannelHomeTab) { if ($advancedCustomUser->showChannelHomeTab) {
?> ?>
<div class="tab-pane <?php echo $active; ?>" id="channelHome" style="min-height: 800px;"> <div class="tab-pane <?php echo $active; ?>" id="channelHome" style="min-height: 800px;">
<div class="container-fluid modeFlixContainer"> <div class="container-fluid modeFlixContainer" style="padding: 15px;">
<?php <?php
$obj = AVideoPlugin::getObjectData("YouPHPFlix2"); $obj = AVideoPlugin::getObjectData("YouPHPFlix2");
$obj->BigVideo = true; $obj->BigVideo = true;
@ -131,6 +131,7 @@ TimeLogEnd($timeLog, __LINE__);
$obj->Categories = false; $obj->Categories = false;
$obj->playVideoOnFullscreen = false; $obj->playVideoOnFullscreen = false;
$obj->titleLabel = true; $obj->titleLabel = true;
$obj->RemoveBigVideoDescription = true;
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixBody.php'; include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixBody.php';
?> ?>
@ -163,7 +164,7 @@ TimeLogEnd($timeLog, __LINE__);
</div> </div>
<div class="panel-body"> <div class="panel-body">
<?php <?php
if (!empty($uploadedVideos[0])) { if ($advancedCustomUser->showBigVideoOnChannelVideosTab && !empty($uploadedVideos[0])) {
$video = $uploadedVideos[0]; $video = $uploadedVideos[0];
$obj = new stdClass(); $obj = new stdClass();
$obj->BigVideo = true; $obj->BigVideo = true;

View file

@ -8,9 +8,6 @@ include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixHead.php';
.galleryVideo { .galleryVideo {
padding-bottom: 10px; padding-bottom: 10px;
} }
#bigVideo{
margin: 0 0 -350px 0!important;
}
#bigVideoCarousel{ #bigVideoCarousel{
height: auto; height: auto;
} }
@ -20,12 +17,6 @@ include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixHead.php';
.modeFlixContainer{ .modeFlixContainer{
padding: 0; padding: 0;
} }
#carouselRows, .modeFlixContainer .carousel {
min-height: 300px;
}
#carouselRows, .modeFlixContainer .poster {
margin-top: 25px;
}
.topicRow{ .topicRow{
margin: 0; margin: 0;
} }

View file

@ -1,4 +1,9 @@
<div class="programsContainerItem"> <div class="programsContainerItem">
<style>
#channelPlayListsLi{
display: block !important;
}
</style>
<?php <?php
global $global, $config, $isChannel; global $global, $config, $isChannel;
$isChannel = 1; // still workaround, for gallery-functions, please let it there. $isChannel = 1; // still workaround, for gallery-functions, please let it there.
@ -114,7 +119,7 @@
if ($playlist['status'] != "favorite" && $playlist['status'] != "watch_later") { if ($playlist['status'] != "favorite" && $playlist['status'] != "watch_later") {
if (AVideoPlugin::isEnabledByName("PlayLists")) { if (AVideoPlugin::isEnabledByName("PlayLists")) {
?> ?>
<button class="btn btn-xs btn-default" onclick="copyToClipboard($('#playListEmbedCode<?php echo $playlist['id']; ?>').val());setTextEmbedCopied();" ><span class="fa fa-copy"></span> <span id="btnEmbedText"><?php echo __("Copy embed code"); ?></span></button> <button class="btn btn-xs btn-default" onclick="copyToClipboard($('#playListEmbedCode<?php echo $playlist['id']; ?>').val()); setTextEmbedCopied();" ><span class="fa fa-copy"></span> <span id="btnEmbedText"><?php echo __("Copy embed code"); ?></span></button>
<input type="hidden" id="playListEmbedCode<?php echo $playlist['id']; ?>" value='<?php <input type="hidden" id="playListEmbedCode<?php echo $playlist['id']; ?>" value='<?php
$code = str_replace("{embedURL}", "{$global['webSiteRootURL']}plugin/PlayLists/embed.php?playlists_id={$playlist['id']}", $advancedCustom->embedCodeTemplate); $code = str_replace("{embedURL}", "{$global['webSiteRootURL']}plugin/PlayLists/embed.php?playlists_id={$playlist['id']}", $advancedCustom->embedCodeTemplate);
echo ($code); echo ($code);
@ -141,13 +146,13 @@
</div><!-- /.modal --> </div><!-- /.modal -->
<script> <script>
$(function () { $(function () {
$('.seriePlaylist').click(function () { $('.seriePlaylist').click(function () {
$($('#seriePlaylistModal').find('iframe')[0]).attr('src', 'about:blank'); $($('#seriePlaylistModal').find('iframe')[0]).attr('src', 'about:blank');
var playlist_id = $(this).attr('playlist_id'); var playlist_id = $(this).attr('playlist_id');
$($('#seriePlaylistModal').find('iframe')[0]).attr('src', '<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/playListToSerie.php?playlist_id=' + playlist_id); $($('#seriePlaylistModal').find('iframe')[0]).attr('src', '<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/playListToSerie.php?playlist_id=' + playlist_id);
$('#seriePlaylistModal').modal(); $('#seriePlaylistModal').modal();
//$('#seriePlaylistModal').modal('hide'); //$('#seriePlaylistModal').modal('hide');
}); });
}); });
</script> </script>
@ -231,18 +236,18 @@
<?php <?php
if (!empty($serie['trailer1'])) { if (!empty($serie['trailer1'])) {
?> ?>
<a href="#" class="btn btn-xs btn-warning" onclick="$(this).removeAttr('href');$('#serie<?php echo $serie['id']; ?> img').fadeOut();$('<iframe>', { <a href="#" class="btn btn-xs btn-warning" onclick="$(this).removeAttr('href'); $('#serie<?php echo $serie['id']; ?> img').fadeOut(); $('<iframe>', {
src: '<?php echo parseVideos($serie['trailer1'], 1, 0, 0, 0, 1, 0, 'fill'); ?>', src: '<?php echo parseVideos($serie['trailer1'], 1, 0, 0, 0, 1, 0, 'fill'); ?>',
id: 'myFrame<?php echo $serie['id']; ?>', id: 'myFrame<?php echo $serie['id']; ?>',
allow: 'autoplay', allow: 'autoplay',
frameborder: 0, frameborder: 0,
height: 200, height: 200,
width: '100%', width: '100%',
scrolling: 'no' scrolling: 'no'
}).appendTo('#serie<?php echo $serie['id']; ?>'); }).appendTo('#serie<?php echo $serie['id']; ?>');
$(this).removeAttr('onclick'); $(this).removeAttr('onclick');
$(this).fadeOut(); $(this).fadeOut();
return false;"> return false;">
<span class="fa fa-film"></span> <span class="fa fa-film"></span>
<span class="hidden-xs"><?php echo __("Trailer"); ?></span> <span class="hidden-xs"><?php echo __("Trailer"); ?></span>
</a> </a>
@ -311,19 +316,19 @@
} }
?> ?>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['watchLaterId']; ?>);return false;" class="btn btn-dark btn-xs watchLaterBtnAdded watchLaterBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Watch Later"); ?>" style="color: #4285f4;<?php echo $watchLaterBtnAddedStyle; ?>" ><i class="fas fa-check"></i></button> <button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['watchLaterId']; ?>); return false;" class="btn btn-dark btn-xs watchLaterBtnAdded watchLaterBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Watch Later"); ?>" style="color: #4285f4;<?php echo $watchLaterBtnAddedStyle; ?>" ><i class="fas fa-check"></i></button>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['watchLaterId']; ?>); <button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['watchLaterId']; ?>);
return false;" class="btn btn-dark btn-xs watchLaterBtn watchLaterBtn<?php echo $value['id']; ?>" title="<?php echo __("Watch Later"); ?>" style="<?php echo $watchLaterBtnStyle; ?>" ><i class="fas fa-clock"></i></button> return false;" class="btn btn-dark btn-xs watchLaterBtn watchLaterBtn<?php echo $value['id']; ?>" title="<?php echo __("Watch Later"); ?>" style="<?php echo $watchLaterBtnStyle; ?>" ><i class="fas fa-clock"></i></button>
<br> <br>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['favoriteId']; ?>); <button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['favoriteId']; ?>);
return false;" class="btn btn-dark btn-xs favoriteBtnAdded favoriteBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Favorite"); ?>" style="color: #4285f4; <?php echo $favoriteBtnAddedStyle; ?>"><i class="fas fa-check"></i></button> return false;" class="btn btn-dark btn-xs favoriteBtnAdded favoriteBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Favorite"); ?>" style="color: #4285f4; <?php echo $favoriteBtnAddedStyle; ?>"><i class="fas fa-check"></i></button>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['favoriteId']; ?>); <button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['favoriteId']; ?>);
return false;" class="btn btn-dark btn-xs favoriteBtn favoriteBtn<?php echo $value['id']; ?>" title="<?php echo __("Favorite"); ?>" style="<?php echo $favoriteBtnStyle; ?>" ><i class="fas fa-heart" ></i></button> return false;" class="btn btn-dark btn-xs favoriteBtn favoriteBtn<?php echo $value['id']; ?>" title="<?php echo __("Favorite"); ?>" style="<?php echo $favoriteBtnStyle; ?>" ><i class="fas fa-heart" ></i></button>
</div> </div>
<?php <?php
} }
?> ?>
</a> </a>
<a class="hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>"> <a class="hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>">
<h2><?php echo $value['title']; ?></h2> <h2><?php echo $value['title']; ?></h2>
@ -341,34 +346,34 @@
} }
?> ?>
</div> </div>
<?php <?php
if (empty($advancedCustom->doNotDisplayViews)) { if (empty($advancedCustom->doNotDisplayViews)) {
?> ?>
<div> <div>
<i class="fa fa-eye"></i> <i class="fa fa-eye"></i>
<span itemprop="interactionCount"> <span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?> <?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span> </span>
</div> </div>
<?php <?php
} }
?> ?>
<div> <div>
<i class="far fa-clock"></i> <i class="far fa-clock"></i>
<?php <?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?> ?>
</div> </div>
<div> <div>
<i class="fa fa-user"></i> <i class="fa fa-user"></i>
<?php <?php
echo $name; echo $name;
?> ?>
</div> </div>
<?php <?php
if (Video::canEdit($value['id'])) { if (Video::canEdit($value['id'])) {
?> ?>
<div> <div>
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>" class="text-primary"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a> <a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>" class="text-primary"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
@ -377,27 +382,27 @@
<?php <?php
} }
?> ?>
<?php <?php
if ($isMyChannel) { if ($isMyChannel) {
?> ?>
<div> <div>
<span style=" cursor: pointer;" class="btn-link text-primary removeVideo" playlist_id="<?php echo $playlist['id']; ?>" video_id="<?php echo $value['id']; ?>"> <span style=" cursor: pointer;" class="btn-link text-primary removeVideo" playlist_id="<?php echo $playlist['id']; ?>" video_id="<?php echo $value['id']; ?>">
<i class="fa fa-trash"></i> <?php echo __("Remove"); ?> <i class="fa fa-trash"></i> <?php echo __("Remove"); ?>
</span> </span>
</div> </div>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
<?php <?php
} }
?> ?>
</div>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div> </div>
<?php <?php
@ -412,150 +417,138 @@
<script> <script>
$(function () { $(function () {
$('.removeVideo').click(function () { $('.removeVideo').click(function () {
currentObject = this; currentObject = this;
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) = > {
if (willDelete) {
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
modal.showPleaseWait();
var playlist_id = $(currentObject).attr('playlist_id');
var video_id = $(currentObject).attr('video_id');
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemoveVideo.php',
data: {
"playlist_id": playlist_id,
"video_id": video_id
},
type: 'post',
success: function (response) {
reloadPlayLists();
$(".playListsIds" + video_id).prop("checked", false);
$(currentObject).closest('.galleryVideo').fadeOut();
modal.hidePleaseWait();
}
});
}
});
});
$('.deletePlaylist').click(function () {
currentObject = this;
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
modal.showPleaseWait();
var playlist_id = $(currentObject).attr('playlist_id');
console.log(playlist_id);
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemove.php',
data: {
"playlist_id": playlist_id
},
type: 'post',
success: function (response) {
$(currentObject).closest('.panel').slideUp();
modal.hidePleaseWait();
}
});
}
});
});
$('.statusPlaylist').click(function () {
var playlist_id = $(this).attr('playlist_id');
var status = "public";
if ($('#statusPrivate' + playlist_id).is(":visible")) {
status = "public";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusPublic' + playlist_id).fadeIn();
} else if ($('#statusPublic' + playlist_id).is(":visible")) {
status = "unlisted";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusUnlisted' + playlist_id).fadeIn();
} else if ($('#statusUnlisted' + playlist_id).is(":visible")) {
status = "private";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusPrivate' + playlist_id).fadeIn();
}
modal.showPleaseWait(); modal.showPleaseWait();
console.log(playlist_id); var playlist_id = $(currentObject).attr('playlist_id');
var video_id = $(currentObject).attr('video_id');
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistStatus.php', url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemoveVideo.php',
data: {
"playlist_id": playlist_id,
"status": status
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
$('.renamePlaylist').click(function () {
currentObject = this;
swal({
title: "<?php echo __("Change Playlist Name"); ?>!",
text: "<?php echo __("What is the new name?"); ?>",
content: "input",
showCancelButton: true,
closeOnConfirm: true,
inputPlaceholder: "<?php echo __("Playlist name?"); ?>"
}).then(inputValue => {
if (!inputValue || inputValue === false || inputValue === "")
return false;
modal.showPleaseWait();
var playlist_id = $(currentObject).attr('playlist_id');
console.log(playlist_id);
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRename.php',
data: { data: {
"playlist_id": playlist_id, "playlist_id": playlist_id,
"name": inputValue "video_id": video_id
}, },
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$(currentObject).closest('.panel').find('.playlistName').text(inputValue); reloadPlayLists();
modal.hidePleaseWait(); $(".playListsIds" + video_id).prop("checked", false);
$(currentObject).closest('.galleryVideo').fadeOut();
modal.hidePleaseWait();
} }
});
return false;
}); });
});
$('.sortNow').click(function () {
var $val = $(this).siblings("input").val();
sortNow(this, $val);
});
$('.video_order').keypress(function (e) {
if (e.which == 13) {
sortNow(this, $(this).val());
} }
}); });
});
$('.deletePlaylist').click(function () {
currentObject = this;
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) = > {
if (willDelete) {
modal.showPleaseWait();
var playlist_id = $(currentObject).attr('playlist_id');
console.log(playlist_id);
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemove.php',
data: {
"playlist_id": playlist_id
},
type: 'post',
success: function (response) {
$(currentObject).closest('.panel').slideUp();
modal.hidePleaseWait();
}
});
}
});
});
$('.statusPlaylist').click(function () {
var playlist_id = $(this).attr('playlist_id');
var status = "public";
if ($('#statusPrivate' + playlist_id).is(":visible")) {
status = "public";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusPublic' + playlist_id).fadeIn();
} else if ($('#statusPublic' + playlist_id).is(":visible")) {
status = "unlisted";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusUnlisted' + playlist_id).fadeIn();
} else if ($('#statusUnlisted' + playlist_id).is(":visible")) {
status = "private";
$('.statusPlaylist' + playlist_id + ' span').hide();
$('#statusPrivate' + playlist_id).fadeIn();
}
modal.showPleaseWait();
console.log(playlist_id);
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistStatus.php',
data: {
"playlist_id": playlist_id,
"status": status
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
$('.renamePlaylist').click(function () {
currentObject = this;
swal({
title: "<?php echo __("Change Playlist Name"); ?>!",
text: "<?php echo __("What is the new name?"); ?>",
content: "input",
showCancelButton: true,
closeOnConfirm: true,
inputPlaceholder: "<?php echo __("Playlist name?"); ?>"
}).then(inputValue = > {
if (!inputValue || inputValue === false || inputValue === "")
return false;
modal.showPleaseWait();
var playlist_id = $(currentObject).attr('playlist_id');
console.log(playlist_id);
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRename.php',
data: {
"playlist_id": playlist_id,
"name": inputValue
},
type: 'post',
success: function (response) {
$(currentObject).closest('.panel').find('.playlistName').text(inputValue);
modal.hidePleaseWait();
}
});
return false;
});
});
$('.sortNow').click(function () {
var $val = $(this).siblings("input").val();
sortNow(this, $val);
});
$('.video_order').keypress(function (e) {
if (e.which == 13) {
sortNow(this, $(this).val());
}
});
}); });
</script> </script>
<!-- <!--

View file

@ -110,7 +110,7 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
<a href="<?php echo $link; ?>" class="btn btn-xs btn-default playAll hrefLink" ><span class="fa fa-play"></span> <?php echo __("Play All"); ?></a><?php echo $playListButtons; ?> <a href="<?php echo $link; ?>" class="btn btn-xs btn-default playAll hrefLink" ><span class="fa fa-play"></span> <?php echo __("Play All"); ?></a><?php echo $playListButtons; ?>
<?php <?php
$liveLink = PlayLists::getLiveLink($program['id']); $liveLink = PlayLists::getLiveLink($program['id']);
if(false && !empty($liveLink)){ if(!empty($liveLink)){
?> ?>
<a href="<?php echo $liveLink; ?>" class="btn btn-xs btn-default playAll hrefLink" ><i class="fas fa-broadcast-tower"></i> <?php echo __("Play Live"); ?></a> <a href="<?php echo $liveLink; ?>" class="btn btn-xs btn-default playAll hrefLink" ><i class="fas fa-broadcast-tower"></i> <?php echo __("Play Live"); ?></a>
<?php <?php

View file

@ -2,7 +2,8 @@
if(empty($mysqlHost)){ if(empty($mysqlHost)){
die(); die();
} }
_error_log("ERROR: your site is offline"); error_log("ERROR: your site is offline we could not connect into MySQL");
error_log("ERROR: used credentials: mysqlHost = $mysqlHost; mysqlUser = $mysqlUser; mysqlPass = $mysqlPass; mysqlDatabase = $mysqlDatabase;");
?> ?>
<!doctype html> <!doctype html>
<title>Site Maintenance</title> <title>Site Maintenance</title>
@ -16,6 +17,9 @@ _error_log("ERROR: your site is offline");
</style> </style>
<article> <article>
<center>
<img src="videos/userPhoto/logo.png"/>
</center>
<h1>We&rsquo;ll be back soon!</h1> <h1>We&rsquo;ll be back soon!</h1>
<div> <div>
<p>Sorry for the inconvenience but we&rsquo;re performing some maintenance at the moment.</p> <p>Sorry for the inconvenience but we&rsquo;re performing some maintenance at the moment.</p>