1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Update page builder

This commit is contained in:
Daniel Neto 2024-04-02 13:44:59 -03:00
parent 7ec296ff28
commit b565543ec0
166 changed files with 6185 additions and 7400 deletions

View file

@ -107,7 +107,7 @@
logoImgBase64 = resp; logoImgBase64 = resp;
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/customize_settings_nativeUpdate.json.php', url: webSiteRootURL+'admin/customize_settings_nativeUpdate.json.php',
data: { data: {
"logoImgBase64": logoImgBase64, "logoImgBase64": logoImgBase64,
"webSiteTitle": $('#inputWebSiteTitle').val(), "webSiteTitle": $('#inputWebSiteTitle').val(),

View file

@ -95,27 +95,27 @@ $delay = 0.5;
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": 'default'}, data: {"theme": 'default'},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -142,27 +142,27 @@ $delay = 0.5;
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": true}, data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": true},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": 'netflix'}, data: {"theme": 'netflix'},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -189,27 +189,27 @@ $delay = 0.5;
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": true}, data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": true},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": 'default'}, data: {"theme": 'default'},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -236,27 +236,27 @@ $delay = 0.5;
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": true}, data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": true},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": 'default'}, data: {"theme": 'default'},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -285,27 +285,27 @@ $delay = 0.5;
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": true}, data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": true},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": 'default'}, data: {"theme": 'default'},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -53,12 +53,12 @@ $delay = 0.2;
$('.playerSwitch').not(this).prop('checked', false); $('.playerSwitch').not(this).prop('checked', false);
var skin = $(this).val(); var skin = $(this).val();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "e9a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "PlayerSkins", "dir": "PlayerSkins", "enable": true}, data: {"uuid": "e9a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "PlayerSkins", "dir": "PlayerSkins", "enable": true},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/playerUpdate.json.php', url: webSiteRootURL+'admin/playerUpdate.json.php',
data: {"skin": skin}, data: {"skin": skin},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -41,7 +41,7 @@
modal.showPleaseWait(); modal.showPleaseWait();
$('.themeSwitch').not(this).prop('checked', false); $('.themeSwitch').not(this).prop('checked', false);
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/themeUpdate.json.php', url: webSiteRootURL+'admin/themeUpdate.json.php',
data: {"theme": $(this).val()}, data: {"theme": $(this).val()},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -358,7 +358,7 @@ switch ($_GET['page']) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>admin/save.json.php', url: webSiteRootURL+'admin/save.json.php',
data: $(this).serialize(), data: $(this).serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -369,7 +369,7 @@ switch ($_GET['page']) {
$('.pluginSwitch').change(function (e) { $('.pluginSwitch').change(function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": $(this).attr('uuid'), "name": $(this).attr('name'), "dir": $(this).attr('name'), "enable": $(this).is(":checked")}, data: {"uuid": $(this).attr('uuid'), "name": $(this).attr('name'), "dir": $(this).attr('name'), "enable": $(this).is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -50,7 +50,7 @@
modal.showPleaseWait(); modal.showPleaseWait();
$("#emailMessage").val(tinymce.get('emailMessage').getContent()); $("#emailMessage").val(tinymce.get('emailMessage').getContent());
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/emailAllUsers.json.php', url: webSiteRootURL+'objects/emailAllUsers.json.php',
method: 'POST', method: 'POST',
data: { data: {
'message': $('#emailMessage').val(), 'message': $('#emailMessage').val(),

View file

@ -8,17 +8,17 @@ if (isset($_GET['getLanguage'])) {
require_once($lngFile); require_once($lngFile);
foreach ($t as $key => $value) { foreach ($t as $key => $value) {
if(empty($value)){ if (empty($value)) {
$t[$key] = $key; $t[$key] = $key;
} }
} }
if(!empty($_REQUEST['print'])){ if (!empty($_REQUEST['print'])) {
header('Content-Type: text/plain'); header('Content-Type: text/plain');
foreach ($t as $key => $value) { foreach ($t as $key => $value) {
echo $value.PHP_EOL; echo $value . PHP_EOL;
} }
}else{ } else {
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json_encode($t); echo json_encode($t);
} }
@ -34,28 +34,14 @@ if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) {
} }
$vars = listAllWordsToTranslate(); $vars = listAllWordsToTranslate();
$_page = new Page(array('Translate AVideo'));
?> ?>
<!DOCTYPE html> <style type="text/css">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("Translate AVideo"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style type="text/css">
textarea.form-control { textarea.form-control {
height: 100% !important; height: 100% !important;
} }
</style> </style>
</head> <div class="container-fluid">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<br> <br>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
@ -74,8 +60,8 @@ $vars = listAllWordsToTranslate();
?> ?>
</div> </div>
<script> <script>
$(function () { $(function() {
$("#div_selectFlag a").click(function (event) { $("#div_selectFlag a").click(function(event) {
event.preventDefault(); event.preventDefault();
var value = $(this).attr('value'); var value = $(this).attr('value');
var tb1 = $('#originalWords'); var tb1 = $('#originalWords');
@ -86,11 +72,11 @@ $vars = listAllWordsToTranslate();
$.ajax({ $.ajax({
url: 'index.php?getLanguage=' + value, url: 'index.php?getLanguage=' + value,
dataType: 'json' dataType: 'json'
}).done(function (data) { }).done(function(data) {
console.log("Found existing translation!"); console.log("Found existing translation!");
var arrayOfLines = $('#originalWords').val().split('\n'); var arrayOfLines = $('#originalWords').val().split('\n');
$('#translatedCode').empty(); $('#translatedCode').empty();
$.each(arrayOfLines, function (index, item) { $.each(arrayOfLines, function(index, item) {
if (data.hasOwnProperty(item)) { if (data.hasOwnProperty(item)) {
$('#translatedCode').append(data[item] + '\n'); $('#translatedCode').append(data[item] + '\n');
} else { } else {
@ -98,16 +84,16 @@ $vars = listAllWordsToTranslate();
} }
}); });
$('#translatedCode').trigger('keyup'); $('#translatedCode').trigger('keyup');
tb1.scroll(function () { tb1.scroll(function() {
tb2.scrollTop(tb1.scrollTop()); tb2.scrollTop(tb1.scrollTop());
}); });
tb2.scroll(function () { tb2.scroll(function() {
tb3.scrollTop(tb2.scrollTop()); tb3.scrollTop(tb2.scrollTop());
}); });
}).fail(function () { }).fail(function() {
console.log("New translation"); console.log("New translation");
tb1.scroll(function () { tb1.scroll(function() {
}); });
}); });
@ -136,9 +122,7 @@ $vars = listAllWordsToTranslate();
<div class="col-lg-4 col-md-12"> <div class="col-lg-4 col-md-12">
<h3><?php echo __("Translated Array"); ?></h3> <h3><?php echo __("Translated Array"); ?></h3>
<textarea placeholder="<?php echo __("Translated Array"); ?>" class="form-control" id="arrayCode" rows="20" readonly="readonly" <textarea placeholder="<?php echo __("Translated Array"); ?>" class="form-control" id="arrayCode" rows="20" readonly="readonly" style="white-space: pre;overflow-wrap: normal;overflow-x: scroll;"></textarea>
style="white-space: pre;overflow-wrap: normal;overflow-x: scroll;"
></textarea>
</div> </div>
</div> </div>
@ -158,14 +142,11 @@ $vars = listAllWordsToTranslate();
</div> </div>
</div> </div>
</div> </div>
</div><!--/.container--> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var arrayLocale = <?php echo json_encode(array_values($vars)); ?>; var arrayLocale = <?php echo json_encode(array_values($vars)); ?>;
$(document).ready(function () { $(document).ready(function() {
$('#translatedCode').keyup(function () { $('#translatedCode').keyup(function() {
var lines = $(this).val().split('\n'); var lines = $(this).val().split('\n');
console.log(lines); console.log(lines);
if (lines.length > 0 && !(lines.length == 1 && lines[0] === "")) { if (lines.length > 0 && !(lines.length == 1 && lines[0] === "")) {
@ -185,16 +166,19 @@ $vars = listAllWordsToTranslate();
} }
}); });
$('#btnSaveFile').click(function () { $('#btnSaveFile').click(function() {
if ($('#btnSaveFile').is(":disabled")) { if ($('#btnSaveFile').is(":disabled")) {
return false; return false;
} }
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: 'save.php', url: 'save.php',
data: {"flag": $("#selectFlag").val(), "code": $('#arrayCode').val()}, data: {
"flag": $("#selectFlag").val(),
"code": $('#arrayCode').val()
},
type: 'post', type: 'post',
success: function (response) { success: function(response) {
if (response.status === "1") { if (response.status === "1") {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your language has been saved!"); ?>", "success"); avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your language has been saved!"); ?>", "success");
} else { } else {
@ -205,7 +189,7 @@ $vars = listAllWordsToTranslate();
}); });
}); });
}); });
</script>
</script> <?php
</body> $_page->print();
</html> ?>

View file

@ -1,6 +1,7 @@
<?php <?php
class Page { class Page
{
private $title; private $title;
private $bodyClass = ''; private $bodyClass = '';
@ -11,78 +12,117 @@ class Page {
private $bodyContent = ''; private $bodyContent = '';
private $includeNavbar = true; private $includeNavbar = true;
private $includeFooter = true; private $includeFooter = true;
private $includeBGAnimation = false;
private $includeInHead = array(); private $includeInHead = array();
private $includeInFooter = array(); private $includeInFooter = array();
public function __construct($title, $bodyClass='') { public function __construct($title, $bodyClass = '', $loadBasicCSSAndJS = false)
{
$this->title = $title; $this->title = $title;
$this->bodyClass = $bodyClass; $this->bodyClass = $bodyClass;
_ob_start(); _ob_start();
if ($loadBasicCSSAndJS) {
$this->loadBasicCSSAndJS();
}
} }
public function setTitle(string $title) { public function loadBasicCSSAndJS()
{
$this->setExtraScripts(
array(
'view/css/DataTables/datatables.min.js',
'view/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'
)
);
$this->setExtraStyles(
array(
'view/css/DataTables/datatables.min.css',
'view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css'
)
);
}
public function setTitle(string $title)
{
$this->title = $title; $this->title = $title;
} }
public function setBodyClass(string $bodyClass) { public function setBodyClass(string $bodyClass)
{
$this->bodyClass = $bodyClass; $this->bodyClass = $bodyClass;
} }
public function setExtraScripts(array $extraScripts) { public function setExtraScripts(array $extraScripts)
{
$this->extraScripts = $extraScripts; $this->extraScripts = $extraScripts;
} }
public function setExtraStyles(array $extraStyles) { public function setExtraStyles(array $extraStyles)
{
$this->extraStyles = $extraStyles; $this->extraStyles = $extraStyles;
} }
public function setInlineStyles(string $inlineStyles) { public function setInlineStyles(string $inlineStyles)
{
$this->inlineStyles = $inlineStyles; $this->inlineStyles = $inlineStyles;
} }
public function setInlineScripts(string $inlineScripts) { public function setInlineScripts(string $inlineScripts)
{
$this->inlineScripts = $inlineScripts; $this->inlineScripts = $inlineScripts;
} }
public function setBodyContent(string $bodyContent) { public function setBodyContent(string $bodyContent)
{
$this->bodyContent = $bodyContent; $this->bodyContent = $bodyContent;
} }
public function setIncludeNavbar(bool $includeNavbar) { public function setIncludeNavbar(bool $includeNavbar)
{
$this->includeNavbar = $includeNavbar; $this->includeNavbar = $includeNavbar;
} }
public function setIncludeFooter(bool $includeFooter) { public function setIncludeFooter(bool $includeFooter)
{
$this->includeFooter = $includeFooter; $this->includeFooter = $includeFooter;
} }
public function setIncludeInHead(array $includeInHead) { public function setIncludeInHead(array $includeInHead)
{
$this->includeInHead = $includeInHead; $this->includeInHead = $includeInHead;
} }
public function setIncludeInFooter(array $includeInFooter) { public function setIncludeInFooter(array $includeInFooter)
{
$this->includeInFooter = $includeInFooter; $this->includeInFooter = $includeInFooter;
} }
public function getHead() { public function setIncludeBGAnimation(bool $includeBGAnimation)
{
$this->includeBGAnimation = $includeBGAnimation;
}
public function getHead()
{
global $config, $global; global $config, $global;
if(!is_array($this->title)){ if (!is_array($this->title)) {
$this->title = array($this->title); $this->title = array($this->title);
} }
foreach ($this->title as $key => $value) { foreach ($this->title as $key => $value) {
$this->title[$key] = __($value); $this->title[$key] = __($value);
} }
echo "<head>"; echo "<head>";
echo "<title>" . implode($config->getPageTitleSeparator(), $this->title) . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle() . "</title>"; echo getHTMLTitle($this->title);
//echo "<title>" . implode($config->getPageTitleSeparator(), $this->title) . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle() . "</title>";
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
if(!empty($this->includeInHead)){ if (!empty($this->includeInHead)) {
foreach ($this->includeInHead as $value) { foreach ($this->includeInHead as $value) {
include $global['systemRootPath'] . $value; include $global['systemRootPath'] . $value;
} }
} }
if(!empty($this->extraStyles)){ if (!empty($this->extraStyles)) {
foreach ($this->extraStyles as $style) { foreach ($this->extraStyles as $style) {
echo "<link href=\"" . $global['webSiteRootURL'].$style . "\" rel=\"stylesheet\" type=\"text/css\" />"; echo "<link href=\"" . $global['webSiteRootURL'] . $style . "\" rel=\"stylesheet\" type=\"text/css\" />";
} }
} }
@ -92,28 +132,37 @@ class Page {
echo "</head>"; echo "</head>";
} }
public function getNavBar() { public function getNavBar()
{
global $global; global $global;
if($this->includeBGAnimation){
CustomizeUser::autoIncludeBGAnimationFile();
}
$redirectUri = getRedirectUri();
if (stripos($redirectUri, "embed/") !== false) {
$this->includeNavbar = false;
}
if ($this->includeNavbar) { if ($this->includeNavbar) {
// Your navbar HTML // Your navbar HTML
include $global['systemRootPath'] . 'view/include/navbar.php'; include $global['systemRootPath'] . 'view/include/navbar.php';
} }
} }
public function getFooter() { public function getFooter()
{
global $config, $global; global $config, $global;
if ($this->includeFooter) { if ($this->includeFooter) {
// Your footer HTML // Your footer HTML
include $global['systemRootPath'] . 'view/include/footer.php'; include $global['systemRootPath'] . 'view/include/footer.php';
} }
if(!empty($this->includeInFooter)){ if (!empty($this->includeInFooter)) {
foreach ($this->includeInFooter as $value) { foreach ($this->includeInFooter as $value) {
include $global['systemRootPath'] . $value; include $global['systemRootPath'] . $value;
} }
} }
if(!empty($this->extraScripts)){ if (!empty($this->extraScripts)) {
foreach ($this->extraScripts as $script) { foreach ($this->extraScripts as $script) {
echo "<script src=\"" . $global['webSiteRootURL'].$script . "\" type=\"text/javascript\"></script>"; echo "<script src=\"" . $global['webSiteRootURL'] . $script . "\" type=\"text/javascript\"></script>";
} }
} }
if (!empty($this->inlineScripts)) { if (!empty($this->inlineScripts)) {
@ -121,7 +170,8 @@ class Page {
} }
} }
public function getContent() { public function getContent()
{
global $global; global $global;
$rtl = ''; $rtl = '';
if (isRTL()) { if (isRTL()) {
@ -137,7 +187,8 @@ class Page {
echo "</body>"; echo "</body>";
} }
public function getPage() { public function getPage()
{
echo "<!DOCTYPE html>"; echo "<!DOCTYPE html>";
echo "<html lang=\"" . getLanguage() . "\">"; echo "<html lang=\"" . getLanguage() . "\">";
$this->getHead(); $this->getHead();
@ -145,15 +196,15 @@ class Page {
echo "</html>"; echo "</html>";
} }
public function print($include_end = true){ public function print($include_end = true)
{
global $config, $global; global $config, $global;
$html = _ob_get_clean(); $html = _ob_get_clean();
_ob_start(); _ob_start();
$this->bodyContent = $html; $this->bodyContent = $html;
$this->getPage(); $this->getPage();
if($include_end){ if ($include_end) {
include $global['systemRootPath'].'objects/include_end.php'; include $global['systemRootPath'] . 'objects/include_end.php';
} }
} }
} }

View file

@ -8,7 +8,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -5488,9 +5488,16 @@ function getHTMLTitle($titleArray)
if (!is_array($titleArray)) { if (!is_array($titleArray)) {
$titleArray = []; $titleArray = [];
} }
$titleArray[] = getSEOComplement();
$titleArray[] = $config->getWebSiteTitle(); $titleArray[] = $config->getWebSiteTitle();
$cleanTitleArray = array();
foreach ($titleArray as $value) {
if(!empty($value) && !in_array($value, $cleanTitleArray)){
$cleanTitleArray[] = $value;
}
}
$title = implode($config->getPageTitleSeparator(), $titleArray); $title = implode($config->getPageTitleSeparator(), $cleanTitleArray);
$global['pageTitle'] = $title; $global['pageTitle'] = $title;
return "<title>{$title}</title>"; return "<title>{$title}</title>";
} }

View file

@ -133,7 +133,7 @@ if (!(!empty($_REQUEST['user']) && !empty($_REQUEST['recoverpass']))) {
evt.preventDefault(); evt.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/userRecoverPassSave.json.php', url: webSiteRootURL+'objects/userRecoverPassSave.json.php',
data: $('#recoverPassForm').serializeArray(), data: $('#recoverPassForm').serializeArray(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {

View file

@ -34,7 +34,7 @@
ad_overlay_users_id = users_id; ad_overlay_users_id = users_id;
$('#adsFormModal').modal(); $('#adsFormModal').modal();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AD_Overlay/getCode.json.php?users_id=' + users_id, url: webSiteRootURL+'plugin/AD_Overlay/getCode.json.php?users_id=' + users_id,
success: function (response) { success: function (response) {
$( "#addOverlayCode" ).text(response.msg); $( "#addOverlayCode" ).text(response.msg);
if(response.status == 'a'){ if(response.status == 'a'){

View file

@ -10,7 +10,7 @@ $ad->loadFromUser(User::getId());
AD Code AD Code
</div> </div>
<div class="panel-body"> <div class="panel-body">
<textarea class="form-control" rows="10" id="addOverlayCode"><?php echo $ad->getCode(); ?></textarea> <textarea class="form-control" rows="10" id="addOverlayCode"><?php echo htmlentities($ad->getCode()); ?></textarea>
<button class="btn btn-success btn-block" type="button" onclick="saveCode()"><?php echo __("Save Ad Code") ?></button> <button class="btn btn-success btn-block" type="button" onclick="saveCode()"><?php echo __("Save Ad Code") ?></button>
</div> </div>
</div> </div>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -287,7 +287,7 @@ if (!User::isAdmin()) {
$(".pluginSwitch").on("change", function (e) { $(".pluginSwitch").on("change", function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php', url: webSiteRootURL+'objects/pluginSwitch.json.php',
data: {"uuid": "3f2a707f-3c06-4b78-90f9-a22f2fda92ef", "name": "AD_Server", "dir": "AD_Server", "enable": $('#enable1').is(":checked")}, data: {"uuid": "3f2a707f-3c06-4b78-90f9-a22f2fda92ef", "name": "AD_Server", "dir": "AD_Server", "enable": $('#enable1').is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -300,7 +300,7 @@ if (!User::isAdmin()) {
minLength: 0, minLength: 0,
source: function (req, res) { source: function (req, res) {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>videos.json', url: webSiteRootURL+'videos.json',
type: "POST", type: "POST",
data: { data: {
searchPhrase: req.term, searchPhrase: req.term,
@ -481,7 +481,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AD_Server/view/addCampaign.php', url: webSiteRootURL+'plugin/AD_Server/view/addCampaign.php',
data: $('#panelForm').serialize(), data: $('#panelForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -51,7 +51,7 @@ $countries = IP2Location::getCountries();
$("#country").on("change", function (e) { $("#country").on("change", function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/User_Location/regions.json.php?country=' + $('#country').val(), url: webSiteRootURL+'plugin/User_Location/regions.json.php?country=' + $('#country').val(),
success: function (response) { success: function (response) {
$('#region').empty(); $('#region').empty();
$('#region').append($("<option></option>").text('All')); $('#region').append($("<option></option>").text('All'));
@ -68,7 +68,7 @@ $countries = IP2Location::getCountries();
$("#region").on("change", function (e) { $("#region").on("change", function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/User_Location/cities.json.php?country=' + $('#country').val() + '&region=' + $('#region').val(), url: webSiteRootURL+'plugin/User_Location/cities.json.php?country=' + $('#country').val() + '&region=' + $('#region').val(),
success: function (response) { success: function (response) {
$('#city').empty(); $('#city').empty();
$('#city').append($("<option></option>").text('All')); $('#city').append($("<option></option>").text('All'));

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -170,7 +170,7 @@ $('#Ai_metatags_responsesai_responses_id').val('');
$(document).ready(function () { $(document).ready(function () {
$('#addAi_metatags_responsesBtn').click(function () { $('#addAi_metatags_responsesBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/addAi_metatags_responsesVideo.php', url: webSiteRootURL+'plugin/AI/View/addAi_metatags_responsesVideo.php',
data: $('#panelAi_metatags_responsesForm').serialize(), data: $('#panelAi_metatags_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -220,7 +220,7 @@ $('#Ai_metatags_responsesai_responses_id').val('');
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/Ai_metatags_responses/add.json.php', url: webSiteRootURL+'plugin/AI/View/Ai_metatags_responses/add.json.php',
data: $('#panelAi_metatags_responsesForm').serialize(), data: $('#panelAi_metatags_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -94,7 +94,7 @@ $('#Ai_responsesvideos_id').val('');
$('#addAi_responsesBtn').click(function () { $('#addAi_responsesBtn').click(function () {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/addAi_responsesVideo.php', url: webSiteRootURL+'plugin/AI/View/addAi_responsesVideo.php',
data: $('#panelAi_responsesForm').serialize(), data: $('#panelAi_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -133,7 +133,7 @@ $('#Ai_responsesvideos_id').val('');
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/Ai_responses/add.json.php', url: webSiteRootURL+'plugin/AI/View/Ai_responses/add.json.php',
data: $('#panelAi_responsesForm').serialize(), data: $('#panelAi_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -138,7 +138,7 @@ $('#Ai_transcribe_responsesai_responses_id').val('');
$(document).ready(function () { $(document).ready(function () {
$('#addAi_transcribe_responsesBtn').click(function () { $('#addAi_transcribe_responsesBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/addAi_transcribe_responsesVideo.php', url: webSiteRootURL+'plugin/AI/View/addAi_transcribe_responsesVideo.php',
data: $('#panelAi_transcribe_responsesForm').serialize(), data: $('#panelAi_transcribe_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -183,7 +183,7 @@ $('#Ai_transcribe_responsesai_responses_id').val('');
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/AI/View/Ai_transcribe_responses/add.json.php', url: webSiteRootURL+'plugin/AI/View/Ai_transcribe_responses/add.json.php',
data: $('#panelAi_transcribe_responsesForm').serialize(), data: $('#panelAi_transcribe_responsesForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -13,41 +13,22 @@ if (empty($plugin)) {
forbiddenPage('API Plugin disabled'); forbiddenPage('API Plugin disabled');
} }
$obj = AVideoPlugin::getObjectData("API"); $obj = AVideoPlugin::getObjectData("API");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("API"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
pre a{
color: #333;
font-weight: bolder;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
$methodsList = array();
$reflector = new ReflectionClass('API'); $methodsList = array();
$class_methods = get_class_methods('API');
foreach ($class_methods as $key => $method[0]) { $reflector = new ReflectionClass('API');
$class_methods = get_class_methods('API');
foreach ($class_methods as $key => $method[0]) {
if (preg_match("/(get|set)_api_(.*)/", $method[0], $matches)) { if (preg_match("/(get|set)_api_(.*)/", $method[0], $matches)) {
$methodsList[] = array($method[0], $reflector, $matches[1], $matches[2], ''); $methodsList[] = array($method[0], $reflector, $matches[1], $matches[2], '');
} }
} }
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
$p = AVideoPlugin::loadPlugin($value['dirName']); $p = AVideoPlugin::loadPlugin($value['dirName']);
if(class_exists($value['dirName'])){ if (class_exists($value['dirName'])) {
$class_methods = get_class_methods($value['dirName']); $class_methods = get_class_methods($value['dirName']);
$reflector = new ReflectionClass($value['dirName']); $reflector = new ReflectionClass($value['dirName']);
foreach ($class_methods as $key => $method[0]) { foreach ($class_methods as $key => $method[0]) {
@ -56,28 +37,24 @@ $obj = AVideoPlugin::getObjectData("API");
} }
} }
} }
} }
/* $_page = new Page(array('API'));
usort($class_methods, function ($a, $b) {
if (!preg_match("/(get|set)_api_(.*)/", $a, $matchesA)) { ?>
return 0; <style>
pre a {
color: #333;
font-weight: bolder;
} }
if (!preg_match("/(get|set)_api_(.*)/", $b, $matchesB)) { </style>
return 0; <div class="container-fluid">
}
return strcasecmp($matchesA[2], $matchesB[2]);
});
*
*/
?>
<div class="container-fluid">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<details> <details>
<summary style="cursor: pointer;"><i class="fas fa-file-upload"></i> Upload a Video</summary> <summary style="cursor: pointer;"><i class="fas fa-file-upload"></i> Upload a Video</summary>
<br> <br>
For more detailed instructions please <a href="https://github.com/WWBN/AVideo/wiki/Upload-videos-from-third-party-applications" target="_blank" rel="noopener noreferrer" >read this</a> For more detailed instructions please <a href="https://github.com/WWBN/AVideo/wiki/Upload-videos-from-third-party-applications" target="_blank" rel="noopener noreferrer">read this</a>
<br> <br>
Your HTML Form should looks like this. The user and the pass values on the action URL will be the video owner Your HTML Form should looks like this. The user and the pass values on the action URL will be the video owner
<pre><?php <pre><?php
@ -105,7 +82,7 @@ $obj = AVideoPlugin::getObjectData("API");
} }
$reflector = $method[1]; $reflector = $method[1];
$icon = 'fa-solid fa-pen-to-square'; $icon = 'fa-solid fa-pen-to-square';
if(strtolower($method[2]) === "get"){ if (strtolower($method[2]) === "get") {
$icon = 'fas fa-sign-out-alt'; $icon = 'fas fa-sign-out-alt';
} }
?> ?>
@ -116,7 +93,7 @@ $obj = AVideoPlugin::getObjectData("API");
<?php echo strtoupper($method[2]); ?> <?php echo strtoupper($method[2]); ?>
<?php echo $method[3]; ?> <?php echo $method[3]; ?>
<?php <?php
if(!empty($method[4])){ if (!empty($method[4])) {
echo " ({$method[4]} plugin)"; echo " ({$method[4]} plugin)";
} }
?> ?>
@ -129,7 +106,7 @@ $obj = AVideoPlugin::getObjectData("API");
//var_dump($match2[0]); //var_dump($match2[0]);
$link = "<a target='_blank' href='{$match2[0][0]}'>" . htmlentities($match2[0][0]) . "</a>"; $link = "<a target='_blank' href='{$match2[0][0]}'>" . htmlentities($match2[0][0]) . "</a>";
$comment = str_replace([$match2[0][0], " *"], [$link, "*"], $comment); $comment = str_replace([$match2[0][0], " *"], [$link, "*"], $comment);
echo($comment); echo ($comment);
?> ?>
</pre> </pre>
</details> </details>
@ -138,9 +115,7 @@ $obj = AVideoPlugin::getObjectData("API");
} }
?> ?>
</ul> </ul>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -2,29 +2,13 @@
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin Audit")); forbiddenPage("You can not manager plugin Audit");
exit; exit;
} }
$_page = new Page(array('Audit'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Audit"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<style>
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<table id="auditTable" class="table table-striped"> <table id="auditTable" class="table table-striped">
@ -55,33 +39,47 @@ if (!User::isAdmin()) {
</table> </table>
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php'; $(document).ready(function() {
?>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script>
<script>
$(document).ready(function () {
var auditTable = $('#auditTable').DataTable({ var auditTable = $('#auditTable').DataTable({
"processing": true, "processing": true,
"serverSide": true, "serverSide": true,
"ajax": { "ajax": {
"url": "<?php echo $global['webSiteRootURL']; ?>plugin/Audit/page/audits.json.php", "url": "<?php echo $global['webSiteRootURL']; ?>plugin/Audit/page/audits.json.php",
}, },
"columns": [ "columns": [{
{"data": "class"}, "data": "class"
{"data": "method"}, },
{"data": "statement"}, {
{"data": "formats"}, "data": "method"
{"data": "values"}, },
{"data": "created"}, {
{"data": "user"}, "data": "statement"
{"data": "ip"}, },
{
"data": "formats"
},
{
"data": "values"
},
{
"data": "created"
},
{
"data": "user"
},
{
"data": "ip"
},
], ],
select: true, select: true,
"order": [[5, "desc"]] "order": [
[5, "desc"]
]
}); });
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -1,20 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("AutoPostOnSocialMedia"); AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
$_page = new Page(array('AutoPostOnSocialMedia'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: AutoPostOnSocialMedia</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<div class="row"> <div class="row">
@ -43,7 +33,7 @@ AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
$rows = Scheduler_commands::getAllFromType(AutoPostOnSocialMedia::$scheduleType); $rows = Scheduler_commands::getAllFromType(AutoPostOnSocialMedia::$scheduleType);
$savedValues = array(); $savedValues = array();
foreach ($rows as $value) { foreach ($rows as $value) {
if(!isset($savedValues[$value['repeat_day_of_week']])){ if (!isset($savedValues[$value['repeat_day_of_week']])) {
$savedValues[$value['repeat_day_of_week']] = array(); $savedValues[$value['repeat_day_of_week']] = array();
} }
$savedValues[$value['repeat_day_of_week']][] = $value['repeat_hour']; $savedValues[$value['repeat_day_of_week']][] = $value['repeat_hour'];
@ -83,14 +73,13 @@ AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
for (; $i < $time * $c; $i++) { for (; $i < $time * $c; $i++) {
$checked = ''; $checked = '';
if(!empty($savedValues[$weekday]) && in_array($i, $savedValues[$weekday])){ if (!empty($savedValues[$weekday]) && in_array($i, $savedValues[$weekday])) {
$checked = 'checked="checked"'; $checked = 'checked="checked"';
} }
?> ?>
<div class="form-check"> <div class="form-check">
<input class="form-check-input form-check-input-<?php echo $value; ?>" type="checkbox" <?php echo $checked; ?> <input class="form-check-input form-check-input-<?php echo $value; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo $weekday; ?>_<?php echo $i; ?>" id="flexCheckDefault<?php echo $value . $i; ?>">
value="<?php echo $weekday; ?>_<?php echo $i; ?>" id="flexCheckDefault<?php echo $value . $i; ?>">
<label class="form-check-label" for="flexCheckDefault<?php echo $value . $i; ?>"> <label class="form-check-label" for="flexCheckDefault<?php echo $value . $i; ?>">
<?php printf("%02d", $i); ?>H <?php printf("%02d", $i); ?>H
</label> </label>
@ -110,14 +99,12 @@ AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
?> ?>
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php'; $(function() {
?>
<script>
$(function () {
}); });
function saveScheduleTwitter() { function saveScheduleTwitter() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
@ -126,20 +113,22 @@ AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
data: { data: {
'checkedItems': getCheckedItems() 'checkedItems': getCheckedItems()
}, },
success: function (response) { success: function(response) {
avideoResponse(response); avideoResponse(response);
modal.hidePleaseWait(); modal.hidePleaseWait();
} }
}); });
} }
function getCheckedItems() { function getCheckedItems() {
var selected = new Array(); var selected = new Array();
$("input.form-check-input:checkbox:checked").each(function () { $("input.form-check-input:checkbox:checked").each(function() {
selected.push($(this).val()); selected.push($(this).val());
}); });
console.log('selected', selected); console.log('selected', selected);
return selected; return selected;
} }
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -2,7 +2,7 @@
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isLogged()) { if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
@ -10,26 +10,10 @@ $plugin = AVideoPlugin::loadPluginIfEnabled("BlockonomicsYPT");
$obj = AVideoPlugin::getObjectData("BlockonomicsYPT"); $obj = AVideoPlugin::getObjectData("BlockonomicsYPT");
$order_id = $plugin->setUpPayment($_GET['value']); $order_id = $plugin->setUpPayment($_GET['value']);
$order = new BlockonomicsOrder($order_id); $order = new BlockonomicsOrder($order_id);
$_page = new Page(array('Invoice'));
$_page->setExtraScripts(array('plugin/BlockonomicsYPT/jquery.qrcode.min.js'))
?> ?>
<!DOCTYPE html> <div class="container">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Invoice"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
@ -44,7 +28,7 @@ $order = new BlockonomicsOrder($order_id);
<a href="bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>"> <a href="bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>">
<div id="qrcode" class="text-center"></div> <div id="qrcode" class="text-center"></div>
</a> </a>
<br/> <br />
<div class="field"> <div class="field">
<div class="control"> <div class="control">
<input type="text" class="input form-control" value="<?php echo $order->getAddr(); ?>" readonly="readonly"> <input type="text" class="input form-control" value="<?php echo $order->getAddr(); ?>" readonly="readonly">
@ -56,7 +40,7 @@ $order = new BlockonomicsOrder($order_id);
<h3>Amount</h3> <h3>Amount</h3>
<p><strong><?php echo $order->getFormatedBits(); ?></strong> BTC ⇌ <strong><?php echo $order->getTotal_value(); ?></strong> <?php echo $order->getCurrency(); ?></p> <p><strong><?php echo $order->getFormatedBits(); ?></strong> BTC ⇌ <strong><?php echo $order->getTotal_value(); ?></strong> <?php echo $order->getCurrency(); ?></p>
<br/> <br />
<h2>Payment Details: </h2> <h2>Payment Details: </h2>
@ -64,14 +48,14 @@ $order = new BlockonomicsOrder($order_id);
<h4 style="display: none;" class="bstatus label label-danger" id="status-2"> Payment Error</h4> <h4 style="display: none;" class="bstatus label label-danger" id="status-2"> Payment Error</h4>
<h4 style="display: none;" class="bstatus label label-warning" id="status0"> Unconfirmed</h4> <h4 style="display: none;" class="bstatus label label-warning" id="status0"> Unconfirmed</h4>
<h4 style="display: none;" class="bstatus label label-warning" id="status1"> Partially Confirmed</h4> <h4 style="display: none;" class="bstatus label label-warning" id="status1"> Partially Confirmed</h4>
<h4 style="display: none;" class="bstatus label label-success" id="status2" >Confirmed</h4> <h4 style="display: none;" class="bstatus label label-success" id="status2">Confirmed</h4>
<div> <div>
Received : <strong id="received"><?php echo $order->getFormatedBits_payed(); ?></strong> Received : <strong id="received"><?php echo $order->getFormatedBits_payed(); ?></strong>
<small>BTC</small> <small>BTC</small>
</div> </div>
<div style="margin-bottom:10px;" > <div style="margin-bottom:10px;">
Transaction : <span id="transaction"></span> Transaction : <span id="transaction"></span>
</div> </div>
</div> </div>
@ -80,27 +64,26 @@ $order = new BlockonomicsOrder($order_id);
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="progress"> <div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:100%" id="timeleft">
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:100%" id="timeleft">
100% 100%
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script src="<?php echo getCDN(); ?>plugin/BlockonomicsYPT/jquery.qrcode.min.js" type="text/javascript"></script>
<script>
var totalSeconds = <?php echo $obj->ExpireInSeconds; ?>; var totalSeconds = <?php echo $obj->ExpireInSeconds; ?>;
var totalSecondsPassed = <?php echo time() - strtotime($order->getCreated()); ?>; var totalSecondsPassed = <?php echo time() - strtotime($order->getCreated()); ?>;
var totalSecondsleft = totalSeconds - totalSecondsPassed; var totalSecondsleft = totalSeconds - totalSecondsPassed;
$(document).ready(function () { $(document).ready(function() {
$('#qrcode').qrcode({width: 220, height: 220, text: "bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>"}); $('#qrcode').qrcode({
width: 220,
height: 220,
text: "bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>"
});
setInterval(function () { setInterval(function() {
totalSecondsleft--; totalSecondsleft--;
if (totalSecondsleft < 1) { if (totalSecondsleft < 1) {
totalSecondsleft = 0; totalSecondsleft = 0;
@ -114,23 +97,24 @@ $order = new BlockonomicsOrder($order_id);
function check() { function check() {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BlockonomicsYPT/check.php?addr=<?php echo $order->getAddr(); ?>', url: webSiteRootURL + 'plugin/BlockonomicsYPT/check.php?addr=<?php echo $order->getAddr(); ?>',
success: function (response) { success: function(response) {
console.log(response); console.log(response);
if (response.status < 2) { if (response.status < 2) {
$("#transaction").html('<a target="_blank" href="http://www.blockonomics.co/api/tx?txid=' + response.txid + '&addr={{<?php echo $order->getAddr(); ?>}}">' + response.txid + '</a>'); $("#transaction").html('<a target="_blank" href="http://www.blockonomics.co/api/tx?txid=' + response.txid + '&addr={{<?php echo $order->getAddr(); ?>}}">' + response.txid + '</a>');
$("#received").html((response.bits_payed / 1.0e8)); $("#received").html((response.bits_payed / 1.0e8));
setTimeout(function () { setTimeout(function() {
check(); check();
}, 3000); }, 3000);
}else{ } else {
response.status = 2; response.status = 2;
} }
$(".bstatus").not("#status"+response.status).hide(); $(".bstatus").not("#status" + response.status).hide();
$("#status"+response.status).fadeIn(); $("#status" + response.status).fadeIn();
} }
}); });
} }
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -99,7 +99,7 @@ $_page->setExtraScripts(
function addBookmark() { function addBookmark() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Bookmark/page/bookmarkSave.json.php', url: webSiteRootURL+'plugin/Bookmark/page/bookmarkSave.json.php',
data: { data: {
"videos_id": <?php echo $_GET['videos_id'] ?>, "videos_id": <?php echo $_GET['videos_id'] ?>,
"timeInSeconds": timeToSeconds($('#currentTime').val()), "timeInSeconds": timeToSeconds($('#currentTime').val()),
@ -146,7 +146,7 @@ $_page->setExtraScripts(
var index = $(li).attr('index'); var index = $(li).attr('index');
var id = $(li).attr('bookmarkId'); var id = $(li).attr('bookmarkId');
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Bookmark/page/bookmarkDelete.json.php', url: webSiteRootURL+'plugin/Bookmark/page/bookmarkDelete.json.php',
data: { data: {
"id": id "id": id
}, },
@ -164,7 +164,7 @@ $_page->setExtraScripts(
function loadBookmark() { function loadBookmark() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Bookmark/getBookmarks.json.php?videos_id=<?php echo $_GET['videos_id'] ?>', url: webSiteRootURL+'plugin/Bookmark/getBookmarks.json.php?videos_id=<?php echo $_GET['videos_id'] ?>',
success: function(response) { success: function(response) {
allBookmarksArray = response; allBookmarksArray = response;
bookmarksArray = (allBookmarksArray.rows); bookmarksArray = (allBookmarksArray.rows);

View file

@ -2,28 +2,13 @@
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You are not admin")); forbiddenPage("You are not admin");
exit; exit;
} }
$_page = new Page(array('Bookmarks'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Bookmarks"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<style>
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
@ -40,10 +25,7 @@ if (!User::isAdmin()) {
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script>
</body>
</html>

View file

@ -34,7 +34,7 @@
evt.preventDefault(); evt.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Bookmark/page/bookmarkSave.json.php', url: webSiteRootURL+'plugin/Bookmark/page/bookmarkSave.json.php',
data: $('#bookmarkForm').serializeArray(), data: $('#bookmarkForm').serializeArray(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -45,7 +45,7 @@
console.log(data); console.log(data);
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Bookmark/page/bookmarkDelete.json.php', url: webSiteRootURL+'plugin/Bookmark/page/bookmarkDelete.json.php',
data: {'id': data.id}, data: {'id': data.id},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,34 +1,27 @@
<?php <?php
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
if (!User::isLogged()) { if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
$obj = AVideoPlugin::getObjectData("BulkEmbed"); $obj = AVideoPlugin::getObjectData("BulkEmbed");
$_page = new Page(array('Search'));
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>"> #custom-search-input {
<head>
<?php
echo getHTMLTitle( __("Search"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#custom-search-input{
padding: 3px; padding: 3px;
border: solid 1px #E4E4E4; border: solid 1px #E4E4E4;
border-radius: 6px; border-radius: 6px;
background-color: #fff; background-color: #fff;
} }
#custom-search-input input{ #custom-search-input input {
border: 0; border: 0;
box-shadow: none; box-shadow: none;
} }
#custom-search-input button{ #custom-search-input button {
margin: 2px 0 0 0; margin: 2px 0 0 0;
background: none; background: none;
box-shadow: none; box-shadow: none;
@ -38,37 +31,43 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
border-left: solid 1px #ccc; border-left: solid 1px #ccc;
} }
#custom-search-input button:hover{ #custom-search-input button:hover {
border: 0; border: 0;
box-shadow: none; box-shadow: none;
border-left: solid 1px #ccc; border-left: solid 1px #ccc;
} }
#custom-search-input .glyphicon-search{ #custom-search-input .glyphicon-search {
font-size: 23px; font-size: 23px;
} }
#results li { #results li {
padding: 10px 0; padding: 10px 0;
border-bottom: 1px dotted #ccc; border-bottom: 1px dotted #ccc;
list-style: none; list-style: none;
overflow: auto; overflow: auto;
} }
.list-left { .list-left {
float: left; float: left;
width: 20%; width: 20%;
} }
.list-left img { .list-left img {
width: 100%; width: 100%;
padding: 3px; padding: 3px;
border: 1px solid #ccc; border: 1px solid #ccc;
} }
.list-right { .list-right {
float: right; float: right;
width: 78%; width: 78%;
} }
.list-right h3 { .list-right h3 {
margin: 0; margin: 0;
} }
.list-right p { .list-right p {
margin: 0; margin: 0;
} }
@ -91,13 +90,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
margin: 10px; margin: 10px;
cursor: pointer; cursor: pointer;
} }
</style> </style>
</head> <div class="container">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
@ -128,30 +122,26 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
<div id="buttons"></div> <div id="buttons"></div>
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var gapikey = '<?php echo $obj->API_KEY; ?>'; var gapikey = '<?php echo $obj->API_KEY; ?>';
var playListName = ''; var playListName = '';
$(function () { $(function() {
$('#search-form').submit(function (e) { $('#search-form').submit(function(e) {
e.preventDefault(); e.preventDefault();
}); });
$('#getAll').click(function () { $('#getAll').click(function() {
var videoLink = new Array(); var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]").each(function () { $("input:checkbox[name=videoCheckbox]").each(function() {
videoLink.push($(this).val()); videoLink.push($(this).val());
}); });
saveIt(videoLink); saveIt(videoLink);
}); });
$('#getSelected').click(function () { $('#getSelected').click(function() {
var videoLink = new Array(); var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]:checked").each(function () { $("input:checkbox[name=videoCheckbox]:checked").each(function() {
videoLink.push($(this).val()); videoLink.push($(this).val());
}); });
saveIt(videoLink); saveIt(videoLink);
@ -160,7 +150,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
function saveIt(videoLink) { function saveIt(videoLink) {
modal.showPleaseWait(); modal.showPleaseWait();
setTimeout(function () { setTimeout(function() {
var itemsToSave = []; var itemsToSave = [];
for (x in videoLink) { for (x in videoLink) {
if (typeof videoLink[x] === 'function') { if (typeof videoLink[x] === 'function') {
@ -169,7 +159,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
$.ajax({ $.ajax({
url: "https://www.googleapis.com/youtube/v3/videos?id=" + videoLink[x] + "&part=id,snippet,contentDetails&key=" + gapikey, url: "https://www.googleapis.com/youtube/v3/videos?id=" + videoLink[x] + "&part=id,snippet,contentDetails&key=" + gapikey,
async: false, async: false,
success: function (data) { success: function(data) {
var item = {}; var item = {};
item.link = "https://youtube.com/embed/" + data.items[0].id; item.link = "https://youtube.com/embed/" + data.items[0].id;
item.title = data.items[0].snippet.title; item.title = data.items[0].snippet.title;
@ -182,10 +172,13 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
}); });
} }
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php', url: webSiteRootURL + 'plugin/BulkEmbed/save.json.php',
data: {"itemsToSave": itemsToSave, playListName: playListName}, data: {
"itemsToSave": itemsToSave,
playListName: playListName
},
type: 'post', type: 'post',
success: function (response) { success: function(response) {
if (!response.error) { if (!response.error) {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your videos have been saved!"); ?>", "success"); avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your videos have been saved!"); ?>", "success");
} else { } else {
@ -245,7 +238,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
part: 'snippet', part: 'snippet',
key: gapikey, key: gapikey,
id: playListId id: playListId
}, function (data) { },
function(data) {
playListName = data.items[0].snippet.title; playListName = data.items[0].snippet.title;
$.get( $.get(
"https://www.googleapis.com/youtube/v3/playlistItems", { "https://www.googleapis.com/youtube/v3/playlistItems", {
@ -257,7 +251,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
videoEmbeddable: "true", videoEmbeddable: "true",
videoSyndicated: "true", videoSyndicated: "true",
playlistId: playListId playlistId: playListId
}, function (data) { },
function(data) {
processData(data); processData(data);
}); });
}); });
@ -273,7 +268,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
maxResults: 50, maxResults: 50,
videoSyndicated: "true", videoSyndicated: "true",
videoEmbeddable: "true" videoEmbeddable: "true"
}, function (data) { },
function(data) {
processData(data); processData(data);
}); });
} }
@ -287,7 +283,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
// Log data // Log data
//console.log(data); //console.log(data);
$.each(data.items, function (i, item) { $.each(data.items, function(i, item) {
// Get Output // Get Output
var output = getOutput(item); var output = getOutput(item);
@ -301,7 +297,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
$('#buttons').append(buttons); $('#buttons').append(buttons);
} }
// Next page function // Next page function
function nextPage() { function nextPage() {
var token = $('#next-button').data('token'); var token = $('#next-button').data('token');
var q = $('#next-button').data('query'); var q = $('#next-button').data('query');
@ -324,7 +320,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
key: gapikey, key: gapikey,
maxResults: 50, maxResults: 50,
videoEmbeddable: "true" videoEmbeddable: "true"
}, function (data) { },
function(data) {
var nextPageToken = data.nextPageToken; var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken; var prevPageToken = data.prevPageToken;
@ -332,7 +329,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
// Log data // Log data
console.log(data); console.log(data);
$.each(data.items, function (i, item) { $.each(data.items, function(i, item) {
// Get Output // Get Output
var output = getOutput(item); var output = getOutput(item);
@ -348,7 +345,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
}); });
} }
// Previous page function // Previous page function
function prevPage() { function prevPage() {
var token = $('#prev-button').data('token'); var token = $('#prev-button').data('token');
var q = $('#prev-button').data('query'); var q = $('#prev-button').data('query');
@ -371,7 +368,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
key: gapikey, key: gapikey,
maxResults: 50, maxResults: 50,
videoEmbeddable: "true" videoEmbeddable: "true"
}, function (data) { },
function(data) {
var nextPageToken = data.nextPageToken; var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken; var prevPageToken = data.prevPageToken;
@ -379,7 +377,7 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
// Log data // Log data
console.log(data); console.log(data);
$.each(data.items, function (i, item) { $.each(data.items, function(i, item) {
// Get Output // Get Output
var output = getOutput(item); var output = getOutput(item);
@ -395,16 +393,16 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
}); });
} }
// Build output // Build output
function getOutput(item) { function getOutput(item) {
console.log(item); console.log(item);
var videoID; var videoID;
if(typeof item.snippet.thumbnails === 'undefined'){ if (typeof item.snippet.thumbnails === 'undefined') {
return true; return true;
} }
if(item.id.videoId){ if (item.id.videoId) {
videoID = item.id.videoId; videoID = item.id.videoId;
}else{ } else {
videoID = item.snippet.resourceId.videoId; videoID = item.snippet.resourceId.videoId;
} }
var title = item.snippet.title; var title = item.snippet.title;
@ -446,6 +444,8 @@ $obj = AVideoPlugin::getObjectData("BulkEmbed");
return btnoutput; return btnoutput;
} }
</script> </script>
</body>
</html> <?php
$_page->print();
?>

View file

@ -12,20 +12,9 @@ if (!Video::canEdit($videos_id)) {
} }
$video = Video::getVideoLight($videos_id); $video = Video::getVideoLight($videos_id);
$_page = new Page(array('Move Storage'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Move Storage</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<?php <?php
$isMoving = CDNStorage::isMoving($videos_id); $isMoving = CDNStorage::isMoving($videos_id);
if (!empty($isMoving)) { if (!empty($isMoving)) {
@ -34,9 +23,7 @@ $video = Video::getVideoLight($videos_id);
include './panelMove.php'; include './panelMove.php';
} }
?> ?>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -26,16 +26,11 @@ $height = 'calc(50vh - 50px)';
if (count($downloadOptions) == 1) { if (count($downloadOptions) == 1) {
$height = 'calc(100vh - 50px)'; $height = 'calc(100vh - 50px)';
} }
$_page = new Page(array('Download Video'));
$_page->setExtraScripts(array('view/js/script.download.js'));
?> ?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head> <style>
<title><?php echo $config->getWebSiteTitle(); ?> :: Download Video</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#downloadButtons .btn { #downloadButtons .btn {
height: <?php echo $height; ?>; height: <?php echo $height; ?>;
font-size: 30px; font-size: 30px;
@ -46,14 +41,8 @@ if (count($downloadOptions) == 1) {
white-space: break-spaces; white-space: break-spaces;
padding-top: 15vh; padding-top: 15vh;
} }
</style> </style>
</head> <div class="container-fluid">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div id="downloadButtons"> <div id="downloadButtons">
<?php <?php
$count = 0; $count = 0;
@ -86,27 +75,24 @@ if (count($downloadOptions) == 1) {
} }
?> ?>
</div> </div>
</div> </div>
<script> <script>
function _goToURLOrAlertError(url, progress, format) { function _goToURLOrAlertError(url, progress, format) {
avideoToastSuccess(<?php echo json_encode(__('Downloading') . '... ' . $video['title']); ?>); avideoToastSuccess(<?php echo json_encode(__('Downloading') . '... ' . $video['title']); ?>);
downloadURLOrAlertError(url, {}, '<?php echo $video['clean_title']; ?>.' + format, progress); downloadURLOrAlertError(url, {}, '<?php echo $video['clean_title']; ?>.' + format, progress);
} }
</script> </script>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; if ($count == 1) {
?>
if ($count == 1) {
?>
<script> <script>
$(function() { $(function() {
_goToURLOrAlertError('<?php echo $lastURL; ?>', '<?php echo $progress; ?>', '<?php echo $lastFormat; ?>'); _goToURLOrAlertError('<?php echo $lastURL; ?>', '<?php echo $progress; ?>', '<?php echo $lastFormat; ?>');
}); });
</script> </script>
<?php <?php
} }
?> ?>
<script src="<?php echo getURL('view/js/script.download.js'); ?>" type="text/javascript"></script> <?php
</body> $_page->print();
?>
</html>

View file

@ -7,26 +7,23 @@ if (!isset($global['systemRootPath'])) {
$plugin = AVideoPlugin::loadPluginIfEnabled('CloneSite'); $plugin = AVideoPlugin::loadPluginIfEnabled('CloneSite');
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> $_page = new Page(array('Clone Site'));
<!DOCTYPE html> $_page->setExtraScripts(
<html lang="<?php echo getLanguage(); ?>"> array(
<head> 'view/css/DataTables/datatables.min.js',
<?php 'view/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'
echo getHTMLTitle(__("Clone Site")); )
?> );
<?php $_page->setExtraStyles(
include $global['systemRootPath'] . 'view/include/head.php'; array(
?> 'view/css/DataTables/datatables.min.css',
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/> 'view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css'
</head> )
<body class="<?php echo $global['bodyClass']; ?>"> );
<?php ?><div class="container">
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fas fa-clone"></i> <?php echo __("Manage Clones"); ?> <i class="fas fa-clone"></i> <?php echo __("Manage Clones"); ?>
@ -54,8 +51,8 @@ if (!User::isAdmin()) {
</table> </table>
</div> </div>
</div> </div>
</div> </div>
<div id="btnModelLinks" style="display: none;"> <div id="btnModelLinks" style="display: none;">
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<button href="" class="editor_status btn {status-class} btn-xs"> <button href="" class="editor_status btn {status-class} btn-xs">
<i class="{status-icon}"></i> {status-text} <i class="{status-icon}"></i> {status-text}
@ -64,28 +61,26 @@ if (!User::isAdmin()) {
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</div> </div>
</div> </div>
<script type="text/javascript">
<?php $(document).ready(function() {
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script>
<script type="text/javascript">
$(document).ready(function () {
var tableLinks = $('#campaignTable').DataTable({ var tableLinks = $('#campaignTable').DataTable({
"ajax": "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/clones.json.php", "ajax": "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/clones.json.php",
"columns": [ "columns": [{
{"data": "url"}, "data": "url"
{"data": "key"}, },
{"data": "last_clone_request"}, {
"data": "key"
},
{
"data": "last_clone_request"
},
{ {
data: 'status', data: 'status',
"render": function (data, type, full, meta) { "render": function(data, type, full, meta) {
var content = "<span class='label label-success'>Active</span>"; var content = "<span class='label label-success'>Active</span>";
if(full.status === 'i'){ if (full.status === 'i') {
content = "<span class='label label-danger'>Inactive</span>"; content = "<span class='label label-danger'>Inactive</span>";
} }
return content; return content;
@ -93,13 +88,13 @@ if (!User::isAdmin()) {
}, },
{ {
data: 'status', data: 'status',
"render": function (data, type, full, meta) { "render": function(data, type, full, meta) {
var content = $('#btnModelLinks').html(); var content = $('#btnModelLinks').html();
if(full.status === 'i'){ if (full.status === 'i') {
content = content.replace("{status-class}", "btn-success"); content = content.replace("{status-class}", "btn-success");
content = content.replace("{status-icon}", "fas fa-check-square"); content = content.replace("{status-icon}", "fas fa-check-square");
content = content.replace("{status-text}", "Activate"); content = content.replace("{status-text}", "Activate");
}else{ } else {
content = content.replace("{status-class}", "btn-default"); content = content.replace("{status-class}", "btn-default");
content = content.replace("{status-icon}", "fas fa-ban"); content = content.replace("{status-icon}", "fas fa-ban");
content = content.replace("{status-text}", "Deactivate"); content = content.replace("{status-text}", "Deactivate");
@ -110,7 +105,7 @@ if (!User::isAdmin()) {
], ],
select: true, select: true,
}); });
$('#campaignTable').on('click', 'button.editor_status', function (e) { $('#campaignTable').on('click', 'button.editor_status', function(e) {
e.preventDefault(); e.preventDefault();
var tr = $(this).closest('tr')[0]; var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data(); var data = tableLinks.row(tr).data();
@ -120,7 +115,7 @@ if (!User::isAdmin()) {
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/changeStatus.json.php", url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/changeStatus.json.php",
data: data data: data
}).done(function (resposta) { }).done(function(resposta) {
if (resposta.error) { if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error"); avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
} }
@ -128,7 +123,7 @@ if (!User::isAdmin()) {
modal.hidePleaseWait(); modal.hidePleaseWait();
}); });
}); });
$('#campaignTable').on('click', 'button.editor_delete_link', function (e) { $('#campaignTable').on('click', 'button.editor_delete_link', function(e) {
e.preventDefault(); e.preventDefault();
var tr = $(this).closest('tr')[0]; var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data(); var data = tableLinks.row(tr).data();
@ -142,13 +137,13 @@ if (!User::isAdmin()) {
}) })
.then(function(willDelete) { .then(function(willDelete) {
if (willDelete) { if (willDelete) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/delete.json.php", url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/delete.json.php",
data: data data: data
}).done(function (resposta) { }).done(function(resposta) {
if (resposta.error) { if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error"); avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
} }
@ -158,9 +153,8 @@ modal.showPleaseWait();
} }
}); });
}); });
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -105,7 +105,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addCategories_has_users_groupsBtn').click(function () { $('#addCategories_has_users_groupsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/addCategories_has_users_groupsVideo.php', url: webSiteRootURL+'plugin/CustomizeUser/View/addCategories_has_users_groupsVideo.php',
data: $('#panelCategories_has_users_groupsForm').serialize(), data: $('#panelCategories_has_users_groupsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -145,7 +145,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/Categories_has_users_groups/add.json.php', url: webSiteRootURL+'plugin/CustomizeUser/View/Categories_has_users_groups/add.json.php',
data: $('#panelCategories_has_users_groupsForm').serialize(), data: $('#panelCategories_has_users_groupsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -124,7 +124,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addUsers_affiliationsBtn').click(function () { $('#addUsers_affiliationsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/addUsers_affiliationsVideo.php', url: webSiteRootURL+'plugin/CustomizeUser/View/addUsers_affiliationsVideo.php',
data: $('#panelUsers_affiliationsForm').serialize(), data: $('#panelUsers_affiliationsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -167,7 +167,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/Users_affiliations/add.json.php', url: webSiteRootURL+'plugin/CustomizeUser/View/Users_affiliations/add.json.php',
data: $('#panelUsers_affiliationsForm').serialize(), data: $('#panelUsers_affiliationsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -153,7 +153,7 @@ if (!User::isAdmin()) {
}); });
$('#addUsers_extra_infoBtn').click(function () { $('#addUsers_extra_infoBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/addUsers_extra_infoVideo.php', url: webSiteRootURL+'plugin/CustomizeUser/View/addUsers_extra_infoVideo.php',
data: $('#panelUsers_extra_infoForm').serialize(), data: $('#panelUsers_extra_infoForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -199,7 +199,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/Users_extra_info/add.json.php', url: webSiteRootURL+'plugin/CustomizeUser/View/Users_extra_info/add.json.php',
data: $('#panelUsers_extra_infoForm').serialize(), data: $('#panelUsers_extra_infoForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,22 +4,10 @@ if (!User::isAdmin()) {
forbiddenPage("Must be admin"); forbiddenPage("Must be admin");
} }
AVideoPlugin::loadPlugin("CustomizeUser"); AVideoPlugin::loadPlugin("CustomizeUser");
$_page = new Page(array('Customize User'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><i class="fas fa-user"></i> <?php echo __('CustomizeUser') ?></div> <div class="panel-heading"><i class="fas fa-user"></i> <?php echo __('CustomizeUser') ?></div>
<div class="panel-body"> <div class="panel-body">
@ -47,11 +35,7 @@ AVideoPlugin::loadPlugin("CustomizeUser");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -94,7 +94,7 @@
var data = Users_affiliationstableVar.row(tr).data(); var data = Users_affiliationstableVar.row(tr).data();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/Users_affiliations/confirm.json.php', url: webSiteRootURL+'plugin/CustomizeUser/View/Users_affiliations/confirm.json.php',
data: {id: data.id, confirm: confirm}, data: {id: data.id, confirm: confirm},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -108,7 +108,7 @@
$(document).ready(function () { $(document).ready(function () {
$('#addUsers_affiliationsBtn').click(function () { $('#addUsers_affiliationsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/addUsers_affiliationsVideo.php', url: webSiteRootURL+'plugin/CustomizeUser/View/addUsers_affiliationsVideo.php',
data: $('#panelUsers_affiliationsForm').serialize(), data: $('#panelUsers_affiliationsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -164,7 +164,7 @@ echo 'var sendConfirmationCancelButton = row.company_agree_date && row.affiliate
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/View/Users_affiliations/add.json.php', url: webSiteRootURL+'plugin/CustomizeUser/View/Users_affiliations/add.json.php',
data: $('#panelUsers_affiliationsForm').serialize(), data: $('#panelUsers_affiliationsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -118,7 +118,7 @@ if ($obj->allowWalletDirectTransferDonation && !empty($video['users_id']) && cla
function submitDonation<?php echo $uid; ?>() { function submitDonation<?php echo $uid; ?>() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/donate.json.php', url: webSiteRootURL+'plugin/CustomizeUser/donate.json.php',
data: { data: {
"value": $('#donationValue<?php echo $uid; ?>').val(), "value": $('#donationValue<?php echo $uid; ?>').val(),
"videos_id": <?php echo intval(@$video['id']); ?>, "videos_id": <?php echo intval(@$video['id']); ?>,
@ -144,7 +144,7 @@ if ($obj->allowWalletDirectTransferDonation && !empty($video['users_id']) && cla
function submitDonationButton<?php echo $uid; ?>(buttonIndex) { function submitDonationButton<?php echo $uid; ?>(buttonIndex) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/donate.json.php', url: webSiteRootURL+'plugin/CustomizeUser/donate.json.php',
data: { data: {
"buttonIndex": buttonIndex, "buttonIndex": buttonIndex,
"videos_id": <?php echo intval(@$video['id']); ?>, "videos_id": <?php echo intval(@$video['id']); ?>,

View file

@ -8,41 +8,34 @@ if (!empty($images->posterPortrait) && !ImagesPlaceHolders::isDefaultImage($imag
} }
$imgw = 1280; $imgw = 1280;
$imgh = 720; $imgh = 720;
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false); $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false);
$_page = new Page(array('Confirm Password'));
$_page->setIncludeNavbar(false);
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Password") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
body { body {
padding-top: 0; padding-top: 0;
} }
footer{
footer {
display: none; display: none;
} }
#bg{
#bg {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('<?php echo $images->poster; ?>'); background-image: url('<?php echo $images->poster; ?>');
background-size: cover; background-size: cover;
opacity: 0.3; opacity: 0.3;
filter: alpha(opacity=30); /* For IE8 and earlier */ filter: alpha(opacity=30);
/* For IE8 and earlier */
} }
</style> </style>
</head> <div id="bg"></div>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
//include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div id="bg"></div>
<!-- Modal --> <!-- Modal -->
<div id="myModal" class="modal fade in" role="dialog"> <div id="myModal" class="modal fade in" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
@ -57,7 +50,7 @@ $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false)
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<img src="<?php echo $img; ?>" class="img img-responsive"/> <img src="<?php echo $img; ?>" class="img img-responsive" />
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<center> <center>
@ -91,14 +84,12 @@ $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false)
</div> </div>
</div> </div>
</div> </div>
<?php <script type="text/javascript">
include $global['systemRootPath'] . 'view/include/footer.php'; $(window).on('load', function() {
?>
<script type="text/javascript">
$(window).on('load', function () {
$('#myModal').modal('show'); $('#myModal').modal('show');
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -20,20 +20,9 @@ if (empty($sources)) {
forbiddenPage("Empty sources"); forbiddenPage("Empty sources");
} }
//var_dump($sources); //var_dump($sources);
$_page = new Page(array('Customize User'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fas fa-file"></i> <?php echo __('Source Files') ?> <i class="fas fa-file"></i> <?php echo __('Source Files') ?>
@ -48,9 +37,9 @@ if (empty($sources)) {
</div> </div>
<div class="panel-body"> <div class="panel-body">
<?php <?php
if(is_string($value)){ if (is_string($value)) {
echo "$value <br>"; echo "$value <br>";
}else{ } else {
foreach ($value as $key2 => $value2) { foreach ($value as $key2 => $value2) {
echo "<strong class='badge '>{$key2}</strong> $value2 <br>"; echo "<strong class='badge '>{$key2}</strong> $value2 <br>";
} }
@ -63,9 +52,7 @@ if (empty($sources)) {
?> ?>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -9,17 +9,9 @@ if (empty($users_id)) {
forbiddenPage('Empty users_id'); forbiddenPage('Empty users_id');
} }
$pass = User::getProfilePassword($users_id); $pass = User::getProfilePassword($users_id);
$_page = new Page(array('Set Password'));
?> ?>
<!DOCTYPE html> <div class="panel panel-default">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Set Password"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<?php <?php
echo Video::getCreatorHTML($users_id); echo Video::getCreatorHTML($users_id);
@ -28,7 +20,7 @@ $pass = User::getProfilePassword($users_id);
<div class="panel-body"> <div class="panel-body">
Protect the user's channel with a password Protect the user's channel with a password
<?php <?php
echo getInputPassword('ProfilePassword', 'maxlength="100" value="'.$pass.'" class="form-control"', __('Channel Password')); echo getInputPassword('ProfilePassword', 'maxlength="100" value="' . $pass . '" class="form-control"', __('Channel Password'));
?> ?>
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
@ -36,11 +28,8 @@ $pass = User::getProfilePassword($users_id);
<i class="fas fa-save"></i> <?php echo __('Save'); ?> <i class="fas fa-save"></i> <?php echo __('Save'); ?>
</button> </button>
</div> </div>
</div> </div>
<?php <script type="text/javascript">
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
function setSubscribers() { function setSubscribers() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
@ -50,18 +39,19 @@ $pass = User::getProfilePassword($users_id);
users_id: <?php echo $users_id; ?>, users_id: <?php echo $users_id; ?>,
ProfilePassword: $('#ProfilePassword').val() ProfilePassword: $('#ProfilePassword').val()
}, },
success: function (response) { success: function(response) {
modal.hidePleaseWait(); modal.hidePleaseWait();
avideoResponse(response); avideoResponse(response);
} }
}); });
} }
$(document).ready(function () { $(document).ready(function() {
$('#ProfilePassword').keyup(function () { $('#ProfilePassword').keyup(function() {
$(this).val($(this).val().replace(/[^0-9a-z]/i, '')); $(this).val($(this).val().replace(/[^0-9a-z]/i, ''));
}); });
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -9,16 +9,10 @@ if (empty($users_id)) {
forbiddenPage('Empty users_id'); forbiddenPage('Empty users_id');
} }
$count = User::getExtraSubscribers($users_id); $count = User::getExtraSubscribers($users_id);
$_page = new Page(array('Set subscribers'));
?> ?>
<!DOCTYPE html> <div class="container">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Set subscribers"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<?php <?php
@ -26,7 +20,7 @@ $count = User::getExtraSubscribers($users_id);
?> ?>
</div> </div>
<div class="panel-body"> <div class="panel-body">
Add extra <input type="number" step="1" id="ExtraSubscribers" value="<?php echo $count; ?>"/> subscribers on his subscription counter. Add extra <input type="number" step="1" id="ExtraSubscribers" value="<?php echo $count; ?>" /> subscribers on his subscription counter.
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
@ -35,9 +29,6 @@ $count = User::getExtraSubscribers($users_id);
</button> </button>
</div> </div>
</div> </div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript"> <script type="text/javascript">
function setSubscribers() { function setSubscribers() {
modal.showPleaseWait(); modal.showPleaseWait();
@ -48,12 +39,14 @@ $count = User::getExtraSubscribers($users_id);
users_id: <?php echo $users_id; ?>, users_id: <?php echo $users_id; ?>,
ExtraSubscribers: $('#ExtraSubscribers').val() ExtraSubscribers: $('#ExtraSubscribers').val()
}, },
success: function (response) { success: function(response) {
modal.hidePleaseWait(); modal.hidePleaseWait();
avideoResponse(response); avideoResponse(response);
} }
}); });
} }
</script> </script>
</body> </div>
</html> <?php
$_page->print();
?>

View file

@ -10,7 +10,7 @@ $uid = uniqid();
$('#switch<?php echo $uid; ?>').change(function (e) { $('#switch<?php echo $uid; ?>').change(function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/set.json.php', url: webSiteRootURL+'plugin/CustomizeUser/set.json.php',
data: {"type": "userCanAllowFilesDownload", "value": $('#switch<?php echo $uid; ?>').is(":checked")}, data: {"type": "userCanAllowFilesDownload", "value": $('#switch<?php echo $uid; ?>').is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -10,7 +10,7 @@ $uid = uniqid();
$('#switch<?php echo $uid; ?>').change(function (e) { $('#switch<?php echo $uid; ?>').change(function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/CustomizeUser/set.json.php', url: webSiteRootURL+'plugin/CustomizeUser/set.json.php',
data: {"type": "userCanAllowFilesShare", "value": $('#switch<?php echo $uid; ?>').is(":checked")}, data: {"type": "userCanAllowFilesShare", "value": $('#switch<?php echo $uid; ?>').is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,26 +1,13 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
$_page = new Page(array('Animations'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("Animations"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="row"> <div class="row">
<?php <?php
foreach (glob("{$global['systemRootPath']}plugin/Layout/animatedBackGrounds/*.php") as $file) { foreach (glob("{$global['systemRootPath']}plugin/Layout/animatedBackGrounds/*.php") as $file) {
$name = basename($file); $name = basename($file);
if($name === 'index.php'){ if ($name === 'index.php') {
continue; continue;
} }
$url = str_replace($global['systemRootPath'], getCDN(), $file); $url = str_replace($global['systemRootPath'], getCDN(), $file);
@ -28,9 +15,7 @@ require_once '../../../videos/configuration.php';
} }
?> ?>
</div> </div>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -28,37 +28,33 @@ if (!empty($_REQUEST['live_schedule'])) {
} }
$imgw = 640; $imgw = 640;
$imgh = 360; $imgh = 360;
$_page = new Page(array('Confirm Password'));
$_page->setIncludeNavbar(false);
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Password"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
body { body {
padding-top: 0; padding-top: 0;
} }
footer{
footer {
display: none; display: none;
} }
#bg{
#bg {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('<?php echo $img; ?>'); background-image: url('<?php echo $img; ?>');
background-size: cover; background-size: cover;
opacity: 0.3; opacity: 0.3;
filter: alpha(opacity=30); /* For IE8 and earlier */ filter: alpha(opacity=30);
/* For IE8 and earlier */
} }
</style> </style>
</head> <div id="bg"></div>
<body>
<div id="bg"></div>
<!-- Modal --> <!-- Modal -->
<div id="myModal" class="modal fade in" role="dialog"> <div id="myModal" class="modal fade in" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
@ -73,7 +69,7 @@ $imgh = 360;
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<img src="<?php echo $img; ?>" class="img img-responsive"/> <img src="<?php echo $img; ?>" class="img img-responsive" />
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<center> <center>
@ -107,14 +103,12 @@ $imgh = 360;
</div> </div>
</div> </div>
</div> </div>
<?php <script type="text/javascript">
include $global['systemRootPath'] . 'view/include/footer.php'; $(window).on('load', function() {
?>
<script type="text/javascript">
$(window).on('load', function () {
$('#myModal').modal('show'); $('#myModal').modal('show');
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -113,55 +113,20 @@ if (!empty($chat2) && !empty($chat2->useStaticLayout)) {
} }
*/ */
$global['doNotLoadPlayer'] = 1; $global['doNotLoadPlayer'] = 1;
$_page = new Page(array('Live'));
$_page->setExtraScripts(
array(
'view/js/bootstrap-fileinput/js/fileinput.min.js',
)
);
$_page->setExtraStyles(
array(
'view/js/bootstrap-fileinput/css/fileinput.min.css',
)
);
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link href="<?php echo getURL('view/js/bootstrap-fileinput/css/fileinput.min.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo getURL('view/js/bootstrap-fileinput/js/fileinput.min.js'); ?>" type="text/javascript"></script>
<style>
.krajee-default.file-preview-frame .kv-file-content {
width: auto;
height: auto;
}
#live .panel-body {
height: calc(100vh - 220px);
}
#live .panel-body>div,
#mainVideo {
height: -webkit-fill-available;
width: -webkit-fill-available;
}
<?php
/*
if (AVideoPlugin::isEnabledByName('Chat2')) {
?>
@media (max-width: 769px) {
#live .panel-body {
height: calc(50vh - 200px);
}
}
<?php
}
*
*/
?>
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading tabbable-line"> <div class="panel-heading tabbable-line">
@ -268,11 +233,8 @@ $global['doNotLoadPlayer'] = 1;
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var flashvars = { var flashvars = {
server: "<?php echo Live::getRTMPLinkWithOutKeyFromKey($trasnmition['key']); ?>", server: "<?php echo Live::getRTMPLinkWithOutKeyFromKey($trasnmition['key']); ?>",
stream: "<?php echo $trasnmition['key']; ?>" stream: "<?php echo $trasnmition['key']; ?>"
@ -289,7 +251,7 @@ $global['doNotLoadPlayer'] = 1;
}); });
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/saveLive.php', url: webSiteRootURL+'plugin/Live/saveLive.php',
data: { data: {
"title": $('#title').val(), "title": $('#title').val(),
"description": $('#description').val(), "description": $('#description').val(),
@ -332,8 +294,7 @@ $global['doNotLoadPlayer'] = 1;
echo PlayerSkins::getStartPlayerJS("", "", true); echo PlayerSkins::getStartPlayerJS("", "", true);
?> ?>
}); });
</script> </script>
</body> <?php
$_page->print();
</html> ?>
<?php include_once $global['systemRootPath'] . 'objects/include_end.php'; ?>

View file

@ -14,24 +14,17 @@ $ls = new Live_schedule($_REQUEST['live_schedule_id']);
$liveImg = Live_schedule::getPosterURL($_REQUEST['live_schedule_id']); $liveImg = Live_schedule::getPosterURL($_REQUEST['live_schedule_id']);
$liveInfo = Live::getInfo($ls->getKey(), $ls->getLive_servers_id()); $liveInfo = Live::getInfo($ls->getKey(), $ls->getLive_servers_id());
$_page = new Page(array('Remind me'));
//$_page->setIncludeNavbar(false);
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>"> .schedulePoster {
<head>
<title>Remind me</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.schedulePoster{
max-width: 20vw; max-width: 20vw;
max-height: 10vh; max-height: 10vh;
padding: 0 10px 0 0; padding: 0 10px 0 0;
} }
</style> </style>
</head> <div class="container-fluid">
<body style="padding: 0 10px;">
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading clearfix"> <div class="panel-heading clearfix">
<div class="pull-left"> <div class="pull-left">
@ -53,16 +46,14 @@ $liveInfo = Live::getInfo($ls->getKey(), $ls->getLive_servers_id());
echo Live::getScheduleReminderOptions($_REQUEST['live_schedule_id']); echo Live::getScheduleReminderOptions($_REQUEST['live_schedule_id']);
?> ?>
</div> </div>
<div class="panel-footer" > <div class="panel-footer">
<i class="far fa-clock"></i> <i class="far fa-clock"></i>
<?php <?php
echo $liveInfo['displayTime']; echo $liveInfo['displayTime'];
?> ?>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -7,34 +7,22 @@ if (!isset($global['systemRootPath'])) {
if (!Live::canRestream()) { if (!Live::canRestream()) {
forbiddenPage('You cannot restream'); forbiddenPage('You cannot restream');
} }
$_page = new Page(array('Active Lives'));
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
//include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_head.php';
?>
<style>
#livesRestreamList .livesRestreamStatus.inactive .hideWhenInactive, #livesRestreamList .livesRestreamStatus.inactive .hideWhenInactive,
#livesRestreamList .livesRestreamStatus.active .hideWhenActive, #livesRestreamList .livesRestreamStatus.active .hideWhenActive,
#livesRestreamList .livesRestreamStatus.loading .hideWhenLoading, #livesRestreamList .livesRestreamStatus.loading .hideWhenLoading,
#livesRestreamList .livesRestreamStatus.hasLog .hideWhenHasLog, #livesRestreamList .livesRestreamStatus.hasLog .hideWhenHasLog,
#livesRestreamList .livesRestreamStatus.hasNoLog .hideWhenHasNoLog{ #livesRestreamList .livesRestreamStatus.hasNoLog .hideWhenHasNoLog {
display: none; display: none;
} }
#livesRestreamList .livesRestreamStatus.active .showWhenActive{ #livesRestreamList .livesRestreamStatus.active .showWhenActive {
display: inline-flex; display: inline-flex;
} }
</style> </style>
</head> <div class="container-fluid">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
@ -68,19 +56,12 @@ if (!Live::canRestream()) {
</button> </button>
</div> </div>
</div> </div>
</div>
<script>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var activeLiveTemplate = <?php echo json_encode(file_get_contents($global['systemRootPath'] . 'plugin/Live/view/getActiveLives.template.html')); ?>; var activeLiveTemplate = <?php echo json_encode(file_get_contents($global['systemRootPath'] . 'plugin/Live/view/getActiveLives.template.html')); ?>;
var activeLiveRestreamTemplate = <?php echo json_encode(file_get_contents($global['systemRootPath'] . 'plugin/Live/view/getActiveLivesRestreams.template.html')); ?>; var activeLiveRestreamTemplate = <?php echo json_encode(file_get_contents($global['systemRootPath'] . 'plugin/Live/view/getActiveLivesRestreams.template.html')); ?>;
$(document).ready(function () { $(document).ready(function() {
getActiveLives(); getActiveLives();
}); });
@ -93,7 +74,7 @@ if (!Live::canRestream()) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: url, url: url,
success: function (response) { success: function(response) {
modal.hidePleaseWait(); modal.hidePleaseWait();
if (response.error) { if (response.error) {
avideoAlertError(response.msg); avideoAlertError(response.msg);
@ -108,13 +89,12 @@ if (!Live::canRestream()) {
}); });
} }
function getActiveLives() { function getActiveLives() {
var url = webSiteRootURL + 'plugin/Live/view/getActiveLives.json.php'; var url = webSiteRootURL + 'plugin/Live/view/getActiveLives.json.php';
//modal.showPleaseWait(); //modal.showPleaseWait();
$.ajax({ $.ajax({
url: url, url: url,
success: function (response) { success: function(response) {
console.log('getActiveLives', response); console.log('getActiveLives', response);
//modal.hidePleaseWait(); //modal.hidePleaseWait();
if (response.error) { if (response.error) {
@ -158,7 +138,7 @@ if (!Live::canRestream()) {
} }
function loadIfRestreamIsActive() { function loadIfRestreamIsActive() {
$(".livesRestreamStatus").each(function (index) { $(".livesRestreamStatus").each(function(index) {
var restreams_id = $(this).attr('restreams_id'); var restreams_id = $(this).attr('restreams_id');
var live_transmitions_history_id = $(this).attr('live_transmitions_history_id'); var live_transmitions_history_id = $(this).attr('live_transmitions_history_id');
checkIfRestreamIsActive(live_transmitions_history_id, restreams_id); checkIfRestreamIsActive(live_transmitions_history_id, restreams_id);
@ -166,6 +146,7 @@ if (!Live::canRestream()) {
} }
var checkIfRestreamIsActiveTimeout = []; var checkIfRestreamIsActiveTimeout = [];
function checkIfRestreamIsActive(live_transmitions_history_id, restreams_id) { function checkIfRestreamIsActive(live_transmitions_history_id, restreams_id) {
var live_restream_id = live_transmitions_history_id + '_' + restreams_id; var live_restream_id = live_transmitions_history_id + '_' + restreams_id;
clearTimeout(checkIfRestreamIsActiveTimeout[live_restream_id]); clearTimeout(checkIfRestreamIsActiveTimeout[live_restream_id]);
@ -175,7 +156,7 @@ if (!Live::canRestream()) {
url = addQueryStringParameter(url, 'restreams_id', restreams_id); url = addQueryStringParameter(url, 'restreams_id', restreams_id);
$.ajax({ $.ajax({
url: url, url: url,
success: function (response) { success: function(response) {
if (response.error) { if (response.error) {
avideoAlertError(response.msg); avideoAlertError(response.msg);
} else { } else {
@ -192,7 +173,7 @@ if (!Live::canRestream()) {
} }
} }
} }
checkIfRestreamIsActiveTimeout[live_restream_id] = setTimeout(function () { checkIfRestreamIsActiveTimeout[live_restream_id] = setTimeout(function() {
checkIfRestreamIsActive(live_transmitions_history_id, restreams_id); checkIfRestreamIsActive(live_transmitions_history_id, restreams_id);
}, 120000); }, 120000);
} }
@ -201,15 +182,19 @@ if (!Live::canRestream()) {
function setRestreamHasNoLog(live_transmitions_history_id, restreams_id) { function setRestreamHasNoLog(live_transmitions_history_id, restreams_id) {
removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'hasNoLog'); removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'hasNoLog');
} }
function setRestreamHasLog(live_transmitions_history_id, restreams_id) { function setRestreamHasLog(live_transmitions_history_id, restreams_id) {
removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'hasLog'); removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'hasLog');
} }
function setRestreamLogLoading(live_transmitions_history_id, restreams_id) { function setRestreamLogLoading(live_transmitions_history_id, restreams_id) {
removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'loading'); removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'loading');
} }
function setRestreamLogActive(live_transmitions_history_id, restreams_id) { function setRestreamLogActive(live_transmitions_history_id, restreams_id) {
removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'active'); removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'active');
} }
function setRestreamLogInactive(live_transmitions_history_id, restreams_id) { function setRestreamLogInactive(live_transmitions_history_id, restreams_id) {
removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'inactive'); removeAllClassesAndAdd(live_transmitions_history_id, restreams_id, 'inactive');
} }
@ -224,6 +209,7 @@ if (!Live::canRestream()) {
$(".livesRestreamStatus_" + live_restream_id).addClass(addClass); $(".livesRestreamStatus_" + live_restream_id).addClass(addClass);
} }
} }
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -119,7 +119,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addLive_restreamsBtn').click(function () { $('#addLive_restreamsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/addLive_restreamsVideo.php', url: webSiteRootURL+'plugin/Live/view/addLive_restreamsVideo.php',
data: $('#panelLive_restreamsForm').serialize(), data: $('#panelLive_restreamsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -161,7 +161,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/Live_restreams/add.json.php', url: webSiteRootURL+'plugin/Live/view/Live_restreams/add.json.php',
data: $('#panelLive_restreamsForm').serialize(), data: $('#panelLive_restreamsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../../../videos/configuration.php'; require_once '../../../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -178,7 +178,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addLive_scheduleBtn').click(function () { $('#addLive_scheduleBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/addLive_scheduleVideo.php', url: webSiteRootURL+'plugin/Live/view/addLive_scheduleVideo.php',
data: $('#panelLive_scheduleForm').serialize(), data: $('#panelLive_scheduleForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -226,7 +226,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/Live_schedule/add.json.php', url: webSiteRootURL+'plugin/Live/view/Live_schedule/add.json.php',
data: $('#panelLive_scheduleForm').serialize(), data: $('#panelLive_scheduleForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -8,20 +8,7 @@ if (!User::canStream()) {
exit; exit;
} }
$_page = new Page(array('Live'));
include $global['systemRootPath'] . 'plugin/Live/view/Live_schedule/panel.php';
$_page->print();
?> ?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Live</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/view/Live_schedule/panel.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -33,20 +33,9 @@ $image_postroll = getURL($poster);
$defaultTIme = 30; $defaultTIme = 30;
$defaultCloseTIme = 10; $defaultCloseTIme = 10;
$_page = new Page(array('Upload Poster'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Upload Poster</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<div class="panel panel-default"> <div class="panel panel-default">
@ -155,14 +144,11 @@ $defaultCloseTIme = 10;
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var closeWindowAfterImageSave = false; var closeWindowAfterImageSave = false;
var posterType = 0; var posterType = 0;
function <?php echo $callBackJSFunction; ?>(image) { function <?php echo $callBackJSFunction; ?>(image) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
@ -176,7 +162,7 @@ $defaultCloseTIme = 10;
image: image, image: image,
}, },
type: 'post', type: 'post',
success: function (response) { success: function(response) {
modal.hidePleaseWait(); modal.hidePleaseWait();
avideoResponse(response); avideoResponse(response);
if (response && !response.error) { if (response && !response.error) {
@ -191,12 +177,12 @@ $defaultCloseTIme = 10;
} }
$(document).ready(function () { $(document).ready(function() {
<?php <?php
echo $croppie1['createCroppie'] . "('{$image}');"; echo $croppie1['createCroppie'] . "('{$image}');";
?> ?>
$('.posterTypeBtn').click(function () { $('.posterTypeBtn').click(function() {
posterType = parseInt($(this).attr('posterType')); posterType = parseInt($(this).attr('posterType'));
$('.posterTypeBtn').removeClass('active'); $('.posterTypeBtn').removeClass('active');
$('.posterTypeBtn[posterType="' + posterType + '"]').addClass('active'); $('.posterTypeBtn[posterType="' + posterType + '"]').addClass('active');
@ -219,19 +205,19 @@ echo $croppie1['createCroppie'] . "('{$image}');";
break; break;
} }
console.log('posterTypeBtn click', posterType, imageToRelaod); console.log('posterTypeBtn click', posterType, imageToRelaod);
<?php <?php
echo $croppie1['restartCroppie'] . "(imageToRelaod);"; echo $croppie1['restartCroppie'] . "(imageToRelaod);";
?> ?>
var liveImgCloseTimeInSeconds = -1; var liveImgCloseTimeInSeconds = -1;
var liveImgTimeInSeconds = <?php echo $defaultTIme; ?>; var liveImgTimeInSeconds = <?php echo $defaultTIme; ?>;
if (jsonFile) { if (jsonFile) {
modal.showPleaseWait(); modal.showPleaseWait();
$.getJSON(jsonFile, function (data) { $.getJSON(jsonFile, function(data) {
if (data) { if (data) {
liveImgCloseTimeInSeconds = data.liveImgCloseTimeInSeconds; liveImgCloseTimeInSeconds = data.liveImgCloseTimeInSeconds;
liveImgTimeInSeconds = data.liveImgTimeInSeconds; liveImgTimeInSeconds = data.liveImgTimeInSeconds;
} }
}).always(function () { }).always(function() {
modal.hidePleaseWait(); modal.hidePleaseWait();
$('#liveImgCloseTimeInSeconds').val(liveImgCloseTimeInSeconds); $('#liveImgCloseTimeInSeconds').val(liveImgCloseTimeInSeconds);
$('#liveImgTimeInSeconds').val(liveImgTimeInSeconds); $('#liveImgTimeInSeconds').val(liveImgTimeInSeconds);
@ -242,6 +228,4 @@ echo $croppie1['restartCroppie'] . "(imageToRelaod);";
} }
}); });
}); });
</script> </script>
</body>
</html>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
$obj = AVideoPlugin::getObjectData("Live"); $obj = AVideoPlugin::getObjectData("Live");
@ -197,7 +197,7 @@ $obj = AVideoPlugin::getObjectData("Live");
$(document).ready(function() { $(document).ready(function() {
$('#addLiveBtn').click(function() { $('#addLiveBtn').click(function() {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/addLive_serversVideo.php', url: webSiteRootURL+'plugin/Live/view/addLive_serversVideo.php',
data: $('#panelLive_serversForm').serialize(), data: $('#panelLive_serversForm').serialize(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {
@ -244,7 +244,7 @@ $obj = AVideoPlugin::getObjectData("Live");
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/Live_servers/add.json.php', url: webSiteRootURL+'plugin/Live/view/Live_servers/add.json.php',
data: $('#panelLive_serversForm').serialize(), data: $('#panelLive_serversForm').serialize(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Live"); AVideoPlugin::loadPlugin("Live");
$_page = new Page(array('Live'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('Live') ?> <div class="panel-heading"><?php echo __('Live') ?>
<div class="pull-right"> <div class="pull-right">
@ -48,11 +36,7 @@ AVideoPlugin::loadPlugin("Live");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -109,28 +109,22 @@ if (isHTMLEmpty($sideAd)) {
} }
// to fix the unfinished lives // to fix the unfinished lives
$liveInfo = Live::getInfo($livet['key'], Live::getLiveServersIdRequest()); $liveInfo = Live::getInfo($livet['key'], Live::getLiveServersIdRequest());
$_page = new Page(array('Live'));
$_page->setExtraScripts(
array(
'view/js/webui-popover/jquery.webui-popover.min.js',
'view/js/bootstrap-list-filter/bootstrap-list-filter.min.js'
)
);
$_page->setExtraStyles(
array(
'node_modules/video.js/dist/video-js.min.css',
'view/js/webui-popover/jquery.webui-popover.min.css'
)
);
?> ?>
<!DOCTYPE html> <!-- Live modeYoutubeLive.php -->
<html lang="<?php echo getLanguage(); ?>"> <div class="container-fluid principalContainer" style="padding: 0; overflow: hidden;" id="modeYoutubePrincipal">
<head>
<title><?php echo $liveTitle . $config->getPageTitleSeparator() . __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo getCDN(); ?>js/webui-popover/jquery.webui-popover.min.css" rel="stylesheet" type="text/css" />
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<?php
//echo AVideoPlugin::getHeadCode();
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<!-- Live modeYoutubeLive.php -->
<div class="container-fluid principalContainer" style="padding: 0; overflow: hidden;" id="modeYoutubePrincipal">
<?php <?php
if (!$isCompressed) { if (!$isCompressed) {
?> ?>
@ -190,7 +184,7 @@ $liveInfo = Live::getInfo($livet['key'], Live::getLiveServersIdRequest());
<?php <?php
} }
?> ?>
<span class="title_liveKey_<?php echo $livet['key']?>"><?php echo getSEOTitle($liveTitle); ?></span> <span class="title_liveKey_<?php echo $livet['key'] ?>"><?php echo getSEOTitle($liveTitle); ?></span>
<small class="text-muted"> <small class="text-muted">
<?php <?php
echo $liveInfo['displayTime']; echo $liveInfo['displayTime'];
@ -245,19 +239,11 @@ $liveInfo = Live::getInfo($livet['key'], Live::getLiveServersIdRequest());
</div> </div>
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
</div> </div>
</div> </div>
<?php
include $global['systemRootPath'] . 'view/include/video.min.js.php';
echo AVideoPlugin::afterVideoJS();
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script src="<?php echo getURL('js/webui-popover/jquery.webui-popover.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo getURL('js/bootstrap-list-filter/bootstrap-list-filter.min.js'); ?>" type="text/javascript"></script>
</body>
</html>
<?php <?php
include $global['systemRootPath'] . 'objects/include_end.php'; include $global['systemRootPath'] . 'view/include/video.min.js.php';
echo AVideoPlugin::afterVideoJS();
?>
<?php
$_page->print();
?> ?>

View file

@ -6,26 +6,13 @@ $plugin = AVideoPlugin::loadPluginIfEnabled('LiveLinks');
if (empty($plugin) || !$plugin->canAddLinks()) { if (empty($plugin) || !$plugin->canAddLinks()) {
forbiddenPage(__("You can not do this")); forbiddenPage(__("You can not do this"));
} }
$_page = new Page(array('Live Links'));
?> ?>
<!DOCTYPE html> <div class="container">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Live Links") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<?php <?php
include_once './view/panel.php'; include_once './view/panel.php';
?> ?>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -88,28 +88,15 @@ if (isHTMLEmpty($sideAd)) {
$modeYoutubeBottomClass1 = "col-sm-12 col-md-12 col-lg-10"; $modeYoutubeBottomClass1 = "col-sm-12 col-md-12 col-lg-10";
$modeYoutubeBottomClass2 = "hidden "; $modeYoutubeBottomClass2 = "hidden ";
} }
$_page = new Page(array('Live Links'));
$_page->setExtraStyles(array('node_modules/video.js/dist/video-js.min.css'));
$_page->setExtraScripts(array('node_modules/videojs-contrib-ads/dist/videojs.ads.min.js'));
?> ?>
<!DOCTYPE html> <div class="container-fluid principalContainer" style="padding: 0;overflow: hidden;" id="modeYoutubePrincipal">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $t['title'] . $config->getPageTitleSeparator() . __("Live Links") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<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/videojs-contrib-ads/dist/videojs.ads.min.js'); ?>" rel="stylesheet" type="text/css"/>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<!-- LiveLinks Live.php -->
<div class="container-fluid principalContainer" style="padding: 0;overflow: hidden;" id="modeYoutubePrincipal">
<?php <?php
if (!$isCompressed) { if (!$isCompressed) {
?> ?>
<div class="" id="modeYoutubeTop" > <div class="" id="modeYoutubeTop">
<div class="col-md-12"> <div class="col-md-12">
<center style="margin:5px;"> <center style="margin:5px;">
@ -136,7 +123,7 @@ if (isHTMLEmpty($sideAd)) {
<?php <?php
if ($isCompressed) { if ($isCompressed) {
?> ?>
<div class="" id="modeYoutubeTop" > <div class="" id="modeYoutubeTop">
<div class="col-md-12"> <div class="col-md-12">
<center style="margin:5px;"> <center style="margin:5px;">
@ -173,9 +160,9 @@ if (isHTMLEmpty($sideAd)) {
} }
?> ?>
<script> <script>
$(document).ready(function () { $(document).ready(function() {
$("#shareDiv").slideUp(); $("#shareDiv").slideUp();
$("#shareBtn").click(function () { $("#shareBtn").click(function() {
$(".menusDiv").not("#shareDiv").slideUp(); $(".menusDiv").not("#shareDiv").slideUp();
$("#shareDiv").slideToggle(); $("#shareDiv").slideToggle();
return false; return false;
@ -211,18 +198,11 @@ if (isHTMLEmpty($sideAd)) {
</div> </div>
<div class="col-lg-1"></div> <div class="col-lg-1"></div>
</div> </div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/video.min.js.php';
echo AVideoPlugin::afterVideoJS();
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php <?php
include $global['systemRootPath'] . 'objects/include_end.php'; include $global['systemRootPath'] . 'view/include/video.min.js.php';
echo AVideoPlugin::afterVideoJS();
?>
<?php
$_page->print();
?> ?>

View file

@ -175,7 +175,7 @@
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/LiveLinks/view/addLiveLink.php', url: webSiteRootURL+'plugin/LiveLinks/view/addLiveLink.php',
data: $('#liveLinksForm').serialize(), data: $('#liveLinksForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -126,7 +126,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addlogincontrol_historyBtn').click(function () { $('#addlogincontrol_historyBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/LoginControl/View/addlogincontrol_historyVideo.php', url: webSiteRootURL+'plugin/LoginControl/View/addlogincontrol_historyVideo.php',
data: $('#panellogincontrol_historyForm').serialize(), data: $('#panellogincontrol_historyForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -168,7 +168,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/LoginControl/View/Users_login_history/add.json.php', url: webSiteRootURL+'plugin/LoginControl/View/Users_login_history/add.json.php',
data: $('#panellogincontrol_historyForm').serialize(), data: $('#panellogincontrol_historyForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("LoginControl"); AVideoPlugin::loadPlugin("LoginControl");
$_page = new Page(array('Login Control'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Login Control") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('LoginControl') ?> <div class="panel-heading"><?php echo __('LoginControl') ?>
<div class="pull-right"> <div class="pull-right">
@ -36,11 +24,7 @@ AVideoPlugin::loadPlugin("LoginControl");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -11,21 +11,9 @@ if (empty($users_id)) {
forbiddenPage('Empty user ID'); forbiddenPage('Empty user ID');
} }
$_page = new Page(array("Login History"));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html>
<head>
<title><?php echo __("Login History"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body>
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading tabbable-line"> <div class="panel-heading tabbable-line">
<?php <?php
@ -38,15 +26,12 @@ if (empty($users_id)) {
?> ?>
</div> </div>
</div> </div>
</div>
</div> <script>
<?php $(document).ready(function() {
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#loginHistory').addClass('in'); $('#loginHistory').addClass('in');
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -1,21 +1,9 @@
<?php <?php
require_once dirname(__FILE__) . '/../../../videos/configuration.php'; require_once dirname(__FILE__) . '/../../../videos/configuration.php';
AVideoPlugin::loadPlugin("LoginControl"); AVideoPlugin::loadPlugin("LoginControl");
$_page = new Page(array('PGP Challenge'));
?> ?>
<!DOCTYPE html> <div class="container">
<html>
<head>
<title><?php echo __("PGP Challenge"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<br>
<div class="container">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-default"> <div class="panel panel-default">
@ -27,7 +15,7 @@ AVideoPlugin::loadPlugin("LoginControl");
<div class="panel-body"> <div class="panel-body">
<textarea class="form-control" rows="10" id="pgpChallenge"><?php echo LoginControl::getChallenge(); ?></textarea> <textarea class="form-control" rows="10" id="pgpChallenge"><?php echo LoginControl::getChallenge(); ?></textarea>
<?php echo __('Two-Factor Response'); ?> <?php echo __('Two-Factor Response'); ?>
<input type="text" class="form-control" id="pgpResponse" placeholder="<?php echo __('Enter Code'); ?>"/> <input type="text" class="form-control" id="pgpResponse" placeholder="<?php echo __('Enter Code'); ?>" />
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<button class="btn btn-block btn-primary" onclick="checkCode();"><?php echo __('Check Code') ?></button> <button class="btn btn-block btn-primary" onclick="checkCode();"><?php echo __('Check Code') ?></button>
@ -43,7 +31,7 @@ AVideoPlugin::loadPlugin("LoginControl");
<div class="panel-body"> <div class="panel-body">
<textarea class="form-control" rows="10" id="privateKeyToDecryptMsg" placeholder="<?php echo __('Private Key'); ?>"></textarea> <textarea class="form-control" rows="10" id="privateKeyToDecryptMsg" placeholder="<?php echo __('Private Key'); ?>"></textarea>
<?php echo __('Key Password'); ?> <?php echo __('Key Password'); ?>
<input type="password" class="form-control" id="keyPasswordToDecrypt" placeholder="<?php echo __('Key Password'); ?>"/> <input type="password" class="form-control" id="keyPasswordToDecrypt" placeholder="<?php echo __('Key Password'); ?>" />
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<button class="btn btn-block btn-primary" onclick="decryptMessage();"><?php echo __('Decrypt') ?></button> <button class="btn btn-block btn-primary" onclick="decryptMessage();"><?php echo __('Decrypt') ?></button>
@ -51,11 +39,8 @@ AVideoPlugin::loadPlugin("LoginControl");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
function checkCode() { function checkCode() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
@ -64,7 +49,7 @@ AVideoPlugin::loadPlugin("LoginControl");
data: { data: {
'response': $('#pgpResponse').val() 'response': $('#pgpResponse').val()
}, },
success: function (response) { success: function(response) {
if (response.error) { if (response.error) {
avideoAlertError(response.msg); avideoAlertError(response.msg);
modal.hidePleaseWait(); modal.hidePleaseWait();
@ -75,6 +60,7 @@ AVideoPlugin::loadPlugin("LoginControl");
} }
}); });
} }
function decryptMessage() { function decryptMessage() {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
@ -85,7 +71,7 @@ AVideoPlugin::loadPlugin("LoginControl");
'textToDecrypt': $('#pgpChallenge').val(), 'textToDecrypt': $('#pgpChallenge').val(),
'keyPassword': $('#keyPasswordToDecrypt').val() 'keyPassword': $('#keyPasswordToDecrypt').val()
}, },
success: function (response) { success: function(response) {
if (response.error) { if (response.error) {
modal.hidePleaseWait(); modal.hidePleaseWait();
avideoAlertError(response.msg); avideoAlertError(response.msg);
@ -97,6 +83,7 @@ AVideoPlugin::loadPlugin("LoginControl");
} }
}); });
} }
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -3,27 +3,16 @@ require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("LoginControl"); AVideoPlugin::loadPlugin("LoginControl");
require_once $global['systemRootPath'] . 'plugin/LoginControl/pgp/functions.php'; require_once $global['systemRootPath'] . 'plugin/LoginControl/pgp/functions.php';
AVideoPlugin::loadPlugin("LoginControl");
$_page = new Page(array('PGP Keys'));
?> ?>
<!DOCTYPE html> <style>
<html> .monospacedKey {
<head>
<title><?php echo __("PGP Keys"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.monospacedKey{
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
font-size: 0.8em; font-size: 0.8em;
} }
</style> </style>
</head> <div class="container-fluid">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<br>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading tabbable-line"> <div class="panel-heading tabbable-line">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
@ -65,9 +54,7 @@ require_once $global['systemRootPath'] . 'plugin/LoginControl/pgp/functions.php'
</div> </div>
</div> </div>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -10,7 +10,7 @@ $uid = uniqid();
$('#switch<?php echo $uid; ?>').change(function (e) { $('#switch<?php echo $uid; ?>').change(function (e) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/LoginControl/set.json.php', url: webSiteRootURL+'plugin/LoginControl/set.json.php',
data: {"type": "set2FA", "value": $('#switch<?php echo $uid; ?>').is(":checked")}, data: {"type": "set2FA", "value": $('#switch<?php echo $uid; ?>').is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -113,7 +113,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addMeet_join_logBtn').click(function () { $('#addMeet_join_logBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/addMeet_join_logVideo.php', url: webSiteRootURL+'plugin/Meet/View/addMeet_join_logVideo.php',
data: $('#panelMeet_join_logForm').serialize(), data: $('#panelMeet_join_logForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -152,7 +152,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/Meet_join_log/add.json.php', url: webSiteRootURL+'plugin/Meet/View/Meet_join_log/add.json.php',
data: $('#panelMeet_join_logForm').serialize(), data: $('#panelMeet_join_logForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -153,7 +153,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addMeet_scheduleBtn').click(function () { $('#addMeet_scheduleBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/addMeet_scheduleVideo.php', url: webSiteRootURL+'plugin/Meet/View/addMeet_scheduleVideo.php',
data: $('#panelMeet_scheduleForm').serialize(), data: $('#panelMeet_scheduleForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -199,7 +199,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/Meet_schedule/add.json.php', url: webSiteRootURL+'plugin/Meet/View/Meet_schedule/add.json.php',
data: $('#panelMeet_scheduleForm').serialize(), data: $('#panelMeet_scheduleForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -99,7 +99,7 @@ $('#Meet_schedule_has_users_groupsusers_groups_id').val('');
$(document).ready(function () { $(document).ready(function () {
$('#addMeet_schedule_has_users_groupsBtn').click(function () { $('#addMeet_schedule_has_users_groupsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/addMeet_schedule_has_users_groupsVideo.php', url: webSiteRootURL+'plugin/Meet/View/addMeet_schedule_has_users_groupsVideo.php',
data: $('#panelMeet_schedule_has_users_groupsForm').serialize(), data: $('#panelMeet_schedule_has_users_groupsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -136,7 +136,7 @@ $('#Meet_schedule_has_users_groupsusers_groups_id').val('');
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/View/Meet_schedule_has_users_groups/add.json.php', url: webSiteRootURL+'plugin/Meet/View/Meet_schedule_has_users_groups/add.json.php',
data: $('#panelMeet_schedule_has_users_groupsForm').serialize(), data: $('#panelMeet_schedule_has_users_groupsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Meet"); AVideoPlugin::loadPlugin("Meet");
$_page = new Page(array('Meet'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('Meet') ?> <div class="panel-heading"><?php echo __('Meet') ?>
<div class="pull-right"> <div class="pull-right">
@ -48,11 +36,7 @@ AVideoPlugin::loadPlugin("Meet");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -13,7 +13,7 @@ if (empty($obj)) {
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
@ -26,24 +26,12 @@ $m = AVideoPlugin::loadPlugin("Meet");
$emptyObject = $m->getEmptyDataObject(); $emptyObject = $m->getEmptyDataObject();
$timeouts = 2000; $timeouts = 2000;
$_page = new Page(array('Check Meet Servers'));
?> ?>
<div class="container-fluid">
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Check Meet Servers") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" class="btn btn-default" data-toggle="tooltip" title="<?php echo __("Create a Meet"); ?> " data-placement="bottom" > <a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" class="btn btn-default" data-toggle="tooltip" title="<?php echo __("Create a Meet"); ?> " data-placement="bottom">
<i class="fas fa-comments"></i> <?php echo __("Create a Meet"); ?> <i class="fas fa-comments"></i> <?php echo __("Create a Meet"); ?>
</a> </a>
</div> </div>
@ -60,14 +48,14 @@ $timeouts = 2000;
echo "<b>{$value} ({$obj->CUSTOM_JITSI_DOMAIN})</b> "; echo "<b>{$value} ({$obj->CUSTOM_JITSI_DOMAIN})</b> ";
if ($obj->server->value !== $key) { if ($obj->server->value !== $key) {
?> ?>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/?newServer=<?php echo $key; ?>" data-toggle="tooltip" data-placement="bottom" title="Change to (<?php echo $value; ?>) server" > <a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/?newServer=<?php echo $key; ?>" data-toggle="tooltip" data-placement="bottom" title="Change to (<?php echo $value; ?>) server">
<i class="fas fa-random" ></i> <i class="fas fa-random"></i>
</a> </a>
<?php <?php
} else { } else {
?> ?>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" data-toggle="tooltip" data-placement="bottom" title="Stay on (<?php echo $value; ?>)" > <a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" data-toggle="tooltip" data-placement="bottom" title="Stay on (<?php echo $value; ?>)">
<i class="fas fa-check" ></i> <i class="fas fa-check"></i>
</a> </a>
<?php <?php
} ?> } ?>
@ -84,14 +72,14 @@ $timeouts = 2000;
echo "<b>{$value}</b> "; echo "<b>{$value}</b> ";
if ($obj->server->value !== $key) { if ($obj->server->value !== $key) {
?> ?>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/?newServer=<?php echo $key; ?>" data-toggle="tooltip" data-placement="bottom" title="Change to (<?php echo $value; ?>) server" > <a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/?newServer=<?php echo $key; ?>" data-toggle="tooltip" data-placement="bottom" title="Change to (<?php echo $value; ?>) server">
<i class="fas fa-random" ></i> <i class="fas fa-random"></i>
</a> </a>
<?php <?php
} else { } else {
?> ?>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" data-toggle="tooltip" data-placement="bottom" title="Stay on (<?php echo $value; ?>)" > <a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/" data-toggle="tooltip" data-placement="bottom" title="Stay on (<?php echo $value; ?>)">
<i class="fas fa-check" ></i> <i class="fas fa-check"></i>
</a> </a>
<?php <?php
} ?> } ?>
@ -161,12 +149,7 @@ $timeouts = 2000;
</div> </div>
</div> </div>
</div> </div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script> <script>
var roundedDecimals = 2; var roundedDecimals = 2;
var bytesInAKilobyte = 1024; var bytesInAKilobyte = 1024;
var tries = 1; var tries = 1;
@ -175,10 +158,18 @@ $timeouts = 2000;
function speed(bitsPerSecond) { function speed(bitsPerSecond) {
var Kbps = (bitsPerSecond / bytesInAKilobyte).toFixed(roundedDecimals); var Kbps = (bitsPerSecond / bytesInAKilobyte).toFixed(roundedDecimals);
if (Kbps <= 1) if (Kbps <= 1)
return {value: bitsPerSecond, units: "Bps"}; return {
value: bitsPerSecond,
units: "Bps"
};
var MBps = (Kbps / bytesInAKilobyte).toFixed(roundedDecimals); var MBps = (Kbps / bytesInAKilobyte).toFixed(roundedDecimals);
//if (MBps <= 1) //if (MBps <= 1)
return {value: Kbps, units: "Kbps", text: Kbps + " Kbps", bitsPerSecond: bitsPerSecond}; return {
value: Kbps,
units: "Kbps",
text: Kbps + " Kbps",
bitsPerSecond: bitsPerSecond
};
//else //else
//return {value: MBps, units: "MBps", text: MBps + " MBps", bitsPerSecond: bitsPerSecond}; //return {value: MBps, units: "MBps", text: MBps + " MBps", bitsPerSecond: bitsPerSecond};
} }
@ -186,12 +177,12 @@ $timeouts = 2000;
function checkSpeed(server) { function checkSpeed(server) {
var imageAddr = "https://" + server + "/jesus.png?n=" + Math.random(); var imageAddr = "https://" + server + "/jesus.png?n=" + Math.random();
var startTime, endTime; var startTime, endTime;
var downloadSize = 3881702;//3.70 MB var downloadSize = 3881702; //3.70 MB
var download = new Image(); var download = new Image();
var serverId = server.replace(/[.]/g, "_"); var serverId = server.replace(/[.]/g, "_");
var speedId = '#speed' + serverId; var speedId = '#speed' + serverId;
var gradespeedId = '#gradespeed' + serverId; var gradespeedId = '#gradespeed' + serverId;
download.onload = function () { download.onload = function() {
endTime = (new Date()).getTime(); endTime = (new Date()).getTime();
var duration = (endTime - startTime) / 1000; var duration = (endTime - startTime) / 1000;
var bitsLoaded = downloadSize * 8; var bitsLoaded = downloadSize * 8;
@ -203,7 +194,7 @@ $timeouts = 2000;
animateValue('speed' + serverId, 0, response.value, timeouts * 2, "", response.units); animateValue('speed' + serverId, 0, response.value, timeouts * 2, "", response.units);
} }
download.onerror = function () { download.onerror = function() {
$(speedId).html(response.text); $(speedId).html(response.text);
} }
startTime = (new Date()).getTime(); startTime = (new Date()).getTime();
@ -214,7 +205,7 @@ $timeouts = 2000;
var ajaxTime = new Date().getTime(); var ajaxTime = new Date().getTime();
$.ajax({ $.ajax({
url: "https://" + server + "/api/info.json.php", url: "https://" + server + "/api/info.json.php",
}).done(function (response) { }).done(function(response) {
var totalTime = new Date().getTime() - ajaxTime; var totalTime = new Date().getTime() - ajaxTime;
var serverId = server.replace(/[.]/g, "_"); var serverId = server.replace(/[.]/g, "_");
@ -233,9 +224,9 @@ $timeouts = 2000;
$('#gradeStreamersServices' + serverId).html("-" + ((response.totalOnlineLiveStreamersServices * 10) + (response.totalLiveStreamersServices)).toFixed(2)); $('#gradeStreamersServices' + serverId).html("-" + ((response.totalOnlineLiveStreamersServices * 10) + (response.totalLiveStreamersServices)).toFixed(2));
// Here I want to get the how long it took to load some.php and use it further // Here I want to get the how long it took to load some.php and use it further
}).fail(function (jqXHR, textStatus) { }).fail(function(jqXHR, textStatus) {
tries++; tries++;
setTimeout(function () { setTimeout(function() {
checkServerUsage(server); checkServerUsage(server);
}, tries * timeouts); }, tries * timeouts);
}); });
@ -276,26 +267,23 @@ $timeouts = 2000;
data = getRandomString(1), //1 meg POST size handled by all servers data = getRandomString(1), //1 meg POST size handled by all servers
startTime, startTime,
speed = 0; speed = 0;
xhr.onreadystatechange = function (event) { xhr.onreadystatechange = function(event) {
if (xhr.readyState == 4) { if (xhr.readyState == 4) {
speed = Math.round(1024 / ((new Date() - startTime) / 1000)); speed = Math.round(1024 / ((new Date() - startTime) / 1000));
average == 0 average == 0 ?
? average = speed average = speed :
: average = Math.round((average + speed) / 2); average = Math.round((average + speed) / 2);
update(speed, average); update(speed, average);
index++; index++;
if (index == iterations) { if (index == iterations) {
window.clearInterval(timer); window.clearInterval(timer);
} };
; };
}
;
}; };
xhr.open('POST', url, true); xhr.open('POST', url, true);
startTime = new Date(); startTime = new Date();
xhr.send(data); xhr.send(data);
} };
;
function getRandomString(sizeInMb) { function getRandomString(sizeInMb) {
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()_+`-=[]\{}|;':,./<>?", //random data prevents gzip effect var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()_+`-=[]\{}|;':,./<>?", //random data prevents gzip effect
@ -303,11 +291,9 @@ $timeouts = 2000;
result = ''; result = '';
for (var index = 0; index < iterations; index++) { for (var index = 0; index < iterations; index++) {
result += chars.charAt(Math.floor(Math.random() * chars.length)); result += chars.charAt(Math.floor(Math.random() * chars.length));
} };
;
return result; return result;
} };
;
} }
function runAll(server) { function runAll(server) {
@ -315,7 +301,7 @@ $timeouts = 2000;
$('#panel' + serverId + " .fa-cog").addClass('fa-spin'); $('#panel' + serverId + " .fa-cog").addClass('fa-spin');
sitesGrade[server] = 100; sitesGrade[server] = 100;
check(server); check(server);
checkUploadSpeed(server, 1, function (speed, average) { checkUploadSpeed(server, 1, function(speed, average) {
var serverId = server.replace(/[.]/g, '_'); var serverId = server.replace(/[.]/g, '_');
animateValue('Uspeed' + serverId, 0, average, timeouts * 2, "", "Kbps"); animateValue('Uspeed' + serverId, 0, average, timeouts * 2, "", "Kbps");
@ -365,23 +351,24 @@ $timeouts = 2000;
var previewsGrade = {}; var previewsGrade = {};
var sitesGrade = {}; var sitesGrade = {};
$(document).ready(function () { $(document).ready(function() {
<?php <?php
$count = 0; $count = 0;
foreach ($emptyObject->server->type as $key => $value) { foreach ($emptyObject->server->type as $key => $value) {
if ($key == 'custom') { if ($key == 'custom') {
continue; continue;
} }
$count++; $count++;
echo "setTimeout(function(){runAll('{$key}')}," . ($count * $timeouts) . ");"; echo "setTimeout(function(){runAll('{$key}')}," . ($count * $timeouts) . ");";
} }
?> ?>
setInterval(function () { setInterval(function() {
checkGrades(); checkGrades();
}, 1000); }, 1000);
}); });
</script> </script>
</div> </div>
</body> <?php
</html> $_page->print();
?>

View file

@ -12,42 +12,35 @@ $meet = new Meet_schedule($meet_schedule_id);
$img = User::getBackgroundURLFromUserID($meet->getUsers_id()); $img = User::getBackgroundURLFromUserID($meet->getUsers_id());
$photo = User::getPhoto($meet->getUsers_id()); $photo = User::getPhoto($meet->getUsers_id());
$_page = new Page(array('Confirm Meet Password'));
$_page->setIncludeNavbar(false);
?> ?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>"> <style>
<head>
<title><?php echo __("Confirm Meet Password") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
body { body {
padding-top: 0; padding-top: 0;
} }
footer{
footer {
display: none; display: none;
} }
#bg{
#bg {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('<?php echo $global['webSiteRootURL'], $img; ?>'); background-image: url('<?php echo $global['webSiteRootURL'], $img; ?>');
background-size: cover; background-size: cover;
opacity: 0.3; opacity: 0.3;
filter: alpha(opacity=30); /* For IE8 and earlier */ filter: alpha(opacity=30);
/* For IE8 and earlier */
} }
</style> </style>
</head> <div id="bg"></div>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
//include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div id="bg"></div>
<!-- Modal --> <!-- Modal -->
<div id="myModal" class="modal fade in" role="dialog"> <div id="myModal" class="modal fade in" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -60,7 +53,7 @@ $photo = User::getPhoto($meet->getUsers_id());
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<img src="<?php echo $photo; ?>" class="img img-responsive"/> <img src="<?php echo $photo; ?>" class="img img-responsive" />
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<center> <center>
@ -92,14 +85,12 @@ $photo = User::getPhoto($meet->getUsers_id());
</div> </div>
</div> </div>
</div> </div>
<?php <script type="text/javascript">
include $global['systemRootPath'] . 'view/include/footer.php'; $(window).on('load', function() {
?>
<script type="text/javascript">
$(window).on('load', function () {
$('#myModal').modal('show'); $('#myModal').modal('show');
}); });
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -20,19 +20,10 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
$p = AVideoPlugin::loadPluginIfEnabled("Meet"); $p = AVideoPlugin::loadPluginIfEnabled("Meet");
$p->setDataObjectParameter("server->value", preg_replace("/[^0-1a-z.]/i", "", $_GET['newServer'])); $p->setDataObjectParameter("server->value", preg_replace("/[^0-1a-z.]/i", "", $_GET['newServer']));
} }
$_page = new Page(array('Meet'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css" />
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<style>
.serverLabels { .serverLabels {
padding-bottom: 15px; padding-bottom: 15px;
} }
@ -48,14 +39,8 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
height: 2px; height: 2px;
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>
</head> <div class="container-fluid">
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="far fa-comments"></i> <?php echo __("Meeting"); ?> <i class="far fa-comments"></i> <?php echo __("Meeting"); ?>
@ -105,15 +90,8 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
</div> </div>
</div> </div>
</div> </div>
</div>
<script>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script>
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var serverLabelsRequestTime; var serverLabelsRequestTime;
$(document).ready(function() { $(document).ready(function() {
<?php $today = getdate(); ?> <?php $today = getdate(); ?>
@ -153,7 +131,6 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
}); });
var serverLabelsStartTime; var serverLabelsStartTime;
var serverLabelsRunning = false; var serverLabelsRunning = false;
function serverLabels() { function serverLabels() {
if (serverLabelsRunning) { if (serverLabelsRunning) {
return false; return false;
@ -161,7 +138,7 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
serverLabelsRunning = true; serverLabelsRunning = true;
serverLabelsStartTime = new Date().getTime(); serverLabelsStartTime = new Date().getTime();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/serverLabels.php?<?php echo $userCredentials; ?>', url: webSiteRootURL+'plugin/Meet/serverLabels.php?<?php echo $userCredentials; ?>',
success: function(response) { success: function(response) {
setTimeout(function() { setTimeout(function() {
serverLabelsRunning = false; serverLabelsRunning = false;
@ -171,8 +148,6 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
} }
}); });
} }
<?php <?php
if (User::canCreateMeet()) { if (User::canCreateMeet()) {
?> ?>
@ -221,7 +196,7 @@ if (User::isAdmin() && !empty($_GET['newServer'])) {
<?php <?php
} }
?> ?>
</script> </script>
</body> <?php
$_page->print();
</html> ?>

View file

@ -13,7 +13,7 @@ if (empty($obj)) {
} }
if (!User::isLogged()) { if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
$userCredentials = User::loginFromRequestToGet(); $userCredentials = User::loginFromRequestToGet();

View file

@ -13,7 +13,7 @@ if (empty($obj)) {
} }
if (!User::canCreateMeet()) { if (!User::canCreateMeet()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
$userCredentials = User::loginFromRequestToGet(); $userCredentials = User::loginFromRequestToGet();
@ -154,7 +154,7 @@ $userCredentials = User::loginFromRequestToGet();
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/saveMeet.json.php?<?php echo $userCredentials; ?>', url: webSiteRootURL+'plugin/Meet/saveMeet.json.php?<?php echo $userCredentials; ?>',
data: $('#formMeetManager').serialize(), data: $('#formMeetManager').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,21 +1,7 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("VideosStatistics"); AVideoPlugin::loadPlugin("VideosStatistics");
$_page = new Page(array('Monetize user'));
include $global['systemRootPath'] . 'plugin/MonetizeUsers/View/report.php';
$_page->print();
?> ?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/MonetizeUsers/View/report.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -115,7 +115,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addPayPalYPT_logBtn').click(function () { $('#addPayPalYPT_logBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PayPalYPT/View/addPayPalYPT_logVideo.php', url: webSiteRootURL+'plugin/PayPalYPT/View/addPayPalYPT_logVideo.php',
data: $('#panelPayPalYPT_logForm').serialize(), data: $('#panelPayPalYPT_logForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -156,7 +156,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PayPalYPT/View/PayPalYPT_log/add.json.php', url: webSiteRootURL+'plugin/PayPalYPT/View/PayPalYPT_log/add.json.php',
data: $('#panelPayPalYPT_logForm').serialize(), data: $('#panelPayPalYPT_logForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PayPalYPT"); AVideoPlugin::loadPlugin("PayPalYPT");
$_page = new Page(array('PayPal'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: PayPalYPT</title>
<?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 href="<?php echo $global['webSiteRootURL']; ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('PayPalYPT') ?> <div class="panel-heading"><?php echo __('PayPalYPT') ?>
<div class="pull-right"> <div class="pull-right">
@ -36,11 +24,7 @@ AVideoPlugin::loadPlugin("PayPalYPT");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script> <?php
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -35,7 +35,7 @@ $uid = uniqid();
} }
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PayPalYPT/savePayPalReceiverEmail.json.php', url: webSiteRootURL+'plugin/PayPalYPT/savePayPalReceiverEmail.json.php',
data: {"PayPalReceiverEmail": PayPalReceiverEmail}, data: {"PayPalReceiverEmail": PayPalReceiverEmail},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -7,20 +7,9 @@ if (!User::isLogged()) {
forbiddenPage(); forbiddenPage();
} }
$rows = PayPalYPT::getAllLogsFromUser(User::getId()); $rows = PayPalYPT::getAllLogsFromUser(User::getId());
$_page = new Page(array('Paypal subscriptions'));
?> ?>
<!DOCTYPE html> <div class="container">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title>Paypal subscriptions</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<table class="display table table-bordered table-responsive table-striped table-hover table-condensed" width="100%" cellspacing="0"> <table class="display table table-bordered table-responsive table-striped table-hover table-condensed" width="100%" cellspacing="0">
<thead> <thead>
@ -84,22 +73,20 @@ $rows = PayPalYPT::getAllLogsFromUser(User::getId());
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php'; $(document).ready(function() {
?>
<script>
$(document).ready(function () {
}); });
function cancelAgreement(agreement_id) { function cancelAgreement(agreement_id) {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: webSiteRootURL + 'plugin/PayPalYPT/agreementCancel.json.php', url: webSiteRootURL + 'plugin/PayPalYPT/agreementCancel.json.php',
data: {agreement: agreement_id}, data: {
agreement: agreement_id
},
type: 'post', type: 'post',
success: function (response) { success: function(response) {
if (response.error) { if (response.error) {
avideoAlertError(response.msg); avideoAlertError(response.msg);
} else { } else {
@ -110,6 +97,7 @@ $rows = PayPalYPT::getAllLogsFromUser(User::getId());
} }
}); });
} }
</script> </script>
</body> <?php
</html> $_page->print();
?>

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -124,7 +124,7 @@ if (!User::isAdmin()) {
$(document).ready(function () { $(document).ready(function () {
$('#addUsers_groups_permissionsBtn').click(function () { $('#addUsers_groups_permissionsBtn').click(function () {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Permissions/View/addUsers_groups_permissionsVideo.php', url: webSiteRootURL+'plugin/Permissions/View/addUsers_groups_permissionsVideo.php',
data: $('#panelUsers_groups_permissionsForm').serialize(), data: $('#panelUsers_groups_permissionsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -164,7 +164,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Permissions/View/Users_groups_permissions/add.json.php', url: webSiteRootURL+'plugin/Permissions/View/Users_groups_permissions/add.json.php',
data: $('#panelUsers_groups_permissionsForm').serialize(), data: $('#panelUsers_groups_permissionsForm').serialize(),
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Permissions"); AVideoPlugin::loadPlugin("Permissions");
$_page = new Page(array('Permissions'));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Permissions") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('Permissions') ?> <div class="panel-heading"><?php echo __('Permissions') ?>
<div class="pull-right"> <div class="pull-right">
@ -36,11 +24,7 @@ AVideoPlugin::loadPlugin("Permissions");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -82,7 +82,7 @@ $uid = uniqid();
console.log(users_groups_id, plugins_id, type); console.log(users_groups_id, plugins_id, type);
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Permissions/setPermission.json.php', url: webSiteRootURL+'plugin/Permissions/setPermission.json.php',
data: {"users_groups_id": users_groups_id, "plugins_id": plugins_id, "type": type, "isEnabled": $('#pluginPermission'+users_groups_id+'<?php echo $uid; ?>_'+type).is(":checked")}, data: {"users_groups_id": users_groups_id, "plugins_id": plugins_id, "type": type, "isEnabled": $('#pluginPermission'+users_groups_id+'<?php echo $uid; ?>_'+type).is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
if (!User::isAdmin()) { if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this")); forbiddenPage("You can not do this");
exit; exit;
} }
?> ?>
@ -155,7 +155,7 @@ if (!User::isAdmin()) {
$(document).ready(function() { $(document).ready(function() {
$('#addPlaylists_schedulesBtn').click(function() { $('#addPlaylists_schedulesBtn').click(function() {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/View/addPlaylists_schedulesVideo.php', url: webSiteRootURL+'plugin/PlayLists/View/addPlaylists_schedulesVideo.php',
data: $('#panelPlaylists_schedulesForm').serialize(), data: $('#panelPlaylists_schedulesForm').serialize(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {
@ -221,7 +221,7 @@ if (!User::isAdmin()) {
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/View/Playlists_schedules/add.json.php', url: webSiteRootURL+'plugin/PlayLists/View/Playlists_schedules/add.json.php',
data: $('#panelPlaylists_schedulesForm').serialize(), data: $('#panelPlaylists_schedulesForm').serialize(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {

View file

@ -215,7 +215,7 @@ $_page->setExtraScripts(
e.preventDefault(); e.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/View/Playlists_schedules/add.json.php', url: webSiteRootURL+'plugin/PlayLists/View/Playlists_schedules/add.json.php',
data: $('#panelPlaylists_schedulesForm').serialize(), data: $('#panelPlaylists_schedulesForm').serialize(),
type: 'post', type: 'post',
success: function(response) { success: function(response) {

View file

@ -1,22 +1,10 @@
<?php <?php
require_once '../../../videos/configuration.php'; require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PlayLists"); AVideoPlugin::loadPlugin("PlayLists");
$_page = new Page(array("PlayLists"));
$_page->loadBasicCSSAndJS();
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("PlayLists") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><?php echo __('PlayLists') ?> <div class="panel-heading"><?php echo __('PlayLists') ?>
<div class="pull-right"> <div class="pull-right">
@ -36,11 +24,7 @@ AVideoPlugin::loadPlugin("PlayLists");
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="<?php echo getURL('view/css/DataTables/datatables.min.js'); ?>"></script> <?php
<script src="<?php echo getCDN(); ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> $_page->print();
<?php ?>
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -2,17 +2,9 @@
if (!isset($global['systemRootPath'])) { if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php'; require_once '../../videos/configuration.php';
} }
$_page = new Page(array('EPG'));
?> ?>
<!DOCTYPE html> <div class="container-fluid">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("EPG") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php include $global['systemRootPath'] . 'view/include/head.php'; ?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
<div class="container-fluid">
<?php <?php
$_REQUEST['site'] = get_domain($global['webSiteRootURL']); $_REQUEST['site'] = get_domain($global['webSiteRootURL']);
echo '<div class="panel panel-default"><div class="panel-heading">' . __("Now Playing") . '</div><div class="panel-body">'; echo '<div class="panel panel-default"><div class="panel-heading">' . __("Now Playing") . '</div><div class="panel-body">';
@ -20,14 +12,7 @@ if (!isset($global['systemRootPath'])) {
include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.day.php'; include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.day.php';
echo '</div></div>'; echo '</div></div>';
?> ?>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
<script>
</script>
</body>
</html>
<?php include $global['systemRootPath'] . 'objects/include_end.php'; ?>

View file

@ -7,7 +7,7 @@ require_once $global['systemRootPath'] . 'plugin/PlayLists/PlayListElement.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php'; require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
if (!PlayList::canSee($_GET['playlists_id'], User::getId())) { if (!PlayList::canSee($_GET['playlists_id'], User::getId())) {
forbiddenPage(_('You cannot see this playlist').' '.basename(__FILE__)); forbiddenPage(_('You cannot see this playlist') . ' ' . basename(__FILE__));
} }
$global['doNotLoadPlayer'] = 1; $global['doNotLoadPlayer'] = 1;
/* /*
@ -49,46 +49,34 @@ foreach ($playList as $key => $value) {
$videos[$key] = $value; $videos[$key] = $value;
$videos[$key]['id'] = $value['videos_id']; $videos[$key]['id'] = $value['videos_id'];
} }
$_page = new Page(array($playListObj->getName()));
$_page->setExtraStyles(array('view/css/social.css', 'plugin/Gallery/style.css'));
$_page->setExtraScripts(array('plugin/Gallery/script.js'));
?> ?>
<!DOCTYPE html> <style>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $playListObj->getName() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<link href="<?php echo getURL('view/css/social.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php echo getURL('plugin/Gallery/style.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('plugin/Gallery/script.js'); ?>" type="text/javascript"></script>
<?php include $global['systemRootPath'] . 'view/include/head.php'; ?>
<style>
.clearfix { .clearfix {
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>
</head> <div class="container-fluid " style="overflow: hidden;">
<body class="<?php echo $global['bodyClass']; ?>" style="padding: 5px;">
<div class="container-fluid " style="overflow: hidden;">
<div class="gallery"> <div class="gallery">
<?php <?php
if (!empty($playList)) { if (!empty($playList)) {
if(isMobile()){ if (isMobile()) {
createGallerySection($videos, true, true,6, 4, 2, 1, false); createGallerySection($videos, true, true, 6, 4, 2, 1, false);
}else{ } else {
createGallerySection($videos, true, true,6, 6, 4, 2, false); createGallerySection($videos, true, true, 6, 6, 4, 2, false);
} }
} ?> } ?>
</div> </div>
</div> </div>
<?php <script>
include $global['systemRootPath'] . 'view/include/footer.php'; $(document).ready(function() {
?> $('.galleryVideo a').click(function(event) {
<script>
$(document).ready(function () {
$('.galleryVideo a').click(function(event){
event.preventDefault(); event.preventDefault();
//avideoModalIframeFull($(this).attr('alternativeLink')); //avideoModalIframeFull($(this).attr('alternativeLink'));
var url = $(this).attr('embed'); var url = $(this).attr('embed');
if(empty(url)){ if (empty(url)) {
console.log('$(\'.galleryVideo a\').click does not have embed'); console.log('$(\'.galleryVideo a\').click does not have embed');
url = $(this).attr('href'); url = $(this).attr('href');
} }
@ -99,7 +87,7 @@ foreach ($playList as $key => $value) {
avideoAddIframeIntoElement(this, url, ''); avideoAddIframeIntoElement(this, url, '');
}); });
}); });
</script> </script>
</body> <?php
</html> $_page->print();
<?php include $global['systemRootPath'] . 'objects/include_end.php'; ?> ?>

View file

@ -1,348 +0,0 @@
<?php
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$isSerie = 1;
$isPlayList = true;
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'plugin/PlayLists/PlayListElement.php';
if (!PlayList::canSee($_GET['playlists_id'], User::getId())) {
die('{"error":"' . __("Permission denied") . '"}');
}
$playListObj = new PlayList($_GET['playlists_id']);
$playList = PlayList::getVideosFromPlaylist($_GET['playlists_id']);
$playListData = array();
$videoStartSeconds = array();
foreach ($playList as $value) {
if ($value['type'] === 'embed') {
$sources[0]['type'] = 'video';
$sources[0]['url'] = $value["videoLink"];
} else {
$sources = getVideosURL($value['filename']);
}
$images = Video::getImageFromFilename($value['filename'], $value['type']);
$externalOptions = _json_decode($value['externalOptions']);
$src = new stdClass();
$src->src = $images->thumbsJpg;
$thumbnail = array($src);
$playListSources = array();
foreach ($sources as $value2) {
if ($value2['type'] !== 'video' && $value2['type'] !== 'audio' && $value2['type'] !== 'serie') {
continue;
}
$playListSources[] = new playListSource($value2['url'], $value['type'] === 'embed');
}
if (empty($playListSources)) {
continue;
}
$playListData[] = new PlayListElement($value['title'], $value['description'], $value['duration'], $playListSources, $thumbnail, $images->poster, parseDurationToSeconds(@$externalOptions->videoStartSeconds), $value['cre'], $value['likes'], $value['views_count'], $value['videos_id']);
}
$video = PlayLists::isPlayListASerie($_GET['playlists_id']);
if (!empty($video['id'])) {
AVideoPlugin::getEmbed($video['id']);
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $playListObj->getName() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php echo getCDN(); ?>view/css/social.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo getCDN(); ?>node_modules/videojs-playlist-ui/dist/videojs-playlist-ui.css" rel="stylesheet">
<?php include $global['systemRootPath'] . 'view/include/head.php'; ?>
<style>
.next-button:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
content: "\f051";
font-family: 'Font Awesome 5 Free';
font-weight: 900;
}
.video-js .next-button {width: 2em !important;}
</style>
<?php
if (!empty($video['id'])) {
getLdJson($video['id']);
getItemprop($video['id']);
}
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
<?php
if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
?>
<div class="container" style="margin-bottom: 10px;">
<img src="<?php echo User::getBackground($video['users_id']); ?>" class="img img-responsive" />
</div>
<?php
}
?>
<div class="container-fluid principalContainer">
<?php
if (!empty($playListObj)) {
if (!empty($advancedCustom->showAdsenseBannerOnTop)) {
?>
<style>
.compress {
top: 100px !important;
}
</style>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<center style="margin:5px;">
<?php
echo getAdsLeaderBoardTop();
?>
</center>
</div>
</div>
<?php
}
?>
<!-- playlist player -->
<div class="row main-video" id="mvideo">
<div class="col-sm-2 col-md-2 firstC"></div>
<div class="col-sm-8 col-md-8 secC">
<div id="videoContainer">
<div id="floatButtons" style="display: none;">
<p class="btn btn-outline btn-xs move">
<i class="fas fa-expand-arrows-alt"></i>
</p>
<button type="button" class="btn btn-outline btn-xs"
onclick="closeFloatVideo(); floatClosed = 1;">
<i class="fas fa-times"></i>
</button>
</div>
<div id="main-video" class="embed-responsive embed-responsive-16by9">
<video <?php echo PlayerSkins::getPlaysinline(); ?>
<?php if ($config->getAutoplay() && false) { // disable it for now ?>
autoplay="true"
muted="muted"
<?php } ?>
preload="auto"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup='{"techOrder": ["youtube","html5"]}'>
</video>
</div>
<?php
showCloseButton();
?>
</div>
</div>
<div class="col-sm-2 col-md-2"></div>
</div>
<div class="row" id="modeYoutubeBottom">
<div class="col-sm-1 col-md-1"></div>
<div class="col-sm-8 col-md-8" id="modeYoutubeBottomContent">
</div>
<div class="col-sm-2 col-md-2 bgWhite list-group-item rightBar">
<div class="col-lg-12 col-sm-12 col-xs-12">
<?php echo getAdsSideRectangle(); ?>
</div>
<input type="search" id="playListSearch" class="form-control" placeholder=" <?php echo __("Search"); ?>"/>
<select class="form-control" id="embededSortBy" >
<option value="default"> <?php echo __("Default"); ?></option>
<option value="titleAZ" data-icon="glyphicon-sort-by-attributes"> <?php echo __("Title (A-Z)"); ?></option>
<option value="titleZA" data-icon="glyphicon-sort-by-attributes-alt"> <?php echo __("Title (Z-A)"); ?></option>
<option value="newest" data-icon="glyphicon-sort-by-attributes"> <?php echo __("Date added (newest)"); ?></option>
<option value="oldest" data-icon="glyphicon-sort-by-attributes-alt" > <?php echo __("Date added (oldest)"); ?></option>
<option value="popular" data-icon="glyphicon-thumbs-up"> <?php echo __("Most popular"); ?></option>
<?php
if (empty($advancedCustom->doNotDisplayViews)) {
?>
<option value="views_count" data-icon="glyphicon-eye-open" <?php echo (!empty($_POST['sort']['views_count'])) ? "selected='selected'" : "" ?>> <?php echo __("Most watched"); ?></option>
<?php } ?>
</select>
<div class="vjs-playlist" style="" id="playList">
<!--
The contents of this element will be filled based on the
currently loaded playlist
-->
</div>
</div>
<div class="col-sm-1 col-md-1"></div>
</div>
<?php
} else {
?>
<br>
<br>
<br>
<br>
<div class="alert alert-warning">
<i class="fa-solid fa-video"></i> <strong><?php echo __("Attention"); ?>!</strong> <?php echo empty($advancedCustom->videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
</div>
<?php } ?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/video.min.js.php';
?>
<?php
echo AVideoPlugin::afterVideoJS();
include $global['systemRootPath'] . 'view/include/footer.php';
$videoJSArray = array(
"view/js/BootstrapMenu.min.js");
$jsURL = combineFiles($videoJSArray, "js");
?>
<script src="<?php echo $jsURL; ?>" type="text/javascript"></script><script src="<?php echo getCDN(); ?>node_modules/videojs-playlist/dist/videojs-playlist.min.js"></script>
<script src="<?php echo getCDN(); ?>node_modules/videojs-playlist-ui/dist/videojs-playlist-ui.min.js"></script>
<script src="<?php echo getURL('node_modules/videojs-youtube/dist/Youtube.min.js'); ?>node_modules/videojs-playlist/dist/videojs-playlist.min.js"></script>
<script>
var playerPlaylist = <?php echo json_encode($playListData); ?>;
var originalPlayerPlaylist = playerPlaylist;
if (typeof player === 'undefined' && $('#mainVideo').length) {
player = videojs('mainVideo'<?php echo PlayerSkins::getDataSetup(); ?>);
}
var videos_id = playerPlaylist[0].videos_id;
player.on('play', function () {
addView(videos_id, this.currentTime());
});
player.on('timeupdate', function () {
var time = Math.round(this.currentTime());
if (time >= 5 && time % 5 === 0) {
addView(videos_id, time);
}
});
player.on('ended', function () {
var time = Math.round(this.currentTime());
addView(videos_id, time);
});
player.playlist(playerPlaylist);
player.playlist.autoadvance(0);
player.playlist.repeat(true);
// Initialize the playlist-ui plugin with no option (i.e. the defaults).
player.playlistUi();
var timeout;
$(document).ready(function () {
$("#playListSearch").keyup(function () {
var filter = $(this).val();
$(".vjs-playlist-item-list li").each(function () {
if ($(this).find('.vjs-playlist-name').text().search(new RegExp(filter, "i")) < 0) {
$(this).slideUp();
} else {
$(this).slideDown();
}
});
});
$('#embededSortBy').click(function () {
setTimeout(function () {
clearTimeout(timeout);
}, 2000);
});
$('#embededSortBy').change(function () {
var value = $(this).val();
playerPlaylist.sort(function (a, b) {
return compare(a, b, value);
});
player.playlist.sort(function (a, b) {
return compare(a, b, value);
});
});
//Prevent HTML5 video from being downloaded (right-click saved)?
$('#mainVideo').bind('contextmenu', function () {
return false;
});
player.currentTime(playerPlaylist[0].videoStartSeconds);
$("#modeYoutubeBottomContent").load("<?php echo $global['webSiteRootURL']; ?>view/modeYoutubeBottom.php?videos_id=" + playerPlaylist[0].videos_id);
$(".vjs-playlist-item ").click(function () {
});
player.on('playlistitem', function () {
index = player.playlist.currentIndex();
videos_id = playerPlaylist[index].videos_id;
$("#modeYoutubeBottomContent").load("<?php echo $global['webSiteRootURL']; ?>view/modeYoutubeBottom.php?videos_id=" + playerPlaylist[index].videos_id);
setTimeout(function () {
player.currentTime(playerPlaylist[index].videoStartSeconds);
}, 500);
if (typeof enableDownloadProtection === 'function') {
enableDownloadProtection();
}
});
setTimeout(function () {
var Button = videojs.getComponent('Button');
var nextButton = videojs.extend(Button, {
//constructor: function(player, options) {
constructor: function () {
Button.apply(this, arguments);
//this.addClass('vjs-chapters-button');
this.addClass('next-button');
this.addClass('vjs-button-fa-size');
this.controlText("Next");
},
handleClick: function () {
player.playlist.next();
}
});
// Register the new component
videojs.registerComponent('nextButton', nextButton);
player.getChild('controlBar').addChild('nextButton', {}, getPlayerButtonIndex('PlayToggle') + 1);
}, 30);
});
function compare(a, b, type) {
console.log(type);
switch (type) {
case "titleAZ":
return strcasecmp(a.name, b.name);
break;
case "titleZA":
return strcasecmp(b.name, a.name);
break;
case "newest":
return a.created > b.created ? 1 : (a.created < b.created ? -1 : 0);
break;
case "oldest":
return b.created > a.created ? 1 : (b.created < a.created ? -1 : 0);
break;
case "popular":
return a.likes > b.likes ? 1 : (a.likes < b.likes ? -1 : 0);
break;
default:
return 0;
break;
}
}
function strcasecmp(s1, s2) {
s1 = (s1 + '').toLowerCase();
s2 = (s2 + '').toLowerCase();
return s1 > s2 ? 1 : (s1 < s2 ? -1 : 0);
}
</script>
</body>
</html>
<?php include $global['systemRootPath'] . 'objects/include_end.php'; ?>

Some files were not shown because too many files have changed in this diff Show more