1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00

Adding the correct language on the head tag

This commit is contained in:
DanieL 2022-08-22 13:19:40 -03:00
parent 538c3a806d
commit e6904fcb35
130 changed files with 8147 additions and 8128 deletions

View file

@ -191,7 +191,7 @@ switch ($_GET['page']) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $config->getLanguage(); ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("Administration"));

View file

@ -1,184 +1,184 @@
<?php
if (isset($_GET['getLanguage'])) {
$lngFile = './' . strtolower(str_replace(['.', '/', '\\'], '', $_GET['getLanguage'])) . '.php';
if (!file_exists($lngFile)) {
header('HTTP/1.0 404 Not Found');
exit;
}
require_once($lngFile);
echo json_encode($t);
exit;
}
$vars = array();
require_once '../videos/configuration.php';
require_once '../objects/functions.php';
if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) {
forbiddenPage('');
}
$vars = listAllWordsToTranslate();
?>
<!DOCTYPE html>
<html lang="<?php echo $config->getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("Translate AVideo"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style type="text/css">
textarea.form-control {
height: 100% !important;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<br>
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col-sm-8">
<?php
echo Layout::getLangsSelect('inputLanguage', '', 'navBarFlag2', '', false, true);
?>
</div>
<div class="col-sm-4">
<button class="btn btn-success btn-block " id="btnSaveFile" disabled><i class="fas fa-save"></i> <?php echo __("Save File"); ?></button>
</div>
</div>
<script>
$(function () {
$("#navBarFlag2").change(function () {
var value = $(this).val();
var tb1 = $('#originalWords');
var tb2 = $('#translatedCode');
console.log('Changed language');
console.log(value);
$.ajax({
url: 'index.php?getLanguage=' + value,
dataType: 'json'
}).done(function (data) {
console.log("Found existing translation!");
var arrayOfLines = $('#originalWords').val().split('\n');
$.each(arrayOfLines, function (index, item) {
if (data.hasOwnProperty(item)) {
$('#translatedCode').append(data[item] + '\n');
} else {
$('#translatedCode').append('\n');
}
});
tb1.scroll(function () {
tb2.scrollTop(tb1.scrollTop());
});
}).fail(function () {
console.log("New translation");
tb1.scroll(function () {
});
});
});
});
</script>
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Original words found"); ?></h3>
<textarea placeholder="<?php echo __("Original words found"); ?>" class="form-control" rows="20" readonly="readonly" id="originalWords" wrap="off"><?php
foreach ($vars as $value) {
echo $value, "\n";
}
?></textarea>
</div>
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Word Translations"); ?></h3>
<textarea placeholder="<?php echo __("Paste here the translated words, one each line"); ?>" class="form-control" id="translatedCode" rows="20" wrap="off"></textarea>
</div>
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Translated Array"); ?></h3>
<textarea placeholder="<?php echo __("Translated Array"); ?>" class="form-control" id="arrayCode" rows="20" readonly="readonly"></textarea>
</div>
</div>
<?php
$dir = "{$global['systemRootPath']}locale";
if (!is_writable($dir)) {
?>
<div class="alert alert-info">
<?php echo __("You need to make your locale folder writable"); ?>
<pre><code>chown www-data:www-data <?php echo $global['systemRootPath']; ?>locale && sudo chmod -R 755 <?php echo $global['systemRootPath']; ?>locale</code></pre>
</div>
<?php
}
?>
<div class="alert alert-info">
<?php echo count($vars) . ' words found'; ?>
</div>
</div>
</div>
</div><!--/.container-->
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var arrayLocale = <?php echo json_encode(array_values($vars)); ?>;
$(document).ready(function () {
$('#translatedCode').keyup(function () {
var lines = $(this).val().split('\n');
console.log(lines);
if (lines.length > 0 && !(lines.length == 1 && lines[0] === "")) {
var str = "";
for (var i = 0; i < lines.length; i++) {
if (typeof arrayLocale[i] == "undefined") {
break;
}
var key = arrayLocale[i].replace(/'/g, "\\'");
str += "$t['" + key + "'] = \"" + lines[i] + "\";\n";
}
$('#arrayCode').val(str);
$('button').prop('disabled', false);
} else {
$('#arrayCode').val("");
$('button').prop('disabled', true);
}
});
$('#btnSaveFile').click(function () {
if ($('#btnSaveFile').is(":disabled")) {
return false;
}
modal.showPleaseWait();
$.ajax({
url: 'save.php',
data: {"flag": $("select[name='country2']").val(), "code": $('#arrayCode').val()},
type: 'post',
success: function (response) {
if (response.status === "1") {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your language has been saved!"); ?>", "success");
} else {
avideoAlert("<?php echo __("Sorry!"); ?>", response.error, "error");
}
modal.hidePleaseWait();
}
});
});
});
</script>
</body>
</html>
<?php
if (isset($_GET['getLanguage'])) {
$lngFile = './' . strtolower(str_replace(['.', '/', '\\'], '', $_GET['getLanguage'])) . '.php';
if (!file_exists($lngFile)) {
header('HTTP/1.0 404 Not Found');
exit;
}
require_once($lngFile);
echo json_encode($t);
exit;
}
$vars = array();
require_once '../videos/configuration.php';
require_once '../objects/functions.php';
if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) {
forbiddenPage('');
}
$vars = listAllWordsToTranslate();
?>
<!DOCTYPE html>
<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 {
height: 100% !important;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<br>
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col-sm-8">
<?php
echo Layout::getLangsSelect('inputLanguage', '', 'navBarFlag2', '', false, true);
?>
</div>
<div class="col-sm-4">
<button class="btn btn-success btn-block " id="btnSaveFile" disabled><i class="fas fa-save"></i> <?php echo __("Save File"); ?></button>
</div>
</div>
<script>
$(function () {
$("#navBarFlag2").change(function () {
var value = $(this).val();
var tb1 = $('#originalWords');
var tb2 = $('#translatedCode');
console.log('Changed language');
console.log(value);
$.ajax({
url: 'index.php?getLanguage=' + value,
dataType: 'json'
}).done(function (data) {
console.log("Found existing translation!");
var arrayOfLines = $('#originalWords').val().split('\n');
$.each(arrayOfLines, function (index, item) {
if (data.hasOwnProperty(item)) {
$('#translatedCode').append(data[item] + '\n');
} else {
$('#translatedCode').append('\n');
}
});
tb1.scroll(function () {
tb2.scrollTop(tb1.scrollTop());
});
}).fail(function () {
console.log("New translation");
tb1.scroll(function () {
});
});
});
});
</script>
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Original words found"); ?></h3>
<textarea placeholder="<?php echo __("Original words found"); ?>" class="form-control" rows="20" readonly="readonly" id="originalWords" wrap="off"><?php
foreach ($vars as $value) {
echo $value, "\n";
}
?></textarea>
</div>
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Word Translations"); ?></h3>
<textarea placeholder="<?php echo __("Paste here the translated words, one each line"); ?>" class="form-control" id="translatedCode" rows="20" wrap="off"></textarea>
</div>
<div class="col-lg-4 col-md-12">
<h3><?php echo __("Translated Array"); ?></h3>
<textarea placeholder="<?php echo __("Translated Array"); ?>" class="form-control" id="arrayCode" rows="20" readonly="readonly"></textarea>
</div>
</div>
<?php
$dir = "{$global['systemRootPath']}locale";
if (!is_writable($dir)) {
?>
<div class="alert alert-info">
<?php echo __("You need to make your locale folder writable"); ?>
<pre><code>chown www-data:www-data <?php echo $global['systemRootPath']; ?>locale && sudo chmod -R 755 <?php echo $global['systemRootPath']; ?>locale</code></pre>
</div>
<?php
}
?>
<div class="alert alert-info">
<?php echo count($vars) . ' words found'; ?>
</div>
</div>
</div>
</div><!--/.container-->
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var arrayLocale = <?php echo json_encode(array_values($vars)); ?>;
$(document).ready(function () {
$('#translatedCode').keyup(function () {
var lines = $(this).val().split('\n');
console.log(lines);
if (lines.length > 0 && !(lines.length == 1 && lines[0] === "")) {
var str = "";
for (var i = 0; i < lines.length; i++) {
if (typeof arrayLocale[i] == "undefined") {
break;
}
var key = arrayLocale[i].replace(/'/g, "\\'");
str += "$t['" + key + "'] = \"" + lines[i] + "\";\n";
}
$('#arrayCode').val(str);
$('button').prop('disabled', false);
} else {
$('#arrayCode').val("");
$('button').prop('disabled', true);
}
});
$('#btnSaveFile').click(function () {
if ($('#btnSaveFile').is(":disabled")) {
return false;
}
modal.showPleaseWait();
$.ajax({
url: 'save.php',
data: {"flag": $("select[name='country2']").val(), "code": $('#arrayCode').val()},
type: 'post',
success: function (response) {
if (response.status === "1") {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your language has been saved!"); ?>", "success");
} else {
avideoAlert("<?php echo __("Sorry!"); ?>", response.error, "error");
}
modal.hidePleaseWait();
}
});
});
});
</script>
</body>
</html>

View file

@ -60,7 +60,7 @@ if (!(!empty($_GET['user']) && !empty($_GET['recoverpass']))) {
} else {
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php echo getHTMLTitle(__("Recover Password")); ?>
<?php include $global['systemRootPath'] . 'view/include/head.php'; ?>

View file

@ -10,7 +10,7 @@ if (!User::isAdmin()) {
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("VAST"));

View file

@ -1,196 +1,196 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
gotToLoginAndComeBackHere(__("You can not do this"));
exit;
}
require_once $global['systemRootPath'] . 'plugin/API/API.php';
$obj = AVideoPlugin::getObjectDataIfEnabled("ADs");
if (empty($obj)) {
forbiddenPage(__("The plugin is disabled"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<?php
echo getHTMLTitle(__("ADs Editor"));
?>
<?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">
<br>
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __('Edit Ads'); ?>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-tabs nav-pills nav-stacked">
<?php
$active = 'active';
foreach (ADs::$AdsPositions as $key => $value) {
echo '<li class="' . $active . '">'
. '<a onclick="restartForm' . $value[0] . '()" data-toggle="tab" href="#adsTabs' . $key . '">' . ADs::getLabel($value[0]) . '</a>'
. '</li>';
$active = '';
}
?>
</ul>
</div>
<div class="col-md-10">
<div class="tab-content">
<?php
$active = ' in active';
foreach (ADs::$AdsPositions as $key => $value) {
$size = ADs::getSize($value[0]);
$width = $size['width'];
$height = $size['height']; ?>
<div id="adsTabs<?php echo $key; ?>" class="tab-pane fade <?php echo $active; ?>">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __("Image"), " {$width}X{$height} px"; ?>
</div>
<div class="panel-body">
<form>
<div class="form-group">
<?php
$croppie1 = getCroppie(__("Upload Image") . ' ' . $value[0], "setImage_" . $value[0], $width, $height);
echo $croppie1['html']; ?>
</div>
<div class="form-group">
<label for="inputAdsURL<?php echo $value[0]; ?>"><?php echo __("URL"); ?></label>
<input type="url" id="inputAdsURL<?php echo $value[0]; ?>" class="form-control" placeholder="<?php echo __("URL"); ?>">
</div>
<button class="btn btn-primary btn-block"><i class="fas fa-save"></i> <?php echo __('Save'); ?></button>
</form>
</div>
<div class="panel-footer">
<ul class="list-group" id="list-group-<?php echo $value[0]; ?>">
<?php
$adsList = ADs::getAds($value[0]);
foreach ($adsList as $item) {
?>
<li class="list-group-item clearfix" id="<?php echo $item["fileName"]; ?>" >
<img src="<?php echo $item["imageURL"]; ?>"
class="img img-responsive pull-left"
style="max-height: 60px; max-width: 150px; margin-right: 10px;">
<?php
echo $item["url"]; ?>
<button class="btn btn-sm btn-danger pull-right" onclick="deleteAdsImage('<?php echo $item["type"]; ?>', '<?php echo $item["fileName"]; ?>')"><i class="fas fa-trash"></i></button>
</li>
<?php
} ?>
</ul>
</div>
</div>
</div>
<script>
$('#adsTabs<?php echo $key; ?> form').submit(function (evt) {
evt.preventDefault();
setTimeout(function () {
<?php
echo $croppie1['getCroppieFunction']; ?>
}, 500);
return false;
});
function setImage_<?php echo $value[0]; ?>(image) {
saveAdsImage(image, '<?php echo $value[0]; ?>', $('#inputAdsURL<?php echo $value[0]; ?>').val());
}
function restartForm<?php echo $value[0]; ?>() {
<?php echo $croppie1['restartCroppie'] . "('".getCDN()."view/img/transparent1px.png');"; ?>
$('#inputAdsURL<?php echo $value[0]; ?>').val('');
}
$(document).ready(function () {
restartForm<?php echo $value[0]; ?>();
});
</script>
<?php
$active = '';
}
?>
</div>
</div>
</div>
</div>
</div>
<script>
function saveAdsImage(image, type, url) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL'] . "plugin/ADs/saveImage.json.php"; ?>',
data: {
type: type,
url: url,
image: image
},
type: 'post',
success: function (response) {
if (!response.error) {
avideoToastSuccess("<?php echo __("Ads Saved!"); ?>");
eval('restartForm' + type + '();');
addNewImage(response);
} else {
avideoAlertError(response.msg);
}
modal.hidePleaseWait();
}
});
}
function deleteAdsImage(type, fileName){
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL'] . "plugin/ADs/deleteImage.json.php"; ?>',
data: {
type: type,
fileName: fileName
},
type: 'post',
success: function (response) {
if (!response.error) {
avideoToastSuccess("<?php echo __("Ads deleted!"); ?>");
$('#'+fileName).slideUp();
} else {
avideoAlertError(response.msg);
}
modal.hidePleaseWait();
}
});
}
function addNewImage(response){
var html = '<li class="list-group-item clearfix" id="'+response.fileName+'" ><img src="'+response.imageURL+'" class="img img-responsive pull-left" style="max-height: 60px; max-width: 150px; margin-right: 10px;">'+response.url+'<button class="btn btn-sm btn-danger pull-right" onclick="deleteAdsImage(\''+response.type+'\',\''+response.fileName+'\')"><i class="fas fa-trash"></i></button></li>';
$('#list-group-'+response.type).append(html);
}
</script>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
gotToLoginAndComeBackHere(__("You can not do this"));
exit;
}
require_once $global['systemRootPath'] . 'plugin/API/API.php';
$obj = AVideoPlugin::getObjectDataIfEnabled("ADs");
if (empty($obj)) {
forbiddenPage(__("The plugin is disabled"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("ADs Editor"));
?>
<?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">
<br>
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __('Edit Ads'); ?>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-tabs nav-pills nav-stacked">
<?php
$active = 'active';
foreach (ADs::$AdsPositions as $key => $value) {
echo '<li class="' . $active . '">'
. '<a onclick="restartForm' . $value[0] . '()" data-toggle="tab" href="#adsTabs' . $key . '">' . ADs::getLabel($value[0]) . '</a>'
. '</li>';
$active = '';
}
?>
</ul>
</div>
<div class="col-md-10">
<div class="tab-content">
<?php
$active = ' in active';
foreach (ADs::$AdsPositions as $key => $value) {
$size = ADs::getSize($value[0]);
$width = $size['width'];
$height = $size['height']; ?>
<div id="adsTabs<?php echo $key; ?>" class="tab-pane fade <?php echo $active; ?>">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __("Image"), " {$width}X{$height} px"; ?>
</div>
<div class="panel-body">
<form>
<div class="form-group">
<?php
$croppie1 = getCroppie(__("Upload Image") . ' ' . $value[0], "setImage_" . $value[0], $width, $height);
echo $croppie1['html']; ?>
</div>
<div class="form-group">
<label for="inputAdsURL<?php echo $value[0]; ?>"><?php echo __("URL"); ?></label>
<input type="url" id="inputAdsURL<?php echo $value[0]; ?>" class="form-control" placeholder="<?php echo __("URL"); ?>">
</div>
<button class="btn btn-primary btn-block"><i class="fas fa-save"></i> <?php echo __('Save'); ?></button>
</form>
</div>
<div class="panel-footer">
<ul class="list-group" id="list-group-<?php echo $value[0]; ?>">
<?php
$adsList = ADs::getAds($value[0]);
foreach ($adsList as $item) {
?>
<li class="list-group-item clearfix" id="<?php echo $item["fileName"]; ?>" >
<img src="<?php echo $item["imageURL"]; ?>"
class="img img-responsive pull-left"
style="max-height: 60px; max-width: 150px; margin-right: 10px;">
<?php
echo $item["url"]; ?>
<button class="btn btn-sm btn-danger pull-right" onclick="deleteAdsImage('<?php echo $item["type"]; ?>', '<?php echo $item["fileName"]; ?>')"><i class="fas fa-trash"></i></button>
</li>
<?php
} ?>
</ul>
</div>
</div>
</div>
<script>
$('#adsTabs<?php echo $key; ?> form').submit(function (evt) {
evt.preventDefault();
setTimeout(function () {
<?php
echo $croppie1['getCroppieFunction']; ?>
}, 500);
return false;
});
function setImage_<?php echo $value[0]; ?>(image) {
saveAdsImage(image, '<?php echo $value[0]; ?>', $('#inputAdsURL<?php echo $value[0]; ?>').val());
}
function restartForm<?php echo $value[0]; ?>() {
<?php echo $croppie1['restartCroppie'] . "('".getCDN()."view/img/transparent1px.png');"; ?>
$('#inputAdsURL<?php echo $value[0]; ?>').val('');
}
$(document).ready(function () {
restartForm<?php echo $value[0]; ?>();
});
</script>
<?php
$active = '';
}
?>
</div>
</div>
</div>
</div>
</div>
<script>
function saveAdsImage(image, type, url) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL'] . "plugin/ADs/saveImage.json.php"; ?>',
data: {
type: type,
url: url,
image: image
},
type: 'post',
success: function (response) {
if (!response.error) {
avideoToastSuccess("<?php echo __("Ads Saved!"); ?>");
eval('restartForm' + type + '();');
addNewImage(response);
} else {
avideoAlertError(response.msg);
}
modal.hidePleaseWait();
}
});
}
function deleteAdsImage(type, fileName){
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL'] . "plugin/ADs/deleteImage.json.php"; ?>',
data: {
type: type,
fileName: fileName
},
type: 'post',
success: function (response) {
if (!response.error) {
avideoToastSuccess("<?php echo __("Ads deleted!"); ?>");
$('#'+fileName).slideUp();
} else {
avideoAlertError(response.msg);
}
modal.hidePleaseWait();
}
});
}
function addNewImage(response){
var html = '<li class="list-group-item clearfix" id="'+response.fileName+'" ><img src="'+response.imageURL+'" class="img img-responsive pull-left" style="max-height: 60px; max-width: 150px; margin-right: 10px;">'+response.url+'<button class="btn btn-sm btn-danger pull-right" onclick="deleteAdsImage(\''+response.type+'\',\''+response.fileName+'\')"><i class="fas fa-trash"></i></button></li>';
$('#list-group-'+response.type).append(html);
}
</script>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -1,112 +1,112 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
require_once $global['systemRootPath'] . 'plugin/API/API.php';
$plugin = AVideoPlugin::loadPluginIfEnabled("API");
if (empty($plugin)) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$obj = AVideoPlugin::getObjectData("API");
$reflector = new ReflectionClass('API');
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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';
$class_methods = get_class_methods('API');
foreach ($class_methods as $key => $method_name) {
if (!preg_match("/(get|set)_api_(.*)/", $method_name, $matches)) {
unset($class_methods[$key]);
}
}
usort($class_methods, function ($a, $b) {
if (!preg_match("/(get|set)_api_(.*)/", $a, $matchesA)) {
return 0;
}
if (!preg_match("/(get|set)_api_(.*)/", $b, $matchesB)) {
return 0;
}
return strcasecmp($matchesA[2], $matchesB[2]);
});
?>
<div class="container-fluid">
<ul class="list-group">
<li class="list-group-item">
<details>
<summary style="cursor: pointer;"><i class="fas fa-file-upload"></i> Upload a Video</summary>
<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>
<br>
Your HTML Form should looks like this. The user and the pass values on the action URL will be the video owner
<pre><?php
$frm = '<form enctype="multipart/form-data" method="post" action="' . $global['webSiteRootURL'] . 'plugin/MobileManager/upload.php?user=' . urlencode(User::getUserName()) . '&pass=' . User::getUserPass() . '">
<input name="title" type="text" /><br>
<textarea name="description"></textarea><br>
<input name="categories_id" type="hidden" value="1" />
<input name="upl" type="file" accept="video/mp4" /><br>
<input type="submit" value="submit" id="submit"/>
</form>';
echo htmlentities($frm);
?>
</pre>
You can Click to get notified for the new video uploads with the Webhook in the Notification plugin, Check <a href="https://github.com/WWBN/AVideo/wiki/Notifications-Plugin#webhooks" target="_blank" rel="noopener noreferrer">here</a> for more details
</details>
</li>
<?php
foreach ($class_methods as $method_name) {
if (!preg_match("/(get|set)_api_(.*)/", $method_name, $matches)) {
continue;
} ?>
<li class="list-group-item">
<details>
<summary style="cursor: pointer;"><i class="fas fa-sign-<?php echo strtoupper($matches[1]) === "GET" ? "out" : "in" ?>-alt"></i> <?php echo strtoupper($matches[1]) ?> <?php echo $matches[2] ?></summary>
<br>
<pre><?php
$comment = $reflector->getMethod($method_name)->getDocComment();
$comment = str_replace(['{webSiteRootURL}', '{getOrSet}', '{APIName}', '{APISecret}'], [$global['webSiteRootURL'], $matches[1], $matches[2], $obj->APISecret], $comment);
preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $comment, $match2);
//var_dump($match2[0]);
$link = "<a target='_blank' href='{$match2[0][0]}'>" . htmlentities($match2[0][0]) . "</a>";
$comment = str_replace([$match2[0][0], " *"], [$link, "*"], $comment);
echo($comment);
//{webSiteRootURL}plugin/API/{getOrSet}.json.php?name={name}
?>
</pre>
</details>
</li>
<?php
}
?>
</ul>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
require_once $global['systemRootPath'] . 'plugin/API/API.php';
$plugin = AVideoPlugin::loadPluginIfEnabled("API");
if (empty($plugin)) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$obj = AVideoPlugin::getObjectData("API");
$reflector = new ReflectionClass('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';
$class_methods = get_class_methods('API');
foreach ($class_methods as $key => $method_name) {
if (!preg_match("/(get|set)_api_(.*)/", $method_name, $matches)) {
unset($class_methods[$key]);
}
}
usort($class_methods, function ($a, $b) {
if (!preg_match("/(get|set)_api_(.*)/", $a, $matchesA)) {
return 0;
}
if (!preg_match("/(get|set)_api_(.*)/", $b, $matchesB)) {
return 0;
}
return strcasecmp($matchesA[2], $matchesB[2]);
});
?>
<div class="container-fluid">
<ul class="list-group">
<li class="list-group-item">
<details>
<summary style="cursor: pointer;"><i class="fas fa-file-upload"></i> Upload a Video</summary>
<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>
<br>
Your HTML Form should looks like this. The user and the pass values on the action URL will be the video owner
<pre><?php
$frm = '<form enctype="multipart/form-data" method="post" action="' . $global['webSiteRootURL'] . 'plugin/MobileManager/upload.php?user=' . urlencode(User::getUserName()) . '&pass=' . User::getUserPass() . '">
<input name="title" type="text" /><br>
<textarea name="description"></textarea><br>
<input name="categories_id" type="hidden" value="1" />
<input name="upl" type="file" accept="video/mp4" /><br>
<input type="submit" value="submit" id="submit"/>
</form>';
echo htmlentities($frm);
?>
</pre>
You can Click to get notified for the new video uploads with the Webhook in the Notification plugin, Check <a href="https://github.com/WWBN/AVideo/wiki/Notifications-Plugin#webhooks" target="_blank" rel="noopener noreferrer">here</a> for more details
</details>
</li>
<?php
foreach ($class_methods as $method_name) {
if (!preg_match("/(get|set)_api_(.*)/", $method_name, $matches)) {
continue;
} ?>
<li class="list-group-item">
<details>
<summary style="cursor: pointer;"><i class="fas fa-sign-<?php echo strtoupper($matches[1]) === "GET" ? "out" : "in" ?>-alt"></i> <?php echo strtoupper($matches[1]) ?> <?php echo $matches[2] ?></summary>
<br>
<pre><?php
$comment = $reflector->getMethod($method_name)->getDocComment();
$comment = str_replace(['{webSiteRootURL}', '{getOrSet}', '{APIName}', '{APISecret}'], [$global['webSiteRootURL'], $matches[1], $matches[2], $obj->APISecret], $comment);
preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $comment, $match2);
//var_dump($match2[0]);
$link = "<a target='_blank' href='{$match2[0][0]}'>" . htmlentities($match2[0][0]) . "</a>";
$comment = str_replace([$match2[0][0], " *"], [$link, "*"], $comment);
echo($comment);
//{webSiteRootURL}plugin/API/{getOrSet}.json.php?name={name}
?>
</pre>
</details>
</li>
<?php
}
?>
</ul>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -1,87 +1,87 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin Audit"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-body">
<table id="auditTable" class="table table-striped">
<thead>
<tr>
<th>Class</th>
<th>Method</th>
<th>Statement</th>
<th>Format</th>
<th>Values</th>
<th>Created</th>
<th>User</th>
<th>IP</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Class</th>
<th>Method</th>
<th>Statement</th>
<th>Format</th>
<th>Values</th>
<th>Created</th>
<th>User</th>
<th>IP</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
<script>
$(document).ready(function () {
var auditTable = $('#auditTable').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "<?php echo $global['webSiteRootURL']; ?>plugin/Audit/page/audits.json.php",
},
"columns": [
{"data": "class"},
{"data": "method"},
{"data": "statement"},
{"data": "formats"},
{"data": "values"},
{"data": "created"},
{"data": "user"},
{"data": "ip"},
],
select: true,
"order": [[5, "desc"]]
});
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin Audit"));
exit;
}
?>
<!DOCTYPE html>
<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-body">
<table id="auditTable" class="table table-striped">
<thead>
<tr>
<th>Class</th>
<th>Method</th>
<th>Statement</th>
<th>Format</th>
<th>Values</th>
<th>Created</th>
<th>User</th>
<th>IP</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Class</th>
<th>Method</th>
<th>Statement</th>
<th>Format</th>
<th>Values</th>
<th>Created</th>
<th>User</th>
<th>IP</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
<script>
$(document).ready(function () {
var auditTable = $('#auditTable').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "<?php echo $global['webSiteRootURL']; ?>plugin/Audit/page/audits.json.php",
},
"columns": [
{"data": "class"},
{"data": "method"},
{"data": "statement"},
{"data": "formats"},
{"data": "values"},
{"data": "created"},
{"data": "user"},
{"data": "ip"},
],
select: true,
"order": [[5, "desc"]]
});
});
</script>
</body>
</html>

View file

@ -1,145 +1,145 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading">
<div class="row">
<div class="col-sm-2">
<input type="checkbox" onclick="$('.scheduleTwitterPost input:checkbox').prop('checked', this.checked);" id="AutoPostOnSocialMediaCheckbox">
<label for="AutoPostOnSocialMediaCheckbox">
<?php echo __('AutoPostOnSocialMedia') ?>
</label>
</div>
<div class="col-sm-8">
<button class="btn btn-success btn-block" onclick="saveScheduleTwitter();">
<i class="fas fa-save"></i>
<?php echo __('Save') ?>
</button>
</div>
<div class="col-sm-2">
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("AutoPostOnSocialMedia"); ?>
</div>
</div>
</div>
</div>
<div class="panel-body scheduleTwitterPost">
<?php
$rows = Scheduler_commands::getAllFromType(AutoPostOnSocialMedia::$scheduleType);
$savedValues = array();
foreach ($rows as $value) {
if(!isset($savedValues[$value['repeat_day_of_week']])){
$savedValues[$value['repeat_day_of_week']] = array();
}
$savedValues[$value['repeat_day_of_week']][] = $value['repeat_hour'];
}
//var_dump($savedValues);
$weekdays = array(
__('Sunday'),
__('Monday'),
__('Tuesday'),
__('Wednsday'),
__('Thursday'),
__('Friday'),
__('Saturday')
);
$columns = 3;
foreach ($weekdays as $weekday => $value) {
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<input type="checkbox" onclick="$('.scheduleTwitterPost input.form-check-input-<?php echo $value; ?>:checkbox').prop('checked', this.checked);" id="AutoPostOnSocialMediaCheckbox-<?php echo $value; ?>">
<label for="AutoPostOnSocialMediaCheckbox-<?php echo $value; ?>">
<?php echo $value; ?>
</label>
</div>
<div class="panel-body">
<?php
$i = 0;
for ($c = 1; $c <= $columns; $c++) {
$val = 12 / $columns;
$class = 'col-xs-' . $val;
$time = 24 / $columns;
?>
<div class="<?php echo $class; ?>">
<?php
for (; $i < $time * $c; $i++) {
$checked = '';
if(!empty($savedValues[$weekday]) && in_array($i, $savedValues[$weekday])){
$checked = 'checked="checked"';
}
?>
<div class="form-check">
<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; ?>">
<label class="form-check-label" for="flexCheckDefault<?php echo $value . $i; ?>">
<?php printf("%02d", $i); ?>H
</label>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(function () {
});
function saveScheduleTwitter() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/AutoPostOnSocialMedia/saveSchedule.json.php',
method: 'POST',
data: {
'checkedItems': getCheckedItems()
},
success: function (response) {
avideoResponse(response);
modal.hidePleaseWait();
}
});
}
function getCheckedItems() {
var selected = new Array();
$("input.form-check-input:checkbox:checked").each(function () {
selected.push($(this).val());
});
console.log('selected', selected);
return selected;
}
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("AutoPostOnSocialMedia");
?>
<!DOCTYPE html>
<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-heading">
<div class="row">
<div class="col-sm-2">
<input type="checkbox" onclick="$('.scheduleTwitterPost input:checkbox').prop('checked', this.checked);" id="AutoPostOnSocialMediaCheckbox">
<label for="AutoPostOnSocialMediaCheckbox">
<?php echo __('AutoPostOnSocialMedia') ?>
</label>
</div>
<div class="col-sm-8">
<button class="btn btn-success btn-block" onclick="saveScheduleTwitter();">
<i class="fas fa-save"></i>
<?php echo __('Save') ?>
</button>
</div>
<div class="col-sm-2">
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("AutoPostOnSocialMedia"); ?>
</div>
</div>
</div>
</div>
<div class="panel-body scheduleTwitterPost">
<?php
$rows = Scheduler_commands::getAllFromType(AutoPostOnSocialMedia::$scheduleType);
$savedValues = array();
foreach ($rows as $value) {
if(!isset($savedValues[$value['repeat_day_of_week']])){
$savedValues[$value['repeat_day_of_week']] = array();
}
$savedValues[$value['repeat_day_of_week']][] = $value['repeat_hour'];
}
//var_dump($savedValues);
$weekdays = array(
__('Sunday'),
__('Monday'),
__('Tuesday'),
__('Wednsday'),
__('Thursday'),
__('Friday'),
__('Saturday')
);
$columns = 3;
foreach ($weekdays as $weekday => $value) {
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<input type="checkbox" onclick="$('.scheduleTwitterPost input.form-check-input-<?php echo $value; ?>:checkbox').prop('checked', this.checked);" id="AutoPostOnSocialMediaCheckbox-<?php echo $value; ?>">
<label for="AutoPostOnSocialMediaCheckbox-<?php echo $value; ?>">
<?php echo $value; ?>
</label>
</div>
<div class="panel-body">
<?php
$i = 0;
for ($c = 1; $c <= $columns; $c++) {
$val = 12 / $columns;
$class = 'col-xs-' . $val;
$time = 24 / $columns;
?>
<div class="<?php echo $class; ?>">
<?php
for (; $i < $time * $c; $i++) {
$checked = '';
if(!empty($savedValues[$weekday]) && in_array($i, $savedValues[$weekday])){
$checked = 'checked="checked"';
}
?>
<div class="form-check">
<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; ?>">
<label class="form-check-label" for="flexCheckDefault<?php echo $value . $i; ?>">
<?php printf("%02d", $i); ?>H
</label>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(function () {
});
function saveScheduleTwitter() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/AutoPostOnSocialMedia/saveSchedule.json.php',
method: 'POST',
data: {
'checkedItems': getCheckedItems()
},
success: function (response) {
avideoResponse(response);
modal.hidePleaseWait();
}
});
}
function getCheckedItems() {
var selected = new Array();
$("input.form-check-input:checkbox:checked").each(function () {
selected.push($(this).val());
});
console.log('selected', selected);
return selected;
}
</script>
</body>
</html>

View file

@ -1,136 +1,136 @@
<?php
require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$plugin = AVideoPlugin::loadPluginIfEnabled("BlockonomicsYPT");
$obj = AVideoPlugin::getObjectData("BlockonomicsYPT");
$order_id = $plugin->setUpPayment($_GET['value']);
$order = new BlockonomicsOrder($order_id);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading">
<h1>
Order#: <?php echo sprintf('%08d', $order->getId()); ?>
</h1>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<h2>Bitcoin Address</h2>
<a href="bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>">
<div id="qrcode" class="text-center"></div>
</a>
<br/>
<div class="field">
<div class="control">
<input type="text" class="input form-control" value="<?php echo $order->getAddr(); ?>" readonly="readonly">
</div>
</div>
</div>
<div class="col-md-6">
<h2>To pay, send exact amount of BTC to the given address</h2>
<h3>Amount</h3>
<p><strong><?php echo $order->getFormatedBits(); ?></strong> BTC ⇌ <strong><?php echo $order->getTotal_value(); ?></strong> <?php echo $order->getCurrency(); ?></p>
<br/>
<h2>Payment Details: </h2>
<h4 style="display: none;" class="bstatus label label-danger" id="status-3"> Payment Expired</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="status1"> Partially Confirmed</h4>
<h4 style="display: none;" class="bstatus label label-success" id="status2" >Confirmed</h4>
<div>
Received : <strong id="received"><?php echo $order->getFormatedBits_payed(); ?></strong>
<small>BTC</small>
</div>
<div style="margin-bottom:10px;" >
Transaction : <span id="transaction"></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:100%" id="timeleft">
100%
</div>
</div>
</div>
</div>
</div>
</div>
<?php
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 totalSecondsPassed = <?php echo time() - strtotime($order->getCreated()); ?>;
var totalSecondsleft = totalSeconds - totalSecondsPassed;
$(document).ready(function () {
$('#qrcode').qrcode({width: 220, height: 220, text: "bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>"});
setInterval(function () {
totalSecondsleft--;
if (totalSecondsleft < 1) {
totalSecondsleft = 0;
}
var percent = (totalSecondsleft / totalSeconds) * 100;
$("#timeleft").css('width', percent + "%").html(totalSecondsleft + " <?php echo __("Seconds Left"); ?>");
}, 1000);
check();
});
function check() {
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BlockonomicsYPT/check.php?addr=<?php echo $order->getAddr(); ?>',
success: function (response) {
console.log(response);
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>');
$("#received").html((response.bits_payed / 1.0e8));
setTimeout(function () {
check();
}, 3000);
}else{
response.status = 2;
}
$(".bstatus").not("#status"+response.status).hide();
$("#status"+response.status).fadeIn();
}
});
}
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$plugin = AVideoPlugin::loadPluginIfEnabled("BlockonomicsYPT");
$obj = AVideoPlugin::getObjectData("BlockonomicsYPT");
$order_id = $plugin->setUpPayment($_GET['value']);
$order = new BlockonomicsOrder($order_id);
?>
<!DOCTYPE html>
<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-heading">
<h1>
Order#: <?php echo sprintf('%08d', $order->getId()); ?>
</h1>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<h2>Bitcoin Address</h2>
<a href="bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>">
<div id="qrcode" class="text-center"></div>
</a>
<br/>
<div class="field">
<div class="control">
<input type="text" class="input form-control" value="<?php echo $order->getAddr(); ?>" readonly="readonly">
</div>
</div>
</div>
<div class="col-md-6">
<h2>To pay, send exact amount of BTC to the given address</h2>
<h3>Amount</h3>
<p><strong><?php echo $order->getFormatedBits(); ?></strong> BTC ⇌ <strong><?php echo $order->getTotal_value(); ?></strong> <?php echo $order->getCurrency(); ?></p>
<br/>
<h2>Payment Details: </h2>
<h4 style="display: none;" class="bstatus label label-danger" id="status-3"> Payment Expired</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="status1"> Partially Confirmed</h4>
<h4 style="display: none;" class="bstatus label label-success" id="status2" >Confirmed</h4>
<div>
Received : <strong id="received"><?php echo $order->getFormatedBits_payed(); ?></strong>
<small>BTC</small>
</div>
<div style="margin-bottom:10px;" >
Transaction : <span id="transaction"></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:100%" id="timeleft">
100%
</div>
</div>
</div>
</div>
</div>
</div>
<?php
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 totalSecondsPassed = <?php echo time() - strtotime($order->getCreated()); ?>;
var totalSecondsleft = totalSeconds - totalSecondsPassed;
$(document).ready(function () {
$('#qrcode').qrcode({width: 220, height: 220, text: "bitcoin:<?php echo $order->getAddr(); ?>?amount=<?php echo $order->getFormatedBits(); ?>"});
setInterval(function () {
totalSecondsleft--;
if (totalSecondsleft < 1) {
totalSecondsleft = 0;
}
var percent = (totalSecondsleft / totalSeconds) * 100;
$("#timeleft").css('width', percent + "%").html(totalSecondsleft + " <?php echo __("Seconds Left"); ?>");
}, 1000);
check();
});
function check() {
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BlockonomicsYPT/check.php?addr=<?php echo $order->getAddr(); ?>',
success: function (response) {
console.log(response);
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>');
$("#received").html((response.bits_payed / 1.0e8));
setTimeout(function () {
check();
}, 3000);
}else{
response.status = 2;
}
$(".bstatus").not("#status"+response.status).hide();
$("#status"+response.status).fadeIn();
}
});
}
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@ $video = Video::getVideo($_GET['videos_id'], "", true);
$poster = Video::getPathToFile("{$video['filename']}.jpg");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Bookmark Editor"));

View file

@ -7,7 +7,7 @@ if (!User::isAdmin()) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Bookmarks"));

View file

@ -1,451 +1,451 @@
<?php
require_once '../../videos/configuration.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$obj = AVideoPlugin::getObjectData("BulkEmbed");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<?php
echo getHTMLTitle( __("Search"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
#results li {
padding: 10px 0;
border-bottom: 1px dotted #ccc;
list-style: none;
overflow: auto;
}
.list-left {
float: left;
width: 20%;
}
.list-left img {
width: 100%;
padding: 3px;
border: 1px solid #ccc;
}
.list-right {
float: right;
width: 78%;
}
.list-right h3 {
margin: 0;
}
.list-right p {
margin: 0;
}
.cTitle {
color: #dd2826;
}
.button-container {
margin-top: 25px;
}
.paging-button {
background: #f4f4f4;
padding: 0 13px;
border: #ccc 1px solid;
border-radius: 5px;
color: #333;
margin: 10px;
cursor: pointer;
}
</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-heading">
<form id="search-form" name="search-form" onsubmit="return search()">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="search" id="query" class="form-control input-lg" placeholder="Search YouTube / PlayList URL" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="submit">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
</form>
<br>
<div class="row">
<div class="col-sm-6">
<button class="btn btn-info btn-block" id="getAll"><?php echo __('Embed All'); ?></button>
</div>
<div class="col-sm-6">
<button class="btn btn-success btn-block" id="getSelected"><?php echo __('Embed Selected'); ?></button>
</div>
</div>
</div>
<div class="panel-body">
<ul id="results"></ul>
<div id="buttons"></div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var gapikey = '<?php echo $obj->API_KEY; ?>';
var playListName = '';
$(function () {
$('#search-form').submit(function (e) {
e.preventDefault();
});
$('#getAll').click(function () {
var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]").each(function () {
videoLink.push($(this).val());
});
saveIt(videoLink);
});
$('#getSelected').click(function () {
var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]:checked").each(function () {
videoLink.push($(this).val());
});
saveIt(videoLink);
});
});
function saveIt(videoLink) {
modal.showPleaseWait();
setTimeout(function () {
var itemsToSave = [];
for (x in videoLink) {
if (typeof videoLink[x] === 'function') {
continue;
}
$.ajax({
url: "https://www.googleapis.com/youtube/v3/videos?id=" + videoLink[x] + "&part=id,snippet,contentDetails&key=" + gapikey,
async: false,
success: function (data) {
var item = {};
item.link = "https://youtube.com/embed/" + data.items[0].id;
item.title = data.items[0].snippet.title;
item.description = data.items[0].snippet.description;
item.duration = data.items[0].contentDetails.duration;
console.log(data.items[0].snippet);
item.thumbs = data.items[0].snippet.thumbnails.high.url;
itemsToSave.push(item);
}
});
}
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php',
data: {"itemsToSave": itemsToSave, playListName: playListName},
type: 'post',
success: function (response) {
if (!response.error) {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your videos have been saved!"); ?>", "success");
} else {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg.join("<br>"), "error");
}
modal.hidePleaseWait();
}
});
}, 500);
}
function validURL(str) {
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
return !!pattern.test(str);
}
function getFromUrl(url) {
if (!validURL(url)) {
return false;
}
var regex = /[?&]([^=#]+)=([^&#]*)/g,
params = {},
match;
while (match = regex.exec(url)) {
params[match[1]] = match[2];
}
return params;
}
function getPlayListId(url) {
var result = getFromUrl(url);
if (result && typeof result.list !== 'undefined') {
return result.list;
}
return false;
}
function search() {
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
var playListId = getPlayListId(q);
if (playListId) {
$.get(
"https://www.googleapis.com/youtube/v3/playlists", {
part: 'snippet',
key: gapikey,
id: playListId
}, function (data) {
playListName = data.items[0].snippet.title;
$.get(
"https://www.googleapis.com/youtube/v3/playlistItems", {
part: 'snippet, id',
q: q,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true",
videoSyndicated: "true",
playlistId: playListId
}, function (data) {
processData(data);
});
});
} else {
playListName = '';
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
type: 'video',
key: gapikey,
maxResults: 50,
videoSyndicated: "true",
videoEmbeddable: "true"
}, function (data) {
processData(data);
});
}
}
function processData(data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
//console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
}
// Next page function
function nextPage() {
var token = $('#next-button').data('token');
var q = $('#next-button').data('query');
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
pageToken: token,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true"
}, function (data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
});
}
// Previous page function
function prevPage() {
var token = $('#prev-button').data('token');
var q = $('#prev-button').data('query');
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
pageToken: token,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true"
}, function (data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
});
}
// Build output
function getOutput(item) {
console.log(item);
var videoID;
if(typeof item.snippet.thumbnails === 'undefined'){
return true;
}
if(item.id.videoId){
videoID = item.id.videoId;
}else{
videoID = item.snippet.resourceId.videoId;
}
var title = item.snippet.title;
var description = item.snippet.description;
var thumb = item.snippet.thumbnails.high.url;
var channelTitle = item.snippet.channelTitle;
var videoDate = item.snippet.publishedAt;
// Build output string
var output = '<li>' +
'<div class="list-left">' +
'<img src="' + thumb + '">' +
'</div>' +
'<div class="list-right">' +
'<h3><input type="checkbox" value="' + videoID + '" name="videoCheckbox"><a target="_blank" href="https://youtube.com/embed/' + videoID + '?rel=0">' + title + '</a></h3>' +
'<small>By <span class="cTitle">' + channelTitle + '</span> on ' + videoDate + '</small>' +
'<p>' + description + '</p>' +
'</div>' +
'</li>' +
'<div class="clearfix"></div>' +
'';
return output;
}
function getButtons(prevPageToken, nextPageToken) {
if (!prevPageToken) {
var btnoutput = '<div class="button-container">' +
'<button id="next-button" class="paging-button" data-token="' + nextPageToken + '" data-query="' + q + '"' +
'onclick = "nextPage();">Next Page</button>' +
'</div>';
} else {
var btnoutput = '<div class="button-container">' +
'<button id="prev-button" class="paging-button" data-token="' + prevPageToken + '" data-query="' + q + '"' +
'onclick = "prevPage();">Prev Page</button>' +
'<button id="next-button" class="paging-button" data-token="' + nextPageToken + '" data-query="' + q + '"' +
'onclick = "nextPage();">Next Page</button>' +
'</div>';
}
return btnoutput;
}
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$obj = AVideoPlugin::getObjectData("BulkEmbed");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle( __("Search"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
#results li {
padding: 10px 0;
border-bottom: 1px dotted #ccc;
list-style: none;
overflow: auto;
}
.list-left {
float: left;
width: 20%;
}
.list-left img {
width: 100%;
padding: 3px;
border: 1px solid #ccc;
}
.list-right {
float: right;
width: 78%;
}
.list-right h3 {
margin: 0;
}
.list-right p {
margin: 0;
}
.cTitle {
color: #dd2826;
}
.button-container {
margin-top: 25px;
}
.paging-button {
background: #f4f4f4;
padding: 0 13px;
border: #ccc 1px solid;
border-radius: 5px;
color: #333;
margin: 10px;
cursor: pointer;
}
</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-heading">
<form id="search-form" name="search-form" onsubmit="return search()">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="search" id="query" class="form-control input-lg" placeholder="Search YouTube / PlayList URL" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="submit">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
</form>
<br>
<div class="row">
<div class="col-sm-6">
<button class="btn btn-info btn-block" id="getAll"><?php echo __('Embed All'); ?></button>
</div>
<div class="col-sm-6">
<button class="btn btn-success btn-block" id="getSelected"><?php echo __('Embed Selected'); ?></button>
</div>
</div>
</div>
<div class="panel-body">
<ul id="results"></ul>
<div id="buttons"></div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var gapikey = '<?php echo $obj->API_KEY; ?>';
var playListName = '';
$(function () {
$('#search-form').submit(function (e) {
e.preventDefault();
});
$('#getAll').click(function () {
var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]").each(function () {
videoLink.push($(this).val());
});
saveIt(videoLink);
});
$('#getSelected').click(function () {
var videoLink = new Array();
$("input:checkbox[name=videoCheckbox]:checked").each(function () {
videoLink.push($(this).val());
});
saveIt(videoLink);
});
});
function saveIt(videoLink) {
modal.showPleaseWait();
setTimeout(function () {
var itemsToSave = [];
for (x in videoLink) {
if (typeof videoLink[x] === 'function') {
continue;
}
$.ajax({
url: "https://www.googleapis.com/youtube/v3/videos?id=" + videoLink[x] + "&part=id,snippet,contentDetails&key=" + gapikey,
async: false,
success: function (data) {
var item = {};
item.link = "https://youtube.com/embed/" + data.items[0].id;
item.title = data.items[0].snippet.title;
item.description = data.items[0].snippet.description;
item.duration = data.items[0].contentDetails.duration;
console.log(data.items[0].snippet);
item.thumbs = data.items[0].snippet.thumbnails.high.url;
itemsToSave.push(item);
}
});
}
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php',
data: {"itemsToSave": itemsToSave, playListName: playListName},
type: 'post',
success: function (response) {
if (!response.error) {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your videos have been saved!"); ?>", "success");
} else {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg.join("<br>"), "error");
}
modal.hidePleaseWait();
}
});
}, 500);
}
function validURL(str) {
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
return !!pattern.test(str);
}
function getFromUrl(url) {
if (!validURL(url)) {
return false;
}
var regex = /[?&]([^=#]+)=([^&#]*)/g,
params = {},
match;
while (match = regex.exec(url)) {
params[match[1]] = match[2];
}
return params;
}
function getPlayListId(url) {
var result = getFromUrl(url);
if (result && typeof result.list !== 'undefined') {
return result.list;
}
return false;
}
function search() {
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
var playListId = getPlayListId(q);
if (playListId) {
$.get(
"https://www.googleapis.com/youtube/v3/playlists", {
part: 'snippet',
key: gapikey,
id: playListId
}, function (data) {
playListName = data.items[0].snippet.title;
$.get(
"https://www.googleapis.com/youtube/v3/playlistItems", {
part: 'snippet, id',
q: q,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true",
videoSyndicated: "true",
playlistId: playListId
}, function (data) {
processData(data);
});
});
} else {
playListName = '';
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
type: 'video',
key: gapikey,
maxResults: 50,
videoSyndicated: "true",
videoEmbeddable: "true"
}, function (data) {
processData(data);
});
}
}
function processData(data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
//console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
}
// Next page function
function nextPage() {
var token = $('#next-button').data('token');
var q = $('#next-button').data('query');
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
pageToken: token,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true"
}, function (data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
});
}
// Previous page function
function prevPage() {
var token = $('#prev-button').data('token');
var q = $('#prev-button').data('query');
// clear
$('#results').html('');
$('#buttons').html('');
// get form input
q = $('#query').val(); // this probably shouldn't be created as a global
// run get request on API
$.get(
"https://www.googleapis.com/youtube/v3/search", {
part: 'snippet, id',
q: q,
pageToken: token,
type: 'video',
key: gapikey,
maxResults: 50,
videoEmbeddable: "true"
}, function (data) {
var nextPageToken = data.nextPageToken;
var prevPageToken = data.prevPageToken;
// Log data
console.log(data);
$.each(data.items, function (i, item) {
// Get Output
var output = getOutput(item);
// display results
$('#results').append(output);
});
var buttons = getButtons(prevPageToken, nextPageToken);
// Display buttons
$('#buttons').append(buttons);
});
}
// Build output
function getOutput(item) {
console.log(item);
var videoID;
if(typeof item.snippet.thumbnails === 'undefined'){
return true;
}
if(item.id.videoId){
videoID = item.id.videoId;
}else{
videoID = item.snippet.resourceId.videoId;
}
var title = item.snippet.title;
var description = item.snippet.description;
var thumb = item.snippet.thumbnails.high.url;
var channelTitle = item.snippet.channelTitle;
var videoDate = item.snippet.publishedAt;
// Build output string
var output = '<li>' +
'<div class="list-left">' +
'<img src="' + thumb + '">' +
'</div>' +
'<div class="list-right">' +
'<h3><input type="checkbox" value="' + videoID + '" name="videoCheckbox"><a target="_blank" href="https://youtube.com/embed/' + videoID + '?rel=0">' + title + '</a></h3>' +
'<small>By <span class="cTitle">' + channelTitle + '</span> on ' + videoDate + '</small>' +
'<p>' + description + '</p>' +
'</div>' +
'</li>' +
'<div class="clearfix"></div>' +
'';
return output;
}
function getButtons(prevPageToken, nextPageToken) {
if (!prevPageToken) {
var btnoutput = '<div class="button-container">' +
'<button id="next-button" class="paging-button" data-token="' + nextPageToken + '" data-query="' + q + '"' +
'onclick = "nextPage();">Next Page</button>' +
'</div>';
} else {
var btnoutput = '<div class="button-container">' +
'<button id="prev-button" class="paging-button" data-token="' + prevPageToken + '" data-query="' + q + '"' +
'onclick = "prevPage();">Prev Page</button>' +
'<button id="next-button" class="paging-button" data-token="' + nextPageToken + '" data-query="' + q + '"' +
'onclick = "nextPage();">Next Page</button>' +
'</div>';
}
return btnoutput;
}
</script>
</body>
</html>

View file

@ -1,42 +1,42 @@
<?php
require_once dirname(__FILE__) . '/../../../videos/configuration.php';
$videos_id = intval($_REQUEST['videos_id']);
if (empty($videos_id)) {
forbiddenPage('Videos ID is required');
}
if (!Video::canEdit($videos_id)) {
forbiddenPage('You cannot edit this video');
}
$video = Video::getVideoLight($videos_id);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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
$isMoving = CDNStorage::isMoving($videos_id);
if (!empty($isMoving)) {
include './panelIsMoving.php';
} else {
include './panelMove.php';
}
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once dirname(__FILE__) . '/../../../videos/configuration.php';
$videos_id = intval($_REQUEST['videos_id']);
if (empty($videos_id)) {
forbiddenPage('Videos ID is required');
}
if (!Video::canEdit($videos_id)) {
forbiddenPage('You cannot edit this video');
}
$video = Video::getVideoLight($videos_id);
?>
<!DOCTYPE html>
<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
$isMoving = CDNStorage::isMoving($videos_id);
if (!empty($isMoving)) {
include './panelIsMoving.php';
} else {
include './panelMove.php';
}
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -28,7 +28,7 @@ if (count($downloadOptions) == 1) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Download Video</title>
<?php

View file

@ -1,166 +1,166 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$plugin = AVideoPlugin::loadPluginIfEnabled('CloneSite');
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<?php
echo getHTMLTitle(__("Clone Site"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
</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-heading">
<i class="fas fa-clone"></i> <?php echo __("Manage Clones"); ?>
</div>
<div class="panel-body">
<table id="campaignTable" class="display" width="100%" cellspacing="0">
<thead>
<tr>
<th><?php echo __("URL"); ?></th>
<th><?php echo __("Key"); ?></th>
<th><?php echo __("Last Clone"); ?></th>
<th><?php echo __("Status"); ?></th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th><?php echo __("URL"); ?></th>
<th><?php echo __("Key"); ?></th>
<th><?php echo __("Last Clone"); ?></th>
<th><?php echo __("Status"); ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div id="btnModelLinks" style="display: none;">
<div class="btn-group pull-right">
<button href="" class="editor_status btn {status-class} btn-xs">
<i class="{status-icon}"></i> {status-text}
</button>
<button href="" class="editor_delete_link btn btn-danger btn-xs">
<i class="fa fa-trash"></i>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var tableLinks = $('#campaignTable').DataTable({
"ajax": "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/clones.json.php",
"columns": [
{"data": "url"},
{"data": "key"},
{"data": "last_clone_request"},
{
data: 'status',
"render": function (data, type, full, meta) {
var content = "<span class='label label-success'>Active</span>";
if(full.status === 'i'){
content = "<span class='label label-danger'>Inactive</span>";
}
return content;
}
},
{
data: 'status',
"render": function (data, type, full, meta) {
var content = $('#btnModelLinks').html();
if(full.status === 'i'){
content = content.replace("{status-class}", "btn-success");
content = content.replace("{status-icon}", "fas fa-check-square");
content = content.replace("{status-text}", "Activate");
}else{
content = content.replace("{status-class}", "btn-default");
content = content.replace("{status-icon}", "fas fa-ban");
content = content.replace("{status-text}", "Deactivate");
}
return content;
}
}
],
select: true,
});
$('#campaignTable').on('click', 'button.editor_status', function (e) {
e.preventDefault();
var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data();
modal.showPleaseWait();
$.ajax({
type: "POST",
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/changeStatus.json.php",
data: data
}).done(function (resposta) {
if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
}
tableLinks.ajax.reload();
modal.hidePleaseWait();
});
});
$('#campaignTable').on('click', 'button.editor_delete_link', function (e) {
e.preventDefault();
var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data();
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then(function(willDelete) {
if (willDelete) {
modal.showPleaseWait();
$.ajax({
type: "POST",
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/delete.json.php",
data: data
}).done(function (resposta) {
if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
}
tableLinks.ajax.reload();
modal.hidePleaseWait();
});
}
});
});
});
</script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$plugin = AVideoPlugin::loadPluginIfEnabled('CloneSite');
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(__("Clone Site"));
?>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link rel="stylesheet" type="text/css" href="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.css"/>
</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-heading">
<i class="fas fa-clone"></i> <?php echo __("Manage Clones"); ?>
</div>
<div class="panel-body">
<table id="campaignTable" class="display" width="100%" cellspacing="0">
<thead>
<tr>
<th><?php echo __("URL"); ?></th>
<th><?php echo __("Key"); ?></th>
<th><?php echo __("Last Clone"); ?></th>
<th><?php echo __("Status"); ?></th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th><?php echo __("URL"); ?></th>
<th><?php echo __("Key"); ?></th>
<th><?php echo __("Last Clone"); ?></th>
<th><?php echo __("Status"); ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div id="btnModelLinks" style="display: none;">
<div class="btn-group pull-right">
<button href="" class="editor_status btn {status-class} btn-xs">
<i class="{status-icon}"></i> {status-text}
</button>
<button href="" class="editor_delete_link btn btn-danger btn-xs">
<i class="fa fa-trash"></i>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var tableLinks = $('#campaignTable').DataTable({
"ajax": "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/clones.json.php",
"columns": [
{"data": "url"},
{"data": "key"},
{"data": "last_clone_request"},
{
data: 'status',
"render": function (data, type, full, meta) {
var content = "<span class='label label-success'>Active</span>";
if(full.status === 'i'){
content = "<span class='label label-danger'>Inactive</span>";
}
return content;
}
},
{
data: 'status',
"render": function (data, type, full, meta) {
var content = $('#btnModelLinks').html();
if(full.status === 'i'){
content = content.replace("{status-class}", "btn-success");
content = content.replace("{status-icon}", "fas fa-check-square");
content = content.replace("{status-text}", "Activate");
}else{
content = content.replace("{status-class}", "btn-default");
content = content.replace("{status-icon}", "fas fa-ban");
content = content.replace("{status-text}", "Deactivate");
}
return content;
}
}
],
select: true,
});
$('#campaignTable').on('click', 'button.editor_status', function (e) {
e.preventDefault();
var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data();
modal.showPleaseWait();
$.ajax({
type: "POST",
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/changeStatus.json.php",
data: data
}).done(function (resposta) {
if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
}
tableLinks.ajax.reload();
modal.hidePleaseWait();
});
});
$('#campaignTable').on('click', 'button.editor_delete_link', function (e) {
e.preventDefault();
var tr = $(this).closest('tr')[0];
var data = tableLinks.row(tr).data();
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then(function(willDelete) {
if (willDelete) {
modal.showPleaseWait();
$.ajax({
type: "POST",
url: "<?php echo $global['webSiteRootURL']; ?>plugin/CloneSite/delete.json.php",
data: data
}).done(function (resposta) {
if (resposta.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", resposta.msg, "error");
}
tableLinks.ajax.reload();
modal.hidePleaseWait();
});
}
});
});
});
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@ $metaDescription = $title = getSEOTitle($video['title']);
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Rating") . $config->getPageTitleSeparator() . $title; ?></title>
<?php

View file

@ -1,28 +1,28 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,28 +1,28 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: CustomizeUser</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,57 +1,57 @@
<?php
require_once '../../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
AVideoPlugin::loadPlugin("CustomizeUser");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><i class="fas fa-user"></i> <?php echo __('CustomizeUser') ?></div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Categories_has_users_groups"><i class="fas fa-list"></i> <?php echo __("Categories"); ?> <i class="fas fa-times"></i> <i class="fas fa-users"></i> <?php echo __("Categories Has Users Groups"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Users_extra_info"><i class="fas fa-address-book"></i> <?php echo __("Users Extra Info"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Users_affiliations"><i class="fas fa-child"></i> <?php echo __("Users Affiliations"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Categories_has_users_groups" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Categories_has_users_groups/index_body.php';
?>
</div>
<div id="Users_extra_info" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Users_extra_info/index_body.php';
?>
</div>
<div id="Users_affiliations" class="tab-pane fade" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Users_affiliations/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage("Must be admin");
}
AVideoPlugin::loadPlugin("CustomizeUser");
?>
<!DOCTYPE html>
<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-heading"><i class="fas fa-user"></i> <?php echo __('CustomizeUser') ?></div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Categories_has_users_groups"><i class="fas fa-list"></i> <?php echo __("Categories"); ?> <i class="fas fa-times"></i> <i class="fas fa-users"></i> <?php echo __("Categories Has Users Groups"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Users_extra_info"><i class="fas fa-address-book"></i> <?php echo __("Users Extra Info"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Users_affiliations"><i class="fas fa-child"></i> <?php echo __("Users Affiliations"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Categories_has_users_groups" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Categories_has_users_groups/index_body.php';
?>
</div>
<div id="Users_extra_info" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Users_extra_info/index_body.php';
?>
</div>
<div id="Users_affiliations" class="tab-pane fade" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/CustomizeUser/View/Users_affiliations/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>

View file

@ -11,7 +11,7 @@ $imgh = 720;
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Password") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -1,67 +1,67 @@
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage('Must be admin');
}
$users_id = intval(@$_REQUEST['users_id']);
if (empty($users_id)) {
forbiddenPage('Empty users_id');
}
$pass = User::getProfilePassword($users_id);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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">
<?php
echo Video::getCreatorHTML($users_id);
?>
</div>
<div class="panel-body">
Protect the user's channel with a password
<?php
echo getInputPassword('ProfilePassword', 'maxlength="100" value="'.$pass.'" class="form-control"', __('Channel Password'));
?>
</div>
<div class="panel-footer">
<button class="btn btn-success btn-lg btn-block" onclick="setSubscribers();">
<i class="fas fa-save"></i> <?php echo __('Save'); ?>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
function setSubscribers() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/CustomizeUser/setPassword.json.php',
method: 'POST',
data: {
users_id: <?php echo $users_id; ?>,
ProfilePassword: $('#ProfilePassword').val()
},
success: function (response) {
modal.hidePleaseWait();
avideoResponse(response);
}
});
}
$(document).ready(function () {
$('#ProfilePassword').keyup(function () {
$(this).val($(this).val().replace(/[^0-9a-z]/i, ''));
});
});
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage('Must be admin');
}
$users_id = intval(@$_REQUEST['users_id']);
if (empty($users_id)) {
forbiddenPage('Empty users_id');
}
$pass = User::getProfilePassword($users_id);
?>
<!DOCTYPE html>
<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">
<?php
echo Video::getCreatorHTML($users_id);
?>
</div>
<div class="panel-body">
Protect the user's channel with a password
<?php
echo getInputPassword('ProfilePassword', 'maxlength="100" value="'.$pass.'" class="form-control"', __('Channel Password'));
?>
</div>
<div class="panel-footer">
<button class="btn btn-success btn-lg btn-block" onclick="setSubscribers();">
<i class="fas fa-save"></i> <?php echo __('Save'); ?>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
function setSubscribers() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/CustomizeUser/setPassword.json.php',
method: 'POST',
data: {
users_id: <?php echo $users_id; ?>,
ProfilePassword: $('#ProfilePassword').val()
},
success: function (response) {
modal.hidePleaseWait();
avideoResponse(response);
}
});
}
$(document).ready(function () {
$('#ProfilePassword').keyup(function () {
$(this).val($(this).val().replace(/[^0-9a-z]/i, ''));
});
});
</script>
</body>
</html>

View file

@ -1,59 +1,59 @@
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage('Must be admin');
}
$users_id = intval(@$_REQUEST['users_id']);
if (empty($users_id)) {
forbiddenPage('Empty users_id');
}
$count = User::getExtraSubscribers($users_id);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading">
<?php
echo Video::getCreatorHTML($users_id);
?>
</div>
<div class="panel-body">
Add extra <input type="number" step="1" id="ExtraSubscribers" value="<?php echo $count; ?>"/> subscribers on his subscription counter.
</div>
<div class="panel-footer">
<button class="btn btn-success btn-lg btn-block" onclick="setSubscribers();">
<i class="fas fa-save"></i> <?php echo __('Save'); ?>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
function setSubscribers() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/CustomizeUser/setSubscribers.json.php',
method: 'POST',
data: {
users_id: <?php echo $users_id; ?>,
ExtraSubscribers: $('#ExtraSubscribers').val()
},
success: function (response) {
modal.hidePleaseWait();
avideoResponse(response);
}
});
}
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage('Must be admin');
}
$users_id = intval(@$_REQUEST['users_id']);
if (empty($users_id)) {
forbiddenPage('Empty users_id');
}
$count = User::getExtraSubscribers($users_id);
?>
<!DOCTYPE html>
<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-heading">
<?php
echo Video::getCreatorHTML($users_id);
?>
</div>
<div class="panel-body">
Add extra <input type="number" step="1" id="ExtraSubscribers" value="<?php echo $count; ?>"/> subscribers on his subscription counter.
</div>
<div class="panel-footer">
<button class="btn btn-success btn-lg btn-block" onclick="setSubscribers();">
<i class="fas fa-save"></i> <?php echo __('Save'); ?>
</button>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
function setSubscribers() {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/CustomizeUser/setSubscribers.json.php',
method: 'POST',
data: {
users_id: <?php echo $users_id; ?>,
ExtraSubscribers: $('#ExtraSubscribers').val()
},
success: function (response) {
modal.hidePleaseWait();
avideoResponse(response);
}
});
}
</script>
</body>
</html>

View file

@ -5,7 +5,7 @@ include $global['systemRootPath'] . 'plugin/Gallery/view/topLogic.php';
$leaderBoardTop = getAdsLeaderBoardTop();
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php
echo __("Live") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle();

View file

@ -5,7 +5,7 @@ $leaderBoardTop = getAdsLeaderBoardTop();
_ob_start();
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php
echo $siteTitle;

View file

@ -1,36 +1,36 @@
<?php
require_once '../../../videos/configuration.php';
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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">
<?php
foreach (glob("{$global['systemRootPath']}plugin/Layout/animatedBackGrounds/*.php") as $file) {
$name = basename($file);
if($name === 'index.php'){
continue;
}
$url = str_replace($global['systemRootPath'], getCDN(), $file);
echo "<div class='col-sm-3'>{$name}<iframe src='{$url}' style='width:100%; height: 400px;'></iframe></div>";
}
?>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
?>
<!DOCTYPE html>
<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">
<?php
foreach (glob("{$global['systemRootPath']}plugin/Layout/animatedBackGrounds/*.php") as $file) {
$name = basename($file);
if($name === 'index.php'){
continue;
}
$url = str_replace($global['systemRootPath'], getCDN(), $file);
echo "<div class='col-sm-3'>{$name}<iframe src='{$url}' style='width:100%; height: 400px;'></iframe></div>";
}
?>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -30,7 +30,7 @@ $imgh = 360;
$global['ignoreChat2'] = 1;
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Password"); ?></title>
<?php

View file

@ -109,7 +109,7 @@ if (!empty($chat2) && !empty($chat2->useStaticLayout)) {
$global['doNotLoadPlayer'] = 1;
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("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"/>

View file

@ -16,7 +16,7 @@ $liveImg = Live_schedule::getPosterURL($_REQUEST['live_schedule_id']);
$liveInfo = Live::getInfo($ls->getKey(), $ls->getLive_servers_id());
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title>Remind me</title>
<?php

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<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';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -10,7 +10,7 @@ if (!User::isAdmin()) {
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Live</title>
<?php

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Live</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Live</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/view/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,27 +1,27 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once dirname(__FILE__) . '/../../../../videos/configuration.php';
}
if (!User::canStream()) {
forbiddenPage();
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once dirname(__FILE__) . '/../../../../videos/configuration.php';
}
if (!User::canStream()) {
forbiddenPage();
exit;
}
?>
<!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

@ -35,7 +35,7 @@ $defaultTIme = 30;
$defaultCloseTIme = 10;
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Upload Poster</title>
<?php

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<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';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Live/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -3,7 +3,7 @@ require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Live");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -103,7 +103,7 @@ if (isHTMLEmpty($sideAd)) {
$liveInfo = Live::getInfo($livet['key'], Live::getLiveServersIdRequest());
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<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"/>

View file

@ -48,7 +48,7 @@ if (!empty($_REQUEST['live_schedule'])) {
$poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id'], @$_REQUEST['live_schedule']);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

View file

@ -39,112 +39,112 @@ AVideoPlugin::getModeYouTubeLive($user_id);
$_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest();
$poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id'], @$_REQUEST['live_schedule']);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?php echo getCDN(); ?>view/img/favicon.ico">
<title><?php echo $config->getWebSiteTitle(); ?> </title>
<link href="<?php echo getCDN(); ?>bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('node_modules/jquery/dist/jquery.min.js'); ?>" type="text/javascript"></script>
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?php echo getCDN(); ?>view/img/favicon.ico">
<title><?php echo $config->getWebSiteTitle(); ?> </title>
<link href="<?php echo getCDN(); ?>bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('node_modules/jquery/dist/jquery.min.js'); ?>" type="text/javascript"></script>
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
<?php
echo AVideoPlugin::afterVideoJS();
?>
<?php
echo AVideoPlugin::getHeadCode();
?>
<style>
#chatOnline {
width: 25vw !important;
position: relative !important;
margin: 0;
padding: 0;
}
.container-fluid {
padding-right: 0 !important;
padding-left: 0 !important;
}
.liveChat .messages{
-webkit-transition: all 1s ease; /* Safari */
transition: all 1s ease;
}
#embedVideo-content .embed-responsive{
max-height: 98vh;
}
body {
padding: 0 !important;
margin: 0 !important;
<style>
#chatOnline {
width: 25vw !important;
position: relative !important;
margin: 0;
padding: 0;
}
.container-fluid {
padding-right: 0 !important;
padding-left: 0 !important;
}
.liveChat .messages{
-webkit-transition: all 1s ease; /* Safari */
transition: all 1s ease;
}
#embedVideo-content .embed-responsive{
max-height: 98vh;
}
body {
padding: 0 !important;
margin: 0 !important;
<?php
if (!empty($customizedAdvanced->embedBackgroundColor)) {
echo "background-color: $customizedAdvanced->embedBackgroundColor;";
}
?>
}
</style>
<script>
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
var player;
</script>
</head>
<body style="background-color: black; overflow-x: hidden;">
<div class="container">
<div class="col-md-9 col-sm-9 col-xs-9" style="margin: 0; padding: 0;" id="embedVideo-content">
}
</style>
<script>
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
var player;
</script>
</head>
<body style="background-color: black; overflow-x: hidden;">
<div class="container">
<div class="col-md-9 col-sm-9 col-xs-9" style="margin: 0; padding: 0;" id="embedVideo-content">
<?php
echo getAdsLeaderBoardTop();
?>
<div class="embed-responsive embed-responsive-16by9" >
<video poster="<?php echo $global['webSiteRootURL']; ?><?php echo $poster; ?>?<?php echo filectime($global['systemRootPath'] . $poster); ?>" controls autoplay="autoplay" playsinline webkit-playsinline="webkit-playsinline"
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered"
id="mainVideo" data-setup='{ "aspectRatio": "16:9", "techorder" : ["flash", "html5"] }'>
<source src="<?php echo Live::getM3U8File($uuid); ?>" type='application/x-mpegURL'>
</video>
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="LiveEmbed2">
<div class="embed-responsive embed-responsive-16by9" >
<video poster="<?php echo $global['webSiteRootURL']; ?><?php echo $poster; ?>?<?php echo filectime($global['systemRootPath'] . $poster); ?>" controls autoplay="autoplay" playsinline webkit-playsinline="webkit-playsinline"
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered"
id="mainVideo" data-setup='{ "aspectRatio": "16:9", "techorder" : ["flash", "html5"] }'>
<source src="<?php echo Live::getM3U8File($uuid); ?>" type='application/x-mpegURL'>
</video>
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="LiveEmbed2">
<?php
$streamName = $uuid;
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
echo getLiveUsersLabel();
?>
</div>
</div>
</div>
</div>
<?php
echo getAdsLeaderBoardFooter();
?>
</div>
<div class="col-md-3 col-sm-3 col-xs-3" style="margin: 0; padding: 0;">
</div>
<div class="col-md-3 col-sm-3 col-xs-3" style="margin: 0; padding: 0;">
<?php
$p->getChat($uuid);
?>
</div>
</div>
<script>
$(function () {
$('.liveChat .messages').css({"height": ($(window).height() - 128) + "px"});
window.addEventListener('resize', function () {
$('.liveChat .messages').css({"height": ($(window).height() - 128) + "px"});
})
});
</script>
</div>
</div>
<script>
$(function () {
$('.liveChat .messages').css({"height": ($(window).height() - 128) + "px"});
window.addEventListener('resize', function () {
$('.liveChat .messages').css({"height": ($(window).height() - 128) + "px"});
})
});
</script>
<?php
include $global['systemRootPath'] . 'view/include/video.min.js.php';
?>
<script src="<?php echo getCDN(); ?>view/js/script.js" type="text/javascript"></script>
<script>
<script src="<?php echo getCDN(); ?>view/js/script.js" type="text/javascript"></script>
<script>
<?php
echo PlayerSkins::getStartPlayerJS();
?>
</script>
</script>
<?php
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
echo AVideoPlugin::getFooterCode();
showCloseButton();
?>
</body>
</html>
?>
</body>
</html>

View file

@ -37,7 +37,7 @@ $streamName = $liveStreamObject->getKeyWithIndex($forceIndex, true);
$controls = Live::getAllControlls($streamName);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

View file

@ -1,31 +1,31 @@
<?php
require_once '../../videos/configuration.php';
$plugin = AVideoPlugin::loadPluginIfEnabled('LiveLinks');
if (empty($plugin) || !$plugin->canAddLinks()) {
forbiddenPage(__("You can not do this"));
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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
include_once './view/panel.php';
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
$plugin = AVideoPlugin::loadPluginIfEnabled('LiveLinks');
if (empty($plugin) || !$plugin->canAddLinks()) {
forbiddenPage(__("You can not do this"));
}
?>
<!DOCTYPE html>
<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
include_once './view/panel.php';
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -90,7 +90,7 @@ if (isHTMLEmpty($sideAd)) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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"/>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Login Control") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/LoginControl/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/LoginControl/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Login Control") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/LoginControl/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/LoginControl/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("LoginControl");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><?php echo __('LoginControl') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("LoginControl"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#logincontrol_history"><?php echo __("Users Login History"); ?></a></li>
</ul>
<div class="tab-content">
<div id="logincontrol_history" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/LoginControl/View/Users_login_history/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("LoginControl");
?>
<!DOCTYPE html>
<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-heading"><?php echo __('LoginControl') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("LoginControl"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#logincontrol_history"><?php echo __("Users Login History"); ?></a></li>
</ul>
<div class="tab-content">
<div id="logincontrol_history" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/LoginControl/View/Users_login_history/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Meet") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Meet/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,58 +1,58 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Meet");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><?php echo __('Meet') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Meet"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Meet_schedule"><?php echo __("Meet Schedule"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Meet_schedule_has_users_groups"><?php echo __("Meet Schedule Has Users Groups"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Meet_join_log"><?php echo __("Meet Join Log"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Meet_schedule" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_schedule/index_body.php';
?>
</div>
<div id="Meet_schedule_has_users_groups" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_schedule_has_users_groups/index_body.php';
?>
</div>
<div id="Meet_join_log" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_join_log/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Meet");
?>
<!DOCTYPE html>
<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-heading"><?php echo __('Meet') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Meet"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Meet_schedule"><?php echo __("Meet Schedule"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Meet_schedule_has_users_groups"><?php echo __("Meet Schedule Has Users Groups"); ?></a></li>
<li class=""><a data-toggle="tab" href="#Meet_join_log"><?php echo __("Meet Join Log"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Meet_schedule" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_schedule/index_body.php';
?>
</div>
<div id="Meet_schedule_has_users_groups" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_schedule_has_users_groups/index_body.php';
?>
</div>
<div id="Meet_join_log" class="tab-pane fade " style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Meet/View/Meet_join_log/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>

View file

@ -27,346 +27,346 @@ $emptyObject = $m->getEmptyDataObject();
$timeouts = 2000;
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Check Meet Servers") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<!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']; ?>">
</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-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" >
<div class="container-fluid">
<div class="panel panel-default">
<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" >
<i class="fas fa-comments"></i> <?php echo __("Create a Meet"); ?>
</a>
</div>
<div class="panel-body tabbable-line">
<div class="row">
</a>
</div>
<div class="panel-body tabbable-line">
<div class="row">
<?php
foreach ($emptyObject->server->type as $key => $value) {
if ($key == "custom") {
?>
<div class="col-xs-6">
<div class="panel panel-default" id="panel<?php echo $newKey; ?>">
<div class="panel-heading ">
<div class="col-xs-6">
<div class="panel panel-default" id="panel<?php echo $newKey; ?>">
<div class="panel-heading ">
<?php
echo "<b>{$value} ({$obj->CUSTOM_JITSI_DOMAIN})</b> ";
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" >
<i class="fas fa-random" ></i>
</a>
<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>
</a>
<?php
} else {
?>
<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>
</a>
<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>
</a>
<?php
} ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
} else {
$newKey = str_replace(".", "_", $key); ?>
<div class="col-xs-6">
<div class="panel panel-default" id="panel<?php echo $newKey; ?>">
<div class="panel-heading ">
<div class="col-xs-6">
<div class="panel panel-default" id="panel<?php echo $newKey; ?>">
<div class="panel-heading ">
<?php
echo "<b>{$value}</b> ";
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" >
<i class="fas fa-random" ></i>
</a>
<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>
</a>
<?php
} else {
?>
<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>
</a>
<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>
</a>
<?php
} ?>
<span class="label label-primary grade pull-right" id="grade<?php echo $newKey; ?>">
<i class="fas fa-cog"></i>
</span>
</div>
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item">
<i class="fas fa-download"></i> Download Speed
<small class="text-muted" id='gradespeed<?php echo $newKey; ?>'></small>
<span class="badge" id='speed<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-upload"></i> Upload Speed
<small class="text-muted" id='gradeUspeed<?php echo $newKey; ?>'></small>
<span class="badge" id='Uspeed<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-stopwatch"></i> Response Time
<small class="text-muted" id='graderesponse<?php echo $newKey; ?>'></small>
<span class="badge" id='response<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-network-wired"></i> Sites Active
<small class="text-muted" id='gradetotalSitesActive<?php echo $newKey; ?>'></small>
<span class="badge" id='totalSitesActive<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-video"></i> Streamers Services
<small class="text-muted" id='gradeStreamersServices<?php echo $newKey; ?>'></small>
<span class="badge" id='StreamersServices<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
</ul>
</div>
</div>
</div>
<span class="label label-primary grade pull-right" id="grade<?php echo $newKey; ?>">
<i class="fas fa-cog"></i>
</span>
</div>
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item">
<i class="fas fa-download"></i> Download Speed
<small class="text-muted" id='gradespeed<?php echo $newKey; ?>'></small>
<span class="badge" id='speed<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-upload"></i> Upload Speed
<small class="text-muted" id='gradeUspeed<?php echo $newKey; ?>'></small>
<span class="badge" id='Uspeed<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-stopwatch"></i> Response Time
<small class="text-muted" id='graderesponse<?php echo $newKey; ?>'></small>
<span class="badge" id='response<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-network-wired"></i> Sites Active
<small class="text-muted" id='gradetotalSitesActive<?php echo $newKey; ?>'></small>
<span class="badge" id='totalSitesActive<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
<li class="list-group-item">
<i class="fas fa-video"></i> Streamers Services
<small class="text-muted" id='gradeStreamersServices<?php echo $newKey; ?>'></small>
<span class="badge" id='StreamersServices<?php echo $newKey; ?>'>
<i class="fas fa-cog"></i>
</span>
</li>
</ul>
</div>
</div>
</div>
<?php
}
}
?>
</div>
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info">
Before Change the server make sure you do not have any meeting running.
Other users may not able to connect after you change it.
</div>
</div>
<div class="col-sm-12">
<div class="alert alert-info">
Higher grade, means the server is better for a meeting.
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info">
Before Change the server make sure you do not have any meeting running.
Other users may not able to connect after you change it.
</div>
</div>
<div class="col-sm-12">
<div class="alert alert-info">
Higher grade, means the server is better for a meeting.
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var roundedDecimals = 2;
var bytesInAKilobyte = 1024;
var tries = 1;
var timeouts = <?php echo $timeouts; ?>;
function speed(bitsPerSecond) {
var Kbps = (bitsPerSecond / bytesInAKilobyte).toFixed(roundedDecimals);
if (Kbps <= 1)
return {value: bitsPerSecond, units: "Bps"};
var MBps = (Kbps / bytesInAKilobyte).toFixed(roundedDecimals);
//if (MBps <= 1)
return {value: Kbps, units: "Kbps", text: Kbps + " Kbps", bitsPerSecond: bitsPerSecond};
//else
//return {value: MBps, units: "MBps", text: MBps + " MBps", bitsPerSecond: bitsPerSecond};
}
function checkSpeed(server) {
var imageAddr = "https://" + server + "/jesus.png?n=" + Math.random();
var startTime, endTime;
var downloadSize = 3881702;//3.70 MB
var download = new Image();
var serverId = server.replace(/[.]/g, "_");
var speedId = '#speed' + serverId;
var gradespeedId = '#gradespeed' + serverId;
download.onload = function () {
endTime = (new Date()).getTime();
var duration = (endTime - startTime) / 1000;
var bitsLoaded = downloadSize * 8;
var speedBps = (bitsLoaded / duration).toFixed(roundedDecimals);
var response = speed(speedBps);
console.log(speedBps);
$(gradespeedId).html("+" + (speedBps / 1000000).toFixed(2));
sitesGrade[server] += (speedBps / 1000000);
animateValue('speed' + serverId, 0, response.value, timeouts * 2, "", response.units);
}
download.onerror = function () {
$(speedId).html(response.text);
}
startTime = (new Date()).getTime();
download.src = imageAddr;
}
function checkServerUsage(server) {
var ajaxTime = new Date().getTime();
$.ajax({
url: "https://" + server + "/api/info.json.php",
}).done(function (response) {
var totalTime = new Date().getTime() - ajaxTime;
var serverId = server.replace(/[.]/g, "_");
animateValue('response' + serverId, 0, totalTime, timeouts * 2, "", "ms");
animateValue('totalSitesActive' + serverId, 0, response.totalSitesActive, timeouts * 2, "", "/" + (response.totalSitesActive + response.totalSitesInactive));
animateValue('StreamersServices' + serverId, 0, response.totalOnlineLiveStreamersServices, timeouts * 2, "", "/" + (response.totalLiveStreamersServices));
// calculate grade
sitesGrade[server] -= (response.totalOnlineLiveStreamersServices * 10);
sitesGrade[server] -= (response.totalLiveStreamersServices);
sitesGrade[server] -= (response.totalSitesActive);
sitesGrade[server] -= (totalTime / 50);
$('#graderesponse' + serverId).html("-" + (totalTime / 50).toFixed(2));
$('#gradetotalSitesActive' + serverId).html("-" + (response.totalSitesActive).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
}).fail(function (jqXHR, textStatus) {
tries++;
setTimeout(function () {
checkServerUsage(server);
}, tries * timeouts);
});
}
function check(server) {
checkSpeed(server);
checkServerUsage(server);
}
function checkGrades() {
bestGrade = -1;
bestGradeServer = '';
for (const server in sitesGrade) {
if (bestGrade < sitesGrade[server]) {
bestGrade = sitesGrade[server];
bestGradeServer = server;
}
var serverId = server.replace(/[.]/g, "_");
$('#grade' + serverId).html("Grade: " + (sitesGrade[server].toFixed(2)));
}
var serverId = bestGradeServer.replace(/[.]/g, "_");
$('.grade').not('#grade' + serverId).removeClass('label-success');
$('.grade').not('#grade' + serverId).addClass('label-primary');
$('#grade' + serverId).addClass('label-success');
$('#grade' + serverId).removeClass('label-primary');
}
function checkUploadSpeed(server, iterations, update) {
var average = 0,
index = 0,
timer = window.setInterval(check, 5000);
check();
function check() {
var xhr = new XMLHttpRequest(),
url = 'https://' + server + '?cache=' + Math.floor(Math.random() * 10000), //prevent url cache
data = getRandomString(1), //1 meg POST size handled by all servers
startTime,
speed = 0;
xhr.onreadystatechange = function (event) {
if (xhr.readyState == 4) {
speed = Math.round(1024 / ((new Date() - startTime) / 1000));
average == 0
? average = speed
: average = Math.round((average + speed) / 2);
update(speed, average);
index++;
if (index == iterations) {
window.clearInterval(timer);
}
;
}
;
};
xhr.open('POST', url, true);
startTime = new Date();
xhr.send(data);
}
;
function getRandomString(sizeInMb) {
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()_+`-=[]\{}|;':,./<>?", //random data prevents gzip effect
iterations = sizeInMb * 1024 * 1024, //get byte count
result = '';
for (var index = 0; index < iterations; index++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
;
return result;
}
;
}
function runAll(server) {
var serverId = server.replace(/[.]/g, '_');
$('#panel' + serverId + " .fa-cog").addClass('fa-spin');
sitesGrade[server] = 100;
check(server);
checkUploadSpeed(server, 1, function (speed, average) {
var serverId = server.replace(/[.]/g, '_');
animateValue('Uspeed' + serverId, 0, average, timeouts * 2, "", "Kbps");
if (previewsGrade[server]) {
sitesGrade[server] -= previewsGrade[server];
}
previewsGrade[server] = (average / 50);
sitesGrade[server] += previewsGrade[server];
$('#gradeUspeed' + serverId).html('+' + previewsGrade[server].toFixed(2));
});
}
function animateValue(id, start, end, duration, prepend, postpend) {
// assumes integer values for start and end
var obj = document.getElementById(id);
var range = end - start;
// no timer shorter than 50ms (not really visible any way)
var minTimer = 50;
// calc step time to show all interediate values
var stepTime = Math.abs(Math.floor(duration / range));
// never go below minTimer
stepTime = Math.max(stepTime, minTimer);
// get current time and calculate desired end time
var startTime = new Date().getTime();
var endTime = startTime + duration;
var timer;
function run() {
var now = new Date().getTime();
var remaining = Math.max((endTime - now) / duration, 0);
var value = Math.round(end - (remaining * range));
obj.innerHTML = prepend + " " + value + " " + postpend;
if (value == end) {
clearInterval(timer);
}
}
timer = setInterval(run, stepTime);
run();
}
var previewsGrade = {};
var sitesGrade = {};
$(document).ready(function () {
<script>
var roundedDecimals = 2;
var bytesInAKilobyte = 1024;
var tries = 1;
var timeouts = <?php echo $timeouts; ?>;
function speed(bitsPerSecond) {
var Kbps = (bitsPerSecond / bytesInAKilobyte).toFixed(roundedDecimals);
if (Kbps <= 1)
return {value: bitsPerSecond, units: "Bps"};
var MBps = (Kbps / bytesInAKilobyte).toFixed(roundedDecimals);
//if (MBps <= 1)
return {value: Kbps, units: "Kbps", text: Kbps + " Kbps", bitsPerSecond: bitsPerSecond};
//else
//return {value: MBps, units: "MBps", text: MBps + " MBps", bitsPerSecond: bitsPerSecond};
}
function checkSpeed(server) {
var imageAddr = "https://" + server + "/jesus.png?n=" + Math.random();
var startTime, endTime;
var downloadSize = 3881702;//3.70 MB
var download = new Image();
var serverId = server.replace(/[.]/g, "_");
var speedId = '#speed' + serverId;
var gradespeedId = '#gradespeed' + serverId;
download.onload = function () {
endTime = (new Date()).getTime();
var duration = (endTime - startTime) / 1000;
var bitsLoaded = downloadSize * 8;
var speedBps = (bitsLoaded / duration).toFixed(roundedDecimals);
var response = speed(speedBps);
console.log(speedBps);
$(gradespeedId).html("+" + (speedBps / 1000000).toFixed(2));
sitesGrade[server] += (speedBps / 1000000);
animateValue('speed' + serverId, 0, response.value, timeouts * 2, "", response.units);
}
download.onerror = function () {
$(speedId).html(response.text);
}
startTime = (new Date()).getTime();
download.src = imageAddr;
}
function checkServerUsage(server) {
var ajaxTime = new Date().getTime();
$.ajax({
url: "https://" + server + "/api/info.json.php",
}).done(function (response) {
var totalTime = new Date().getTime() - ajaxTime;
var serverId = server.replace(/[.]/g, "_");
animateValue('response' + serverId, 0, totalTime, timeouts * 2, "", "ms");
animateValue('totalSitesActive' + serverId, 0, response.totalSitesActive, timeouts * 2, "", "/" + (response.totalSitesActive + response.totalSitesInactive));
animateValue('StreamersServices' + serverId, 0, response.totalOnlineLiveStreamersServices, timeouts * 2, "", "/" + (response.totalLiveStreamersServices));
// calculate grade
sitesGrade[server] -= (response.totalOnlineLiveStreamersServices * 10);
sitesGrade[server] -= (response.totalLiveStreamersServices);
sitesGrade[server] -= (response.totalSitesActive);
sitesGrade[server] -= (totalTime / 50);
$('#graderesponse' + serverId).html("-" + (totalTime / 50).toFixed(2));
$('#gradetotalSitesActive' + serverId).html("-" + (response.totalSitesActive).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
}).fail(function (jqXHR, textStatus) {
tries++;
setTimeout(function () {
checkServerUsage(server);
}, tries * timeouts);
});
}
function check(server) {
checkSpeed(server);
checkServerUsage(server);
}
function checkGrades() {
bestGrade = -1;
bestGradeServer = '';
for (const server in sitesGrade) {
if (bestGrade < sitesGrade[server]) {
bestGrade = sitesGrade[server];
bestGradeServer = server;
}
var serverId = server.replace(/[.]/g, "_");
$('#grade' + serverId).html("Grade: " + (sitesGrade[server].toFixed(2)));
}
var serverId = bestGradeServer.replace(/[.]/g, "_");
$('.grade').not('#grade' + serverId).removeClass('label-success');
$('.grade').not('#grade' + serverId).addClass('label-primary');
$('#grade' + serverId).addClass('label-success');
$('#grade' + serverId).removeClass('label-primary');
}
function checkUploadSpeed(server, iterations, update) {
var average = 0,
index = 0,
timer = window.setInterval(check, 5000);
check();
function check() {
var xhr = new XMLHttpRequest(),
url = 'https://' + server + '?cache=' + Math.floor(Math.random() * 10000), //prevent url cache
data = getRandomString(1), //1 meg POST size handled by all servers
startTime,
speed = 0;
xhr.onreadystatechange = function (event) {
if (xhr.readyState == 4) {
speed = Math.round(1024 / ((new Date() - startTime) / 1000));
average == 0
? average = speed
: average = Math.round((average + speed) / 2);
update(speed, average);
index++;
if (index == iterations) {
window.clearInterval(timer);
}
;
}
;
};
xhr.open('POST', url, true);
startTime = new Date();
xhr.send(data);
}
;
function getRandomString(sizeInMb) {
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()_+`-=[]\{}|;':,./<>?", //random data prevents gzip effect
iterations = sizeInMb * 1024 * 1024, //get byte count
result = '';
for (var index = 0; index < iterations; index++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
;
return result;
}
;
}
function runAll(server) {
var serverId = server.replace(/[.]/g, '_');
$('#panel' + serverId + " .fa-cog").addClass('fa-spin');
sitesGrade[server] = 100;
check(server);
checkUploadSpeed(server, 1, function (speed, average) {
var serverId = server.replace(/[.]/g, '_');
animateValue('Uspeed' + serverId, 0, average, timeouts * 2, "", "Kbps");
if (previewsGrade[server]) {
sitesGrade[server] -= previewsGrade[server];
}
previewsGrade[server] = (average / 50);
sitesGrade[server] += previewsGrade[server];
$('#gradeUspeed' + serverId).html('+' + previewsGrade[server].toFixed(2));
});
}
function animateValue(id, start, end, duration, prepend, postpend) {
// assumes integer values for start and end
var obj = document.getElementById(id);
var range = end - start;
// no timer shorter than 50ms (not really visible any way)
var minTimer = 50;
// calc step time to show all interediate values
var stepTime = Math.abs(Math.floor(duration / range));
// never go below minTimer
stepTime = Math.max(stepTime, minTimer);
// get current time and calculate desired end time
var startTime = new Date().getTime();
var endTime = startTime + duration;
var timer;
function run() {
var now = new Date().getTime();
var remaining = Math.max((endTime - now) / duration, 0);
var value = Math.round(end - (remaining * range));
obj.innerHTML = prepend + " " + value + " " + postpend;
if (value == end) {
clearInterval(timer);
}
}
timer = setInterval(run, stepTime);
run();
}
var previewsGrade = {};
var sitesGrade = {};
$(document).ready(function () {
<?php
$count = 0;
foreach ($emptyObject->server->type as $key => $value) {
@ -377,11 +377,11 @@ foreach ($emptyObject->server->type as $key => $value) {
echo "setTimeout(function(){runAll('{$key}')}," . ($count * $timeouts) . ");";
}
?>
setInterval(function () {
checkGrades();
}, 1000);
});
</script>
</div>
</body>
</html>
setInterval(function () {
checkGrades();
}, 1000);
});
</script>
</div>
</body>
</html>

View file

@ -1,104 +1,104 @@
<?php
require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/Meet/validateMeet.php';
if (Meet::validatePassword($meet_schedule_id, @$_POST['meet_password'])) {
$url = Meet::getMeetLink($meet_schedule_id);
header("Location: {$url}");
exit;
}
$meet = new Meet_schedule($meet_schedule_id);
$img = User::getBackgroundURLFromUserID($meet->getUsers_id());
$photo = User::getPhoto($meet->getUsers_id());
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Confirm Meet Password") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
body {
padding-top: 0;
}
footer{
display: none;
}
#bg{
position: fixed;
width: 100%;
height: 100%;
background-image: url('<?php echo $global['webSiteRootURL'], $img; ?>');
background-size: cover;
opacity: 0.3;
filter: alpha(opacity=30); /* For IE8 and earlier */
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
//include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div id="bg"></div>
<!-- Modal -->
<div id="myModal" class="modal fade in" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title">
<center>
<i class="fas fa-lock"></i> <?php echo __("Meet"); ?> <?php echo $meet->getTopic(); ?> <?php echo __("is Private"); ?>
</center>
</h1>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<img src="<?php echo $photo; ?>" class="img img-responsive"/>
</div>
<div class="col-sm-6">
<center>
<form method="post" action="<?php echo getSelfURI(); ?>">
<?php
if (!empty($_POST['meet_password'])) {
?>
<div class="alert alert-danger"><?php echo __("Your password does not match!"); ?></div>
<?php
}
?>
<div class="form-group">
<label for="meet_password"><?php echo __("This Meet Requires a Password"); ?></label>
<input type="text" class="form-control" id="meet_password" name="meet_password" placeholder="<?php echo __("Password"); ?>" required>
</div>
<div class="row">
<div class="col-md-6">
<button type="submit" class="btn btn-success btn-block"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></button>
</div>
<div class="col-md-6">
<a href="<?php echo $global['webSiteRootURL']; ?>" class="btn btn-danger btn-block"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
</div>
</div>
</form>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
$(window).on('load', function () {
$('#myModal').modal('show');
});
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/Meet/validateMeet.php';
if (Meet::validatePassword($meet_schedule_id, @$_POST['meet_password'])) {
$url = Meet::getMeetLink($meet_schedule_id);
header("Location: {$url}");
exit;
}
$meet = new Meet_schedule($meet_schedule_id);
$img = User::getBackgroundURLFromUserID($meet->getUsers_id());
$photo = User::getPhoto($meet->getUsers_id());
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Confirm Meet Password") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
body {
padding-top: 0;
}
footer{
display: none;
}
#bg{
position: fixed;
width: 100%;
height: 100%;
background-image: url('<?php echo $global['webSiteRootURL'], $img; ?>');
background-size: cover;
opacity: 0.3;
filter: alpha(opacity=30); /* For IE8 and earlier */
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
//include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div id="bg"></div>
<!-- Modal -->
<div id="myModal" class="modal fade in" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title">
<center>
<i class="fas fa-lock"></i> <?php echo __("Meet"); ?> <?php echo $meet->getTopic(); ?> <?php echo __("is Private"); ?>
</center>
</h1>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<img src="<?php echo $photo; ?>" class="img img-responsive"/>
</div>
<div class="col-sm-6">
<center>
<form method="post" action="<?php echo getSelfURI(); ?>">
<?php
if (!empty($_POST['meet_password'])) {
?>
<div class="alert alert-danger"><?php echo __("Your password does not match!"); ?></div>
<?php
}
?>
<div class="form-group">
<label for="meet_password"><?php echo __("This Meet Requires a Password"); ?></label>
<input type="text" class="form-control" id="meet_password" name="meet_password" placeholder="<?php echo __("Password"); ?>" required>
</div>
<div class="row">
<div class="col-md-6">
<button type="submit" class="btn btn-success btn-block"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></button>
</div>
<div class="col-md-6">
<a href="<?php echo $global['webSiteRootURL']; ?>" class="btn btn-danger btn-block"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
</div>
</div>
</form>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript">
$(window).on('load', function () {
$('#myModal').modal('show');
});
</script>
</body>
</html>

View file

@ -1,213 +1,213 @@
<?php
if (!isset($global['systemRootPath'])) {
$configFile = '../../videos/configuration.php';
if (file_exists($configFile)) {
require_once $configFile;
}
}
$obj = AVideoPlugin::getObjectDataIfEnabled("Meet");
//_error_log(json_encode($_SERVER));
if (empty($obj)) {
forbiddenPage("Plugin disabled");
}
if (!User::isLogged()) {
forbiddenPage("You can not do this");
}
$userCredentials = User::loginFromRequestToGet();
if (User::isAdmin() && !empty($_GET['newServer'])) {
$p = AVideoPlugin::loadPluginIfEnabled("Meet");
$p->setDataObjectParameter("server->value", preg_replace("/[^0-1a-z.]/i", "", $_GET['newServer']));
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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{
padding-bottom: 15px;
}
.serverLabels .label{
float: right;
margin: 0 2px;
}
#serverProgressBar, #serverProgressBar .progress-bar {
transition: width 1s linear !important;
height: 2px;
margin-bottom: 0;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid nopadding">
<div class="panel panel-default">
<div class="panel-heading">
<i class="far fa-comments"></i> <?php echo __("Meeting"); ?>
<span id="serverTime" class="label label-default pull-right" data-toggle="tooltip" data-placement="bottom" title="Server Time"></span>
<span class="label label-default pull-right" data-toggle="tooltip" data-placement="bottom" title="Timezone"> <?php echo date_default_timezone_get(); ?> </span>
<div class="pull-right serverLabels">
<span class="label label-warning"><i class="fas fa-cog fa-spin"></i> <?php echo __("Loading Server Info"); ?></span>
</div>
<div class="clearfix"></div>
<div class="progress" id="serverProgressBar" data-toggle="tooltip" data-placement="bottom" title="Check Server Again" >
<div class="progress-bar" role="progressbar" aria-valuenow="100"
aria-valuemin="0" aria-valuemax="100" style="width:100%; ">
</div>
</div>
</div>
<div class="panel-body tabbable-line">
<div class="row">
<div class="col-xs-12 tabbable-line" id="indexTabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#meetLog"><i class="far fa-clock"></i> <span class="hidden-sm hidden-xs"><?php echo __("Meetings"); ?></span></a></li>
<?php
if (User::canCreateMeet()) {
?>
<li><a data-toggle="tab" href="#createMeet"><i class="far fa-calendar-alt"></i> <span class="hidden-sm hidden-xs"><?php echo __("Schedule"); ?></span></a></li>
<li><a data-toggle="tab" href="#" onclick="_startMeetNow();return false;"><i class="far fa-comments"></i> <?php echo __("New Meet"); ?></a></li>
<?php
}
?>
</ul>
<div class="tab-content">
<div id="meetLog" class="tab-pane fade in active" url="<?php
echo $global['webSiteRootURL'] . 'plugin/Meet/meet_log.php?' . $userCredentials;
?>"><div class="loader"></div></div>
<?php
if (User::canCreateMeet()) {
?>
<div id="createMeet" class="tab-pane fade" url="<?php
echo $global['webSiteRootURL'] . 'plugin/Meet/meet_manager.php?' . $userCredentials; ?>"><div class="loader"></div></div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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;
$(document).ready(function () {
<?php $today = getdate(); ?>
var d = new Date(<?php echo $today['year'] . "," . $today['mon'] . "," . $today['mday'] . "," . $today['hours'] . "," . $today['minutes'] . "," . $today['seconds']; ?>);
setInterval(function () {
d.setSeconds(d.getSeconds() + 1);
$('#serverTime').html("<i class=\"far fa-clock\"></i> " + (d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds()));
}, 1000);
$('#indexTabs .nav-tabs a').click(function (e) {
var href = $(this).attr('href');
if (href && href !== "#") {
var now_tab = $(href);
console.log("tab clicked");
if ($(now_tab).attr('url')) {
var url = $(now_tab).attr('url');
$(now_tab).attr('url', '');
if (url) {
$.ajax({
url: url,
success: function (response) {
$(now_tab).html(response);
}
});
}
} else {
console.log("no URL on tab clicked");
}
}
});
try {
$('#indexTabs .nav-tabs a').first().trigger("click");
} catch (e) {
}
serverLabels();
});
var serverLabelsStartTime;
var serverLabelsRunning = false;
function serverLabels() {
if (serverLabelsRunning) {
return false;
}
serverLabelsRunning = true;
serverLabelsStartTime = new Date().getTime();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/serverLabels.php?<?php echo $userCredentials; ?>',
success: function (response) {
setTimeout(function () {
serverLabelsRunning = false;
}, 2000);
serverLabelsRequestTime = new Date().getTime() - serverLabelsStartTime;
$('.serverLabels').html(response);
}
});
}
<?php
if (User::canCreateMeet()) {
?>
function _startMeetNow() {
console.log('_startMeetNow');
swal({
text: "<?php echo __("Meet Topic"); ?>",
content: "input",
button: {
text: "<?php echo __("Start Now"); ?>",
closeModal: false,
},
}).then(function (name) {
if (!name)
throw null;
return fetch('<?php echo $global['webSiteRootURL']; ?>plugin/Meet/saveMeet.json.php?<?php echo $userCredentials; ?>&RoomTopic=' + encodeURI(name));
}).then(function (results) {
return results.json();
}).then(function (response) {
if (response.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
modal.hidePleaseWait();
} else {
//console.log(response.link);
//console.log(response.link+'?<?php echo $userCredentials; ?>');
document.location = response.link + '?<?php echo $userCredentials; ?>';
//avideoAlertError(response.link + '?<?php echo $userCredentials; ?>');
}
}).catch(function (err) {
if (err) {
swal("Oh noes!", "The AJAX request failed!", "error");
} else {
swal.stopLoading();
swal.close();
}
});
return false;
}
<?php
}
?>
</script>
</body>
</html>
<?php
if (!isset($global['systemRootPath'])) {
$configFile = '../../videos/configuration.php';
if (file_exists($configFile)) {
require_once $configFile;
}
}
$obj = AVideoPlugin::getObjectDataIfEnabled("Meet");
//_error_log(json_encode($_SERVER));
if (empty($obj)) {
forbiddenPage("Plugin disabled");
}
if (!User::isLogged()) {
forbiddenPage("You can not do this");
}
$userCredentials = User::loginFromRequestToGet();
if (User::isAdmin() && !empty($_GET['newServer'])) {
$p = AVideoPlugin::loadPluginIfEnabled("Meet");
$p->setDataObjectParameter("server->value", preg_replace("/[^0-1a-z.]/i", "", $_GET['newServer']));
}
?>
<!DOCTYPE html>
<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{
padding-bottom: 15px;
}
.serverLabels .label{
float: right;
margin: 0 2px;
}
#serverProgressBar, #serverProgressBar .progress-bar {
transition: width 1s linear !important;
height: 2px;
margin-bottom: 0;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid nopadding">
<div class="panel panel-default">
<div class="panel-heading">
<i class="far fa-comments"></i> <?php echo __("Meeting"); ?>
<span id="serverTime" class="label label-default pull-right" data-toggle="tooltip" data-placement="bottom" title="Server Time"></span>
<span class="label label-default pull-right" data-toggle="tooltip" data-placement="bottom" title="Timezone"> <?php echo date_default_timezone_get(); ?> </span>
<div class="pull-right serverLabels">
<span class="label label-warning"><i class="fas fa-cog fa-spin"></i> <?php echo __("Loading Server Info"); ?></span>
</div>
<div class="clearfix"></div>
<div class="progress" id="serverProgressBar" data-toggle="tooltip" data-placement="bottom" title="Check Server Again" >
<div class="progress-bar" role="progressbar" aria-valuenow="100"
aria-valuemin="0" aria-valuemax="100" style="width:100%; ">
</div>
</div>
</div>
<div class="panel-body tabbable-line">
<div class="row">
<div class="col-xs-12 tabbable-line" id="indexTabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#meetLog"><i class="far fa-clock"></i> <span class="hidden-sm hidden-xs"><?php echo __("Meetings"); ?></span></a></li>
<?php
if (User::canCreateMeet()) {
?>
<li><a data-toggle="tab" href="#createMeet"><i class="far fa-calendar-alt"></i> <span class="hidden-sm hidden-xs"><?php echo __("Schedule"); ?></span></a></li>
<li><a data-toggle="tab" href="#" onclick="_startMeetNow();return false;"><i class="far fa-comments"></i> <?php echo __("New Meet"); ?></a></li>
<?php
}
?>
</ul>
<div class="tab-content">
<div id="meetLog" class="tab-pane fade in active" url="<?php
echo $global['webSiteRootURL'] . 'plugin/Meet/meet_log.php?' . $userCredentials;
?>"><div class="loader"></div></div>
<?php
if (User::canCreateMeet()) {
?>
<div id="createMeet" class="tab-pane fade" url="<?php
echo $global['webSiteRootURL'] . 'plugin/Meet/meet_manager.php?' . $userCredentials; ?>"><div class="loader"></div></div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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;
$(document).ready(function () {
<?php $today = getdate(); ?>
var d = new Date(<?php echo $today['year'] . "," . $today['mon'] . "," . $today['mday'] . "," . $today['hours'] . "," . $today['minutes'] . "," . $today['seconds']; ?>);
setInterval(function () {
d.setSeconds(d.getSeconds() + 1);
$('#serverTime').html("<i class=\"far fa-clock\"></i> " + (d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds()));
}, 1000);
$('#indexTabs .nav-tabs a').click(function (e) {
var href = $(this).attr('href');
if (href && href !== "#") {
var now_tab = $(href);
console.log("tab clicked");
if ($(now_tab).attr('url')) {
var url = $(now_tab).attr('url');
$(now_tab).attr('url', '');
if (url) {
$.ajax({
url: url,
success: function (response) {
$(now_tab).html(response);
}
});
}
} else {
console.log("no URL on tab clicked");
}
}
});
try {
$('#indexTabs .nav-tabs a').first().trigger("click");
} catch (e) {
}
serverLabels();
});
var serverLabelsStartTime;
var serverLabelsRunning = false;
function serverLabels() {
if (serverLabelsRunning) {
return false;
}
serverLabelsRunning = true;
serverLabelsStartTime = new Date().getTime();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/Meet/serverLabels.php?<?php echo $userCredentials; ?>',
success: function (response) {
setTimeout(function () {
serverLabelsRunning = false;
}, 2000);
serverLabelsRequestTime = new Date().getTime() - serverLabelsStartTime;
$('.serverLabels').html(response);
}
});
}
<?php
if (User::canCreateMeet()) {
?>
function _startMeetNow() {
console.log('_startMeetNow');
swal({
text: "<?php echo __("Meet Topic"); ?>",
content: "input",
button: {
text: "<?php echo __("Start Now"); ?>",
closeModal: false,
},
}).then(function (name) {
if (!name)
throw null;
return fetch('<?php echo $global['webSiteRootURL']; ?>plugin/Meet/saveMeet.json.php?<?php echo $userCredentials; ?>&RoomTopic=' + encodeURI(name));
}).then(function (results) {
return results.json();
}).then(function (response) {
if (response.error) {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
modal.hidePleaseWait();
} else {
//console.log(response.link);
//console.log(response.link+'?<?php echo $userCredentials; ?>');
document.location = response.link + '?<?php echo $userCredentials; ?>';
//avideoAlertError(response.link + '?<?php echo $userCredentials; ?>');
}
}).catch(function (err) {
if (err) {
swal("Oh noes!", "The AJAX request failed!", "error");
} else {
swal.stopLoading();
swal.close();
}
});
return false;
}
<?php
}
?>
</script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: PayPalYPT</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: PayPalYPT</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PayPalYPT");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><?php echo __('PayPalYPT') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("PayPalYPT"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#PayPalYPT_log"><?php echo __("PayPalYPT Log"); ?></a></li>
</ul>
<div class="tab-content">
<div id="PayPalYPT_log" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/PayPalYPT_log/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PayPalYPT");
?>
<!DOCTYPE html>
<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-heading"><?php echo __('PayPalYPT') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("PayPalYPT"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#PayPalYPT_log"><?php echo __("PayPalYPT Log"); ?></a></li>
</ul>
<div class="tab-content">
<div id="PayPalYPT_log" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/PayPalYPT/View/PayPalYPT_log/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -1,115 +1,115 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isLogged()) {
forbiddenPage();
}
$rows = PayPalYPT::getAllLogsFromUser(User::getId());
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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">
<thead>
<tr>
<th>#</th>
<th><?php echo __("Type"); ?></th>
<th><?php echo __("Agreement ID"); ?></th>
<th><?php echo __("Status"); ?></th>
<th><?php echo __("Date"); ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($rows as $value) {
$json = json_decode($value['json']);
$value['status'] = '';
if (!empty($value['agreement_id'])) {
$agreement = PayPalYPT::getBillingAgreement($value['agreement_id']);
if (!empty($agreement)) {
$value['status'] = $agreement->getState();
}
} ?>
<tr id="tr<?php echo $value['agreement_id']; ?>">
<td><?php echo $value['id']; ?></td>
<td>
<?php echo $json->get->json->type; ?>
</td>
<td>
<?php echo $value['agreement_id']; ?>
</td>
<td>
<?php echo $value['created']; ?>
</td>
<td><?php echo $value['expiration']; ?></td>
<td><?php echo $value['expiration']; ?></td>
<td>
<?php
if ($value['status'] == 'Active') {
?>
<button class="btn btn-danger btn-xs" onclick="cancelAgreement('<?php echo $value['agreement_id']; ?>')">
<?php
echo __('Cancel Agreement'); ?>
</button>
<?php
} ?>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>#</th>
<th><?php echo __("Type"); ?></th>
<th><?php echo __("Agreement ID"); ?></th>
<th><?php echo __("Status"); ?></th>
<th><?php echo __("Date"); ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
function cancelAgreement(agreement_id) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/PayPalYPT/agreementCancel.json.php',
data: {agreement: agreement_id},
type: 'post',
success: function (response) {
if (response.error) {
avideoAlertError(response.msg);
} else {
$('.tr' + agreement_id).fadeOut();
avideoToastSuccess(response.msg);
}
modal.hidePleaseWait();
}
});
}
</script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isLogged()) {
forbiddenPage();
}
$rows = PayPalYPT::getAllLogsFromUser(User::getId());
?>
<!DOCTYPE html>
<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">
<thead>
<tr>
<th>#</th>
<th><?php echo __("Type"); ?></th>
<th><?php echo __("Agreement ID"); ?></th>
<th><?php echo __("Status"); ?></th>
<th><?php echo __("Date"); ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($rows as $value) {
$json = json_decode($value['json']);
$value['status'] = '';
if (!empty($value['agreement_id'])) {
$agreement = PayPalYPT::getBillingAgreement($value['agreement_id']);
if (!empty($agreement)) {
$value['status'] = $agreement->getState();
}
} ?>
<tr id="tr<?php echo $value['agreement_id']; ?>">
<td><?php echo $value['id']; ?></td>
<td>
<?php echo $json->get->json->type; ?>
</td>
<td>
<?php echo $value['agreement_id']; ?>
</td>
<td>
<?php echo $value['created']; ?>
</td>
<td><?php echo $value['expiration']; ?></td>
<td><?php echo $value['expiration']; ?></td>
<td>
<?php
if ($value['status'] == 'Active') {
?>
<button class="btn btn-danger btn-xs" onclick="cancelAgreement('<?php echo $value['agreement_id']; ?>')">
<?php
echo __('Cancel Agreement'); ?>
</button>
<?php
} ?>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>#</th>
<th><?php echo __("Type"); ?></th>
<th><?php echo __("Agreement ID"); ?></th>
<th><?php echo __("Status"); ?></th>
<th><?php echo __("Date"); ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
function cancelAgreement(agreement_id) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'plugin/PayPalYPT/agreementCancel.json.php',
data: {agreement: agreement_id},
type: 'post',
success: function (response) {
if (response.error) {
avideoAlertError(response.msg);
} else {
$('.tr' + agreement_id).fadeOut();
avideoToastSuccess(response.msg);
}
modal.hidePleaseWait();
}
});
}
</script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Permissions") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Permissions/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Permissions/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Permissions") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Permissions/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Permissions/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Permissions");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><?php echo __('Permissions') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Permissions"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Users_groups_permissions"><?php echo __("Users Groups Permissions"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Users_groups_permissions" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Permissions/View/Users_groups_permissions/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Permissions");
?>
<!DOCTYPE html>
<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-heading"><?php echo __('Permissions') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Permissions"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Users_groups_permissions"><?php echo __("Users Groups Permissions"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Users_groups_permissions" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Permissions/View/Users_groups_permissions/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("PlayLists") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/PlayLists/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/PlayLists/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("PlayLists") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/PlayLists/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/PlayLists/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo getCDN(); ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PlayLists");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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-heading"><?php echo __('PlayLists') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("PlayLists"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Playlists_schedules"><?php echo __("Playlists Schedules"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Playlists_schedules" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/PlayLists/View/Playlists_schedules/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("PlayLists");
?>
<!DOCTYPE html>
<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-heading"><?php echo __('PlayLists') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("PlayLists"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Playlists_schedules"><?php echo __("Playlists Schedules"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Playlists_schedules" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/PlayLists/View/Playlists_schedules/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo getCDN(); ?>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';
?>
</body>
</html>

View file

@ -133,7 +133,7 @@ $_REQUEST['hideAutoplaySwitch'] = 1;
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<script>

View file

@ -1,33 +1,33 @@
<?php
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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
$_REQUEST['site'] = get_domain($global['webSiteRootURL']);
echo '<div class="panel panel-default"><div class="panel-heading">' . __("Now Playing") . '</div><div class="panel-body">';
//include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.day.php';
echo '</div></div>';
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
</script>
</body>
</html>
<?php include $global['systemRootPath'] . 'objects/include_end.php'; ?>
<?php
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
?>
<!DOCTYPE html>
<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
$_REQUEST['site'] = get_domain($global['webSiteRootURL']);
echo '<div class="panel panel-default"><div class="panel-heading">' . __("Now Playing") . '</div><div class="panel-body">';
//include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
include_once $global['systemRootPath'] . 'plugin/PlayLists/epg.day.php';
echo '</div></div>';
?>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
</script>
</body>
</html>
<?php include $global['systemRootPath'] . 'objects/include_end.php'; ?>

View file

@ -13,7 +13,7 @@ if(User::isAdmin() && !empty($_REQUEST['users_id'])){
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Users") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -43,7 +43,7 @@ if (!empty($_GET['action'])) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<script src="<?php echo getURL('node_modules/jquery/dist/jquery.min.js'); ?>" type="text/javascript"></script>

View file

@ -1,351 +1,351 @@
<?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())) {
forbiddenPage(_('You cannot see this playlist'));
}
$video = PlayLists::isPlayListASerie($_GET['playlists_id']);
if (!empty($video)) {
$video = Video::getVideo($video['id']);
include $global['systemRootPath'] . 'view/modeYoutube.php';
exit;
}
$playListObj = new PlayList($_GET['playlists_id']);
$playList = PlayList::getVideosFromPlaylist($_GET['playlists_id']);
$playListData = array();
$videoStartSeconds = array();
$users_id = User::getId();
$messagesFromPlayList = array();
foreach ($playList as $key => $value) {
if(!User::isAdmin() && !Video::userGroupAndVideoGroupMatch($users_id, $value['videos_id'])){
$messagesFromPlayList[] = "videos_id={$value['videos_id']} UserGroups do not match";
unset($playList[$key]);
continue;
}
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)) {
$messagesFromPlayList[] = "videos_id={$value['videos_id']} empty playlist source ";
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']);
$playlist_index = intval(@$_REQUEST['playlist_index']);
if (!empty($video['id'])) {
AVideoPlugin::getEmbed($video['id']);
setVideos_id($video['id']);
} else if (!empty($playListData[$playlist_index])) {
setVideos_id($playListData[$playlist_index]->getVideos_id());
$video = Video::getVideo($playListData[$playlist_index]->getVideos_id());
}
if(empty($playListData)){
videoNotFound(implode('<br>', $messagesFromPlayList));
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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(); ?>plugin/PlayLists/videojs-playlist-ui/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" style="overflow: hidden;">
<?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 -->
<?php
$htmlMediaTag = '<video playsinline preload="auto"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup=\'{"techOrder": ["youtube","html5"]}\'>
</video>';
echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag);
?>
<!-- playlist player END -->
<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">
<span class="glyphicon glyphicon-facetime-video"></span> <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';
?>
<script src="<?php echo getURL('view/js/BootstrapMenu.min.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('plugin/PlayLists/videojs-playlist/videojs-playlist.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('plugin/PlayLists/videojs-playlist-ui/videojs-playlist-ui.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('view/js/videojs-youtube/Youtube.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.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();
player.playlist.currentItem(<?php echo $playlist_index; ?>);
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);
if(playerPlaylist[index] && playerPlaylist[index].videoStartSeconds){
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'; ?>
<?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())) {
forbiddenPage(_('You cannot see this playlist'));
}
$video = PlayLists::isPlayListASerie($_GET['playlists_id']);
if (!empty($video)) {
$video = Video::getVideo($video['id']);
include $global['systemRootPath'] . 'view/modeYoutube.php';
exit;
}
$playListObj = new PlayList($_GET['playlists_id']);
$playList = PlayList::getVideosFromPlaylist($_GET['playlists_id']);
$playListData = array();
$videoStartSeconds = array();
$users_id = User::getId();
$messagesFromPlayList = array();
foreach ($playList as $key => $value) {
if(!User::isAdmin() && !Video::userGroupAndVideoGroupMatch($users_id, $value['videos_id'])){
$messagesFromPlayList[] = "videos_id={$value['videos_id']} UserGroups do not match";
unset($playList[$key]);
continue;
}
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)) {
$messagesFromPlayList[] = "videos_id={$value['videos_id']} empty playlist source ";
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']);
$playlist_index = intval(@$_REQUEST['playlist_index']);
if (!empty($video['id'])) {
AVideoPlugin::getEmbed($video['id']);
setVideos_id($video['id']);
} else if (!empty($playListData[$playlist_index])) {
setVideos_id($playListData[$playlist_index]->getVideos_id());
$video = Video::getVideo($playListData[$playlist_index]->getVideos_id());
}
if(empty($playListData)){
videoNotFound(implode('<br>', $messagesFromPlayList));
}
?>
<!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(); ?>plugin/PlayLists/videojs-playlist-ui/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" style="overflow: hidden;">
<?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 -->
<?php
$htmlMediaTag = '<video playsinline preload="auto"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup=\'{"techOrder": ["youtube","html5"]}\'>
</video>';
echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag);
?>
<!-- playlist player END -->
<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">
<span class="glyphicon glyphicon-facetime-video"></span> <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';
?>
<script src="<?php echo getURL('view/js/BootstrapMenu.min.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('plugin/PlayLists/videojs-playlist/videojs-playlist.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('plugin/PlayLists/videojs-playlist-ui/videojs-playlist-ui.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getURL('view/js/videojs-youtube/Youtube.js'); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.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();
player.playlist.currentItem(<?php echo $playlist_index; ?>);
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);
if(playerPlaylist[index] && playerPlaylist[index].videoStartSeconds){
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'; ?>

View file

@ -48,7 +48,7 @@ foreach ($playList as $key => $value) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<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"/>

View file

@ -1,348 +1,348 @@
<?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 $_SESSION['language']; ?>">
<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(); ?>plugin/PlayLists/videojs-playlist-ui/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 playsinline
<?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">
<span class="glyphicon glyphicon-facetime-video"></span> <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(); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getCDN(); ?>plugin/PlayLists/videojs-playlist-ui/videojs-playlist-ui.js"></script>
<script src="<?php echo getCDN(); ?>view/js/videojs-youtube/Youtube.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'; ?>
<?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(); ?>plugin/PlayLists/videojs-playlist-ui/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 playsinline
<?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">
<span class="glyphicon glyphicon-facetime-video"></span> <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(); ?>plugin/PlayLists/videojs-playlist/videojs-playlist.js"></script>
<script src="<?php echo getCDN(); ?>plugin/PlayLists/videojs-playlist-ui/videojs-playlist-ui.js"></script>
<script src="<?php echo getCDN(); ?>view/js/videojs-youtube/Youtube.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'; ?>

View file

@ -14,7 +14,7 @@ foreach (glob($dir . '*.css') as $file) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<script>
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';

View file

@ -1,336 +1,336 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
require_once $global['systemRootPath'] . 'objects/category.php';
$categories = Category::getAllCategories();
array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories);
$groups = UserGroups::getAllUsersGroups();
//$users = User::getAllUsers();
$o = AVideoPlugin::getObjectData("PredefinedCategory");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Predefined Category") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.funkyradio-info label, .funkyradio-default label, .funkyradio-warning label, .funkyradio-danger label{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.funkyradio div {
clear: both;
overflow: hidden;
}
.funkyradio label {
width: 100%;
border-radius: 3px;
border: 1px solid #D1D3D4;
font-weight: normal;
}
.funkyradio input[type="radio"]:empty,
.funkyradio input[type="checkbox"]:empty {
display: none;
}
.funkyradio input[type="radio"]:empty ~ label,
.funkyradio input[type="checkbox"]:empty ~ label {
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.funkyradio input[type="radio"]:empty ~ label:before,
.funkyradio input[type="checkbox"]:empty ~ label:before {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: '';
width: 2.5em;
background: #D1D3D4;
border-radius: 3px 0 0 3px;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
color: #888;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
content: '\2714';
text-indent: .9em;
color: #C2C2C2;
}
.funkyradio input[type="radio"]:checked ~ label,
.funkyradio input[type="checkbox"]:checked ~ label {
color: #777;
}
.funkyradio input[type="radio"]:checked ~ label:before,
.funkyradio input[type="checkbox"]:checked ~ label:before {
content: '\2714';
text-indent: .9em;
color: #333;
background-color: #ccc;
}
.funkyradio input[type="radio"]:focus ~ label:before,
.funkyradio input[type="checkbox"]:focus ~ label:before {
box-shadow: 0 0 0 3px #999;
}
.funkyradio-default input[type="radio"]:checked ~ label:before,
.funkyradio-default input[type="checkbox"]:checked ~ label:before {
color: #333;
background-color: #ccc;
}
.funkyradio-primary input[type="radio"]:checked ~ label:before,
.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #337ab7;
}
.funkyradio-success input[type="radio"]:checked ~ label:before,
.funkyradio-success input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5cb85c;
}
.funkyradio-danger input[type="radio"]:checked ~ label:before,
.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #d9534f;
}
.funkyradio-warning input[type="radio"]:checked ~ label:before,
.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #f0ad4e;
}
.funkyradio-info input[type="radio"]:checked ~ label:before,
.funkyradio-info input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5bc0de;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="col-md-3">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Here you can choose the default category whenever a video is submitted to your site.
</div>
<div class="panel panel-default">
<div class="panel-heading">Site Default Category</div>
<div class="panel-body">
<div class="funkyradio">
<?php
foreach ($categories as $value) {
?>
<div class="funkyradio-primary">
<input type="radio" name="radio" class="categoryRadio" id="radio<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>" <?php if ($o->defaultCategory == $value['id']) { ?>checked<?php } ?>/>
<label for="radio<?php echo $value['id']; ?>"><i class="<?php echo $value['iconClass']; ?>" style="display: unset;"></i> <?php echo $value['name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Default Category per User</div>
<div class="panel-body">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Select a user then choose the defaul category.
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Users <input id="searchUser" type="text" class="form-control" placeholder="<?php echo __('Search User'); ?>" /></div>
<div class="panel-body">
<div class="funkyradio" id="funkyradiousers"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Category</div>
<div class="panel-body">
<div class="funkyradio">
<div class="funkyradio-default">
<input type="radio" name="radioUserCat" class="categoryGroupRadio" id="radioUserCat" value="0" checked="checked"/>
<label for="radioUserCat">Use Site Default Category</label>
</div>
<?php
foreach ($categories as $value) {
?>
<div class="funkyradio-info">
<input type="radio" name="radioUserCat" class="categoryGroupRadio" id="radioUserCat<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>"/>
<label for="radioUserCat<?php echo $value['id']; ?>"><i class="<?php echo $value['iconClass']; ?>" style="display: unset;"></i> <?php echo $value['name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Here you can choose the default user group.<br>
When ever you upload a new video this video will be exclusive for the
<a href="http://127.0.0.1/AVideo/usersGroups">user groups</a> you selected.<br>
Leave it blank to be public by default
</div>
<div class="panel panel-default">
<div class="panel-heading">Site Default User Group</div>
<div class="panel-body">
<div class="funkyradio">
<?php
foreach ($groups as $value) {
?>
<div class="funkyradio-danger">
<input type="checkbox" name="groupRadio" class="groupRadio" id="groupRadio<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>" <?php if (!empty($o->{"AddVideoOnGroup_[{$value['id']}]_"})) { ?>checked<?php } ?>/>
<label for="groupRadio<?php echo $value['id']; ?>"> <?php echo $value['group_name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var userCategory = <?php echo json_encode($o->userCategory); ?>;
var userSearchTimeout;
$(document).ready(function () {
$('.groupRadio').click(function () {
modal.showPleaseWait();
$.ajax({
url: 'editorSave.php',
data: {
"groupRadio": $(this).is(":checked"),
"groupRadioValue": $(this).val()
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
$('.categoryRadio').click(function () {
modal.showPleaseWait();
$.ajax({
url: 'editorSave.php',
data: {
"category_id": $(this).val()
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
searchUserForCat('');
$("input[name='radioUser']:checked").trigger('click')
$('.categoryGroupRadio').click(function () {
modal.showPleaseWait();
var radioValue = $("input[name='radioUser']:checked").val();
$.ajax({
url: 'editorSave.php',
data: {
"user_id": radioValue,
"category_id": $(this).val()
},
type: 'post',
success: function (response) {
userCategory = response.userCategory;
modal.hidePleaseWait();
}
});
});
$('#searchUser').keyup(function () {
clearTimeout(userSearchTimeout);
userSearchTimeout = setTimeout(function () {
searchUserForCat($('#searchUser').val());
}, 500);
});
});
function searchUserForCat(search) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/users.json.php?status=a&rowCount=10&searchPhrase=' + search,
success: function (response) {
console.log(response);
$('#funkyradiousers').empty();
for (var index in response.rows) {
var user = response.rows[index];
if (typeof user == 'function') {
continue;
}
var html = '<div class="funkyradio-warning">';
html += '<input type="radio" name="radioUser" class="userRadio" id="radioUser' + user.id + '" value="' + user.id + '"/>';
html += '<label for="radioUser' + user.id + '"> ' + user.identification + '</label>';
html += '</div>'
$('#funkyradiousers').append(html);
}
setOnClickUser();
modal.hidePleaseWait();
}
});
}
function setOnClickUser() {
$('.userRadio').click(function () {
var value = 0;
if (typeof userCategory != 'undefined' && userCategory[$(this).val()]) {
value = userCategory[$(this).val()];
}
$("input[name=radioUserCat][value=0]").prop('checked', true);
$('[name=radioUserCat]').removeAttr('checked');
$("input[name=radioUserCat][value=" + value + "]").prop('checked', true);
});
}
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
require_once $global['systemRootPath'] . 'objects/category.php';
$categories = Category::getAllCategories();
array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories);
$groups = UserGroups::getAllUsersGroups();
//$users = User::getAllUsers();
$o = AVideoPlugin::getObjectData("PredefinedCategory");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Predefined Category") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.funkyradio-info label, .funkyradio-default label, .funkyradio-warning label, .funkyradio-danger label{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.funkyradio div {
clear: both;
overflow: hidden;
}
.funkyradio label {
width: 100%;
border-radius: 3px;
border: 1px solid #D1D3D4;
font-weight: normal;
}
.funkyradio input[type="radio"]:empty,
.funkyradio input[type="checkbox"]:empty {
display: none;
}
.funkyradio input[type="radio"]:empty ~ label,
.funkyradio input[type="checkbox"]:empty ~ label {
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.funkyradio input[type="radio"]:empty ~ label:before,
.funkyradio input[type="checkbox"]:empty ~ label:before {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: '';
width: 2.5em;
background: #D1D3D4;
border-radius: 3px 0 0 3px;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
color: #888;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
content: '\2714';
text-indent: .9em;
color: #C2C2C2;
}
.funkyradio input[type="radio"]:checked ~ label,
.funkyradio input[type="checkbox"]:checked ~ label {
color: #777;
}
.funkyradio input[type="radio"]:checked ~ label:before,
.funkyradio input[type="checkbox"]:checked ~ label:before {
content: '\2714';
text-indent: .9em;
color: #333;
background-color: #ccc;
}
.funkyradio input[type="radio"]:focus ~ label:before,
.funkyradio input[type="checkbox"]:focus ~ label:before {
box-shadow: 0 0 0 3px #999;
}
.funkyradio-default input[type="radio"]:checked ~ label:before,
.funkyradio-default input[type="checkbox"]:checked ~ label:before {
color: #333;
background-color: #ccc;
}
.funkyradio-primary input[type="radio"]:checked ~ label:before,
.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #337ab7;
}
.funkyradio-success input[type="radio"]:checked ~ label:before,
.funkyradio-success input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5cb85c;
}
.funkyradio-danger input[type="radio"]:checked ~ label:before,
.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #d9534f;
}
.funkyradio-warning input[type="radio"]:checked ~ label:before,
.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #f0ad4e;
}
.funkyradio-info input[type="radio"]:checked ~ label:before,
.funkyradio-info input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5bc0de;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="col-md-3">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Here you can choose the default category whenever a video is submitted to your site.
</div>
<div class="panel panel-default">
<div class="panel-heading">Site Default Category</div>
<div class="panel-body">
<div class="funkyradio">
<?php
foreach ($categories as $value) {
?>
<div class="funkyradio-primary">
<input type="radio" name="radio" class="categoryRadio" id="radio<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>" <?php if ($o->defaultCategory == $value['id']) { ?>checked<?php } ?>/>
<label for="radio<?php echo $value['id']; ?>"><i class="<?php echo $value['iconClass']; ?>" style="display: unset;"></i> <?php echo $value['name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Default Category per User</div>
<div class="panel-body">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Select a user then choose the defaul category.
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Users <input id="searchUser" type="text" class="form-control" placeholder="<?php echo __('Search User'); ?>" /></div>
<div class="panel-body">
<div class="funkyradio" id="funkyradiousers"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Category</div>
<div class="panel-body">
<div class="funkyradio">
<div class="funkyradio-default">
<input type="radio" name="radioUserCat" class="categoryGroupRadio" id="radioUserCat" value="0" checked="checked"/>
<label for="radioUserCat">Use Site Default Category</label>
</div>
<?php
foreach ($categories as $value) {
?>
<div class="funkyradio-info">
<input type="radio" name="radioUserCat" class="categoryGroupRadio" id="radioUserCat<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>"/>
<label for="radioUserCat<?php echo $value['id']; ?>"><i class="<?php echo $value['iconClass']; ?>" style="display: unset;"></i> <?php echo $value['name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> Here you can choose the default user group.<br>
When ever you upload a new video this video will be exclusive for the
<a href="http://127.0.0.1/AVideo/usersGroups">user groups</a> you selected.<br>
Leave it blank to be public by default
</div>
<div class="panel panel-default">
<div class="panel-heading">Site Default User Group</div>
<div class="panel-body">
<div class="funkyradio">
<?php
foreach ($groups as $value) {
?>
<div class="funkyradio-danger">
<input type="checkbox" name="groupRadio" class="groupRadio" id="groupRadio<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>" <?php if (!empty($o->{"AddVideoOnGroup_[{$value['id']}]_"})) { ?>checked<?php } ?>/>
<label for="groupRadio<?php echo $value['id']; ?>"> <?php echo $value['group_name']; ?></label>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
var userCategory = <?php echo json_encode($o->userCategory); ?>;
var userSearchTimeout;
$(document).ready(function () {
$('.groupRadio').click(function () {
modal.showPleaseWait();
$.ajax({
url: 'editorSave.php',
data: {
"groupRadio": $(this).is(":checked"),
"groupRadioValue": $(this).val()
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
$('.categoryRadio').click(function () {
modal.showPleaseWait();
$.ajax({
url: 'editorSave.php',
data: {
"category_id": $(this).val()
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
}
});
});
searchUserForCat('');
$("input[name='radioUser']:checked").trigger('click')
$('.categoryGroupRadio').click(function () {
modal.showPleaseWait();
var radioValue = $("input[name='radioUser']:checked").val();
$.ajax({
url: 'editorSave.php',
data: {
"user_id": radioValue,
"category_id": $(this).val()
},
type: 'post',
success: function (response) {
userCategory = response.userCategory;
modal.hidePleaseWait();
}
});
});
$('#searchUser').keyup(function () {
clearTimeout(userSearchTimeout);
userSearchTimeout = setTimeout(function () {
searchUserForCat($('#searchUser').val());
}, 500);
});
});
function searchUserForCat(search) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/users.json.php?status=a&rowCount=10&searchPhrase=' + search,
success: function (response) {
console.log(response);
$('#funkyradiousers').empty();
for (var index in response.rows) {
var user = response.rows[index];
if (typeof user == 'function') {
continue;
}
var html = '<div class="funkyradio-warning">';
html += '<input type="radio" name="radioUser" class="userRadio" id="radioUser' + user.id + '" value="' + user.id + '"/>';
html += '<label for="radioUser' + user.id + '"> ' + user.identification + '</label>';
html += '</div>'
$('#funkyradiousers').append(html);
}
setOnClickUser();
modal.hidePleaseWait();
}
});
}
function setOnClickUser() {
$('.userRadio').click(function () {
var value = 0;
if (typeof userCategory != 'undefined' && userCategory[$(this).val()]) {
value = userCategory[$(this).val()];
}
$("input[name=radioUserCat][value=0]").prop('checked', true);
$('[name=radioUserCat]').removeAttr('checked');
$("input[name=radioUserCat][value=" + value + "]").prop('checked', true);
});
}
</script>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Scheduler</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Scheduler/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Scheduler/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Scheduler</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/Scheduler/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/Scheduler/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Scheduler");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Scheduler</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-heading"><?php echo __('Scheduler') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Scheduler"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Scheduler_commands"><?php echo __("Scheduler Commands"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Scheduler_commands" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Scheduler/View/Scheduler_commands/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("Scheduler");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Scheduler</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-heading"><?php echo __('Scheduler') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("Scheduler"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Scheduler_commands"><?php echo __("Scheduler Commands"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Scheduler_commands" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/Scheduler/View/Scheduler_commands/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -32,7 +32,7 @@ if (!empty($_GET['subscription_tid'])) {
$SubscriptionIsEnabled = AVideoPlugin::isEnabledByName("Subscription");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Stripe Subscription") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -9,7 +9,7 @@ $SubscriptionIsEnabled = AVideoPlugin::isEnabledByName("Subscription");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Stripe Subscription") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -100,7 +100,7 @@ function createMenuSaveForm($menu) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: Set Info</title>
<?php

View file

@ -1,56 +1,56 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/TopMenu/Objects/MenuItem.php';
global $config;
$menuItem = new MenuItem($_GET['id']);
$url = $menuItem->getUrl();
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $menuItem->getTitle() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
</style>
</head>
<?php
if (!empty($url) && strpos($url, 'iframe:') !== false) {
$url = str_replace("iframe:", "", $url);
?>
<body class="<?php echo $global['bodyClass']; ?>" style="margin:0px;overflow:hidden">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<iframe src="<?php echo $url; ?>" frameborder="0" style="height:100%;width:100%" height="100%" width="100%"></iframe>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
<?php
} else {
?>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="bgWhite bg-light clear clearfix">
<?php echo $menuItem->getText(); ?>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
<?php
}
?>
</html>
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/TopMenu/Objects/MenuItem.php';
global $config;
$menuItem = new MenuItem($_GET['id']);
$url = $menuItem->getUrl();
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $menuItem->getTitle() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
</style>
</head>
<?php
if (!empty($url) && strpos($url, 'iframe:') !== false) {
$url = str_replace("iframe:", "", $url);
?>
<body class="<?php echo $global['bodyClass']; ?>" style="margin:0px;overflow:hidden">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<iframe src="<?php echo $url; ?>" frameborder="0" style="height:100%;width:100%" height="100%" width="100%"></iframe>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
<?php
} else {
?>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="bgWhite bg-light clear clearfix">
<?php echo $menuItem->getText(); ?>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
<?php
}
?>
</html>

View file

@ -15,7 +15,7 @@ array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $catego
$groups = UserGroups::getAllUsersGroups();
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Top Menu") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -4,16 +4,16 @@ require_once dirname(__FILE__) . '/../../../videos/configuration.php';
class User_notifications extends ObjectYPT {
protected $id,$msg,$title,$type,$status,$time_readed,$users_id,$image,$icon,$href,$onclick,$element_class,$element_id,$priority;
protected $id, $msg, $title, $type, $status, $time_readed, $users_id, $image, $icon, $href, $onclick, $element_class, $element_id, $priority;
static function getSearchFieldsNames() {
return array('msg','type','image','icon','href','onclick','element_class','element_id');
return array('msg', 'type', 'image', 'icon', 'href', 'onclick', 'element_class', 'element_id');
}
static function getTableName() {
return 'user_notifications';
}
public function getTitle() {
return $this->title;
}
@ -21,117 +21,117 @@ class User_notifications extends ObjectYPT {
public function setTitle($title): void {
$this->title = safeString($title);
}
function setId($id) {
$this->id = intval($id);
}
}
function setMsg($msg) {
$this->msg = safeString($msg);
}
}
function setType($type) {
$this->type = $type;
}
}
function setStatus($status) {
$this->status = $status;
}
}
function setTime_readed($time_readed) {
$this->time_readed = $time_readed;
}
}
function setUsers_id($users_id) {
$this->users_id = intval($users_id);
}
}
function setImage($image) {
$this->image = safeString($image);
}
}
function setIcon($icon) {
$this->icon = safeString($icon);
}
}
function setHref($href) {
$this->href = safeString($href);
}
}
function setOnclick($onclick) {
$this->onclick = $onclick;
}
}
function setElement_class($element_class) {
$this->element_class = safeString($element_class);
}
}
function setElement_Id($element_id) {
$this->element_id = safeString($element_id);
}
}
function setPriority($priority) {
$this->priority = intval($priority);
}
}
function getElement_Id() {
return $this->element_id;
}
}
function getMsg() {
return $this->msg;
}
}
function getType() {
return $this->type;
}
}
function getStatus() {
return $this->status;
}
}
function getTime_readed() {
return $this->time_readed;
}
}
function getUsers_id() {
return intval($this->users_id);
}
}
function getImage() {
return $this->image;
}
}
function getIcon() {
return $this->icon;
}
}
function getHref() {
return $this->href;
}
}
function getOnclick() {
return $this->onclick;
}
}
function getElement_class() {
return $this->element_class;
}
}
function getId() {
return $this->id;
}
}
function getPriority() {
return intval($this->priority);
}
public static function getAll(){
}
public static function getAll() {
setDefaultSort('id', 'DESC');
return parent::getAll();
}
public static function getAllForUsers_id($users_id, $limit=10){
public static function getAllForUsers_id($users_id, $limit = 10) {
global $global;
if (!static::isTableInstalled()) {
return false;
@ -145,15 +145,15 @@ class User_notifications extends ObjectYPT {
foreach ($fullData as $row) {
$rows[] = $row;
}
}
}
return $rows;
}
public static function deleteForUsers_id($users_id){
public static function deleteForUsers_id($users_id) {
global $global;
if (!empty($users_id)) {
if(!self::ignoreTableSecurityCheck() && isUntrustedRequest("DELETE " . static::getTableName())){
if (!self::ignoreTableSecurityCheck() && isUntrustedRequest("DELETE " . static::getTableName())) {
return false;
}
$sql = "DELETE FROM " . static::getTableName() . " ";
@ -162,8 +162,15 @@ class User_notifications extends ObjectYPT {
//_error_log("Delete Query: ".$sql);
return sqlDAL::writeSql($sql, "i", [$users_id]);
}
_error_log("Id for table " . static::getTableName() . " not defined for deletion ". json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)), AVideoLog::$ERROR);
_error_log("Id for table " . static::getTableName() . " not defined for deletion " . json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)), AVideoLog::$ERROR);
return false;
}
public function save() {
if (empty($this->element_id)) {
$this->element_id = 'automatic_id_' . uniqid();
}
return parent::save();
}
}

View file

@ -14,10 +14,6 @@ if(!User::isAdmin()){
die(json_encode($obj));
}
if(empty($_POST['element_id'])){
$_POST['element_id'] = 'automatic_id_'.uniqid();
}
$o = new User_notifications(@$_POST['id']);
$o->setMsg($_POST['msg']);
$o->setTitle($_POST['title']);

View file

@ -10,7 +10,7 @@ if (!User::isAdmin()) {
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: UserNotifications</title>
<?php

View file

@ -3,7 +3,7 @@ require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("UserNotifications");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: UserNotifications</title>
<?php

View file

@ -1,72 +1,72 @@
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage();
}
if(!AVideoPlugin::isEnabledByName('User_Location')){
forbiddenPage('User_Location plugin is disabled');
}
if(!IP2Location::isTableInstalled()){
forbiddenPage('You MUST install IP2Location tables');
}
$ip = getRealIpAddr();
if (!empty($_REQUEST['ip'])) {
$ip = $_REQUEST['ip'];
}
$location = IP2Location::getLocation($ip);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title>Test IP</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">
<form action="testIP.php">
<div class="panel panle-default">
<div class="panel-heading">
Test IP
</div>
<div class="panel-body">
<label for="ip"><?php echo __("IP Address"); ?>:</label>
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo $ip; ?>">
<?php
if(!empty($location)){
echo '<div class="alert alert-success">';
foreach ($location as $key => $value) {
echo "<strong>{$key}:</strong> {$value}<br>";
}
echo '</div>';
}else{
echo '<div class="alert alert-danger">IP Not Found</div>';
}
?>
</div>
<div class="panel-footer">
<button class="btn btn-success btn-block" id="save"><i class="fas fa-globe-americas"></i> Locate IP</button>
</div>
</div>
</form>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>
<?php
require_once '../../videos/configuration.php';
if (!User::isAdmin()) {
forbiddenPage();
}
if(!AVideoPlugin::isEnabledByName('User_Location')){
forbiddenPage('User_Location plugin is disabled');
}
if(!IP2Location::isTableInstalled()){
forbiddenPage('You MUST install IP2Location tables');
}
$ip = getRealIpAddr();
if (!empty($_REQUEST['ip'])) {
$ip = $_REQUEST['ip'];
}
$location = IP2Location::getLocation($ip);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title>Test IP</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">
<form action="testIP.php">
<div class="panel panle-default">
<div class="panel-heading">
Test IP
</div>
<div class="panel-body">
<label for="ip"><?php echo __("IP Address"); ?>:</label>
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo $ip; ?>">
<?php
if(!empty($location)){
echo '<div class="alert alert-success">';
foreach ($location as $key => $value) {
echo "<strong>{$key}:</strong> {$value}<br>";
}
echo '</div>';
}else{
echo '<div class="alert alert-danger">IP Not Found</div>';
}
?>
</div>
<div class="panel-footer">
<button class="btn btn-success btn-block" id="save"><i class="fas fa-globe-americas"></i> Locate IP</button>
</div>
</div>
</form>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>

View file

@ -1,118 +1,118 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$o = AVideoPlugin::getObjectData("VideoLogoOverlay");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Customize") . $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">
<div class="panel panel-default">
<div class="panel-heading">
Create an Video Overlay Button
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12 ">
<?php
$croppie = getCroppie(__('Upload a logo'), 'saveVideoLogo', 250, 70, 0, 20);
echo $croppie['html'];
?>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="position"><?php echo __("Position"); ?>:</label>
</div>
<div class="col-md-10 ">
<select class="form-control" id="position">
<?php
foreach ($o->position->type as $value) {
echo "<option " . ($value == $o->position->value ? "selected='selected'" : "") . ">{$value}</option>";
}
?>
</select>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="url"><?php echo __("URL"); ?>:</label>
</div>
<div class="col-md-10 ">
<input type="url" id="url" class="form-control" value="<?php echo $o->url; ?>">
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="opacity"><?php echo __("Opacity"); ?>:</label>
</div>
<div class="col-md-10 ">
<input type="number" id="opacity" class="form-control" value="<?php echo $o->opacity; ?>">
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 text-center">
<button class="btn btn-success btn-block" id="save" onclick="<?php echo $croppie['getCroppieFunction']; ?>"><i class="fa fa-save"></i> <?php echo _('Save'); ?></button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
function saveVideoLogo(image) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/VideoLogoOverlay/page/editorSave.php',
data: {
"image": image,
"position": $('#position').val(),
"opacity": $('#opacity').val(),
"url": $('#url').val()
},
type: 'post',
success: function (response) {
avideoResponse(response);
modal.hidePleaseWait();
}
});
}
$(document).ready(function () {
<?php
echo $croppie['restartCroppie'] . "('" . getURL('videos/logoOverlay.png') . "');";
?>
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$o = AVideoPlugin::getObjectData("VideoLogoOverlay");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Customize") . $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">
<div class="panel panel-default">
<div class="panel-heading">
Create an Video Overlay Button
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12 ">
<?php
$croppie = getCroppie(__('Upload a logo'), 'saveVideoLogo', 250, 70, 0, 20);
echo $croppie['html'];
?>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="position"><?php echo __("Position"); ?>:</label>
</div>
<div class="col-md-10 ">
<select class="form-control" id="position">
<?php
foreach ($o->position->type as $value) {
echo "<option " . ($value == $o->position->value ? "selected='selected'" : "") . ">{$value}</option>";
}
?>
</select>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="url"><?php echo __("URL"); ?>:</label>
</div>
<div class="col-md-10 ">
<input type="url" id="url" class="form-control" value="<?php echo $o->url; ?>">
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 ">
<div class="form-group">
<div class="col-md-2 text-right">
<label for="opacity"><?php echo __("Opacity"); ?>:</label>
</div>
<div class="col-md-10 ">
<input type="number" id="opacity" class="form-control" value="<?php echo $o->opacity; ?>">
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 text-center">
<button class="btn btn-success btn-block" id="save" onclick="<?php echo $croppie['getCroppieFunction']; ?>"><i class="fa fa-save"></i> <?php echo _('Save'); ?></button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
function saveVideoLogo(image) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/VideoLogoOverlay/page/editorSave.php',
data: {
"image": image,
"position": $('#position').val(),
"opacity": $('#opacity').val(),
"url": $('#url').val()
},
type: 'post',
success: function (response) {
avideoResponse(response);
modal.hidePleaseWait();
}
});
}
$(document).ready(function () {
<?php
echo $croppie['restartCroppie'] . "('" . getURL('videos/logoOverlay.png') . "');";
?>
});
</script>
</body>
</html>

View file

@ -1,27 +1,27 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Tags") . $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';
include $global['systemRootPath'] . 'plugin/VideoTags/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Tags") . $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';
include $global['systemRootPath'] . 'plugin/VideoTags/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -1,29 +1,29 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: VideosStatistics</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: VideosStatistics</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/{$classname}/index_head.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/{$classname}/index_body.php';
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
</body>
</html>

View file

@ -1,46 +1,46 @@
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("VideosStatistics");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: VideosStatistics</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-heading"><?php echo __('VideosStatistics') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("VideosStatistics"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Statistics"><?php echo __("Statistics"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Statistics" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/Statistics/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
AVideoPlugin::loadPlugin("VideosStatistics");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo $config->getWebSiteTitle(); ?> :: VideosStatistics</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-heading"><?php echo __('VideosStatistics') ?>
<div class="pull-right">
<?php echo AVideoPlugin::getSwitchButton("VideosStatistics"); ?>
</div>
</div>
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Statistics"><?php echo __("Statistics"); ?></a></li>
</ul>
<div class="tab-content">
<div id="Statistics" class="tab-pane fade in active" style="padding: 10px;">
<?php
include $global['systemRootPath'] . 'plugin/VideosStatistics/View/Statistics/index_body.php';
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo $global['webSiteRootURL']; ?>view/css/DataTables/datatables.min.js"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

View file

@ -1,155 +1,155 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(1);
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$obj = AVideoPlugin::getObjectDataIfEnabled("WWBN");
if(empty($obj)){
die("Plugin disabled");
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("WWBN") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<!-- RESPONSIVE -->
<style>
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
iframe {
height: auto;
}
}
/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
iframe {
height: 300px;
}
}
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
iframe {
height: 500px
}
}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
iframe {
height: 600px;
}
}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
iframe {
height: 700px;
}
}
</style>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<br><br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><b>INSTRUCTION</b></h3>
</div>
<div class="panel-body">
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/121" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #1 - Setup</b></h3>
<p>Enable "WWBN" plugin and Create an Account.</p>
</div>
</div>
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/account_activated.png" width="100%">
<div class="caption">
<h3><b>Step #2 - Account Verified</b></h3>
<p>Wait until you received an email similar to this one. Then you can login from here to submit/update your index or go back to your "WWBN" plugin then login through the setup button.</p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/122" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #3 - Signin and Submit an Index</b></h3>
<p>For adding new index; for the first time the data from your platform will be automatically generated and if you already have an existing data you need to type your other platform url then click generate. </p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/124" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #4 - Verify Index</b></h3>
<p>Click the unverified/verified button of your index, A form to input your validation token will pop-up or an alert message that your index is already verified.</p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/123" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #5 - Updating Index</b></h3>
<p>Click the edit button of your index, change/update the data for the allowed/editable field then click update button to appy changes. </p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/125" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #5 - Deactivating/Re-activating Index</b></h3>
<p>Changing status of your index to inreview or inactive</p>
</div>
</div>
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/data_info.PNG" width="100%">
<div class="caption">
<h3><b>Additional Info - Index data</b></h3>
<ol>
<li>Display engine name with your platform icon.</li>
<li>Display verify or unverified, Click the to unverified to show form to verify your Index so that the admin can assign your it to an affiliate.</li>
<li>Inreview = Pending for approval, Inactive = Indexing is not avaible for assigning to an Affiliate or Disapproved by the admin due to some contents conflict, Approved = Index is ready/avialable to be assign to an Affiliate but still need verified.</li>
<li>The Content Type of your Platform.</li>
<li>Edit button, redirect to update form to edit the content type or country restriction.</li>
<li>Link button, redirect to your platform home page.</li>
<li>Deactivate = To set the status to inactive, Re-activate = To set/resubmit your index to be index to an affiliate</li>
<li>Display list of Affiliate/s.</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(1);
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$obj = AVideoPlugin::getObjectDataIfEnabled("WWBN");
if(empty($obj)){
die("Plugin disabled");
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("WWBN") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
</head>
<!-- RESPONSIVE -->
<style>
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
iframe {
height: auto;
}
}
/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
iframe {
height: 300px;
}
}
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
iframe {
height: 500px
}
}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
iframe {
height: 600px;
}
}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
iframe {
height: 700px;
}
}
</style>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<br><br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><b>INSTRUCTION</b></h3>
</div>
<div class="panel-body">
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/121" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #1 - Setup</b></h3>
<p>Enable "WWBN" plugin and Create an Account.</p>
</div>
</div>
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/account_activated.png" width="100%">
<div class="caption">
<h3><b>Step #2 - Account Verified</b></h3>
<p>Wait until you received an email similar to this one. Then you can login from here to submit/update your index or go back to your "WWBN" plugin then login through the setup button.</p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/122" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #3 - Signin and Submit an Index</b></h3>
<p>For adding new index; for the first time the data from your platform will be automatically generated and if you already have an existing data you need to type your other platform url then click generate. </p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/124" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #4 - Verify Index</b></h3>
<p>Click the unverified/verified button of your index, A form to input your validation token will pop-up or an alert message that your index is already verified.</p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/123" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #5 - Updating Index</b></h3>
<p>Click the edit button of your index, change/update the data for the allowed/editable field then click update button to appy changes. </p>
</div>
</div>
<div class="thumbnail">
<iframe src="https://avideo.com/vEmbed/125" width="100%" frameborder="0"></iframe>
<div class="caption">
<h3><b>Step #5 - Deactivating/Re-activating Index</b></h3>
<p>Changing status of your index to inreview or inactive</p>
</div>
</div>
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/data_info.PNG" width="100%">
<div class="caption">
<h3><b>Additional Info - Index data</b></h3>
<ol>
<li>Display engine name with your platform icon.</li>
<li>Display verify or unverified, Click the to unverified to show form to verify your Index so that the admin can assign your it to an affiliate.</li>
<li>Inreview = Pending for approval, Inactive = Indexing is not avaible for assigning to an Affiliate or Disapproved by the admin due to some contents conflict, Approved = Index is ready/avialable to be assign to an Affiliate but still need verified.</li>
<li>The Content Type of your Platform.</li>
<li>Edit button, redirect to update form to edit the content type or country restriction.</li>
<li>Link button, redirect to your platform home page.</li>
<li>Deactivate = To set the status to inactive, Re-activate = To set/resubmit your index to be index to an affiliate</li>
<li>Display list of Affiliate/s.</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,38 +1,38 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$obj = AVideoPlugin::getObjectDataIfEnabled("WWBN");
if(empty($obj)){
die("Plugin disabled");
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("WWBN") . $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">
<iframe src="https://wwbn.com/platform/?section=signup&webSiteRootURL=<?php echo urlencode($global['webSiteRootURL']); ?>&token=<?php echo WWBN::getToken(); ?>" style="width: 100%; height: calc(100vh - 60px);" frameBorder="0"></iframe>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manager plugin add logo"));
exit;
}
$obj = AVideoPlugin::getObjectDataIfEnabled("WWBN");
if(empty($obj)){
die("Plugin disabled");
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("WWBN") . $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">
<iframe src="https://wwbn.com/platform/?section=signup&webSiteRootURL=<?php echo urlencode($global['webSiteRootURL']); ?>&token=<?php echo WWBN::getToken(); ?>" style="width: 100%; height: calc(100vh - 60px);" frameBorder="0"></iframe>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>

View file

@ -28,7 +28,7 @@ if ($response->error) {
$identification = User::getNameIdentificationById($users_id);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Caller") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -1,171 +1,171 @@
<?php
if (empty($_POST['value'])) {
die("The value is empty");
}
if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = '../../../../';
}
require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once ($global['systemRootPath'] . 'plugin/RazorPayYPT/razorpay-php/Razorpay.php');
// Create the Razorpay Order
use Razorpay\Api\Api;
$razorPay = AVideoPlugin::loadPlugin('RazorPayYPT');
$pluginS = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$objS = $pluginS->getDataObject();
$obj = $razorPay->getDataObject();
$api = new Api($obj->api_key, $obj->api_secret);
//
// We create an razorpay order using orders api
// Docs: https://docs.razorpay.com/docs/orders
//
$invoiceNumber = uniqid();
$displayCurrency = $objS->currency;
$orderData = [
'receipt' => $invoiceNumber,
'amount' => $_POST['value'] * 100, // 2000 rupees in paise
'currency' => $displayCurrency,
'payment_capture' => 1, // auto capture
'notes' => array(
'user' => User::getUserName(),
'users_id' => User::getId()
)
];
$data = [];
try {
$razorpayOrder = $api->order->create($orderData);
} catch (Exception $exc) {
if ($exc->getMessage() === "Currency is not supported") {
echo "<a href='https://razorpay.com/docs/international-payments/#enable-or-disable-international-payments-from-the-dashboard'>Enable or Disable International Payments</a><br>";
}
error_log("Razorpay requestPayment.json.php: [" . $exc->getCode() . "] " . $exc->getMessage());
error_log("Razorpay requestPayment.json.php: " . $exc->getTraceAsString());
die("Fail to connect on RazorPay");
}
$razorpayOrderId = $razorpayOrder['id'];
$_SESSION['razorpay_order_id'] = $razorpayOrderId;
$displayAmount = $amount = $orderData['amount'];
if ($displayCurrency !== 'INR') {
$url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR";
$exchange = _json_decode(file_get_contents($url), true);
$displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100;
}
$checkout = 'automatic';
if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) {
$checkout = $_GET['checkout'];
}
$data = [
"key" => $obj->api_key,
"amount" => $amount,
"name" => $config->getWebSiteTitle() . " Payment",
"image" => $config->getLogo(),
"prefill" => [
"name" => User::getName(),
"email" => User::getEmail_()
],
"notes" => [
"users_id" => User::getId(),
],
"order_id" => $razorpayOrderId,
"callback_url" => "{$global['webSiteRootURL']}plugin/YPTWallet/plugins/YPTWalletRazorPay/redirect_url.php",
"redirect" => true
];
if ($displayCurrency !== 'INR') {
$data['display_currency'] = $displayCurrency;
$data['display_amount'] = $displayAmount;
}
$json = json_encode($data);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title>Add Funds</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<style>
.razorpay-payment-button{
display: none;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Process Payment"); ?></div>
<div class="panel-body">
<form name='razorpayform' action="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/plugins/YPTWalletRazorPay/redirect_url.php" method="POST">
<input type="hidden" name="razorpay_payment_id" id="razorpay_payment_id">
<input type="hidden" name="razorpay_signature" id="razorpay_signature" >
<input type="hidden" name="users_id" value="<?php echo User::getId(); ?>">
</form>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var options = <?php echo $json ?>;
/**
* The entire list of Checkout fields is available at
* https://docs.razorpay.com/docs/checkout-form#checkout-fields
*/
options.handler = function (response) {
document.getElementById('razorpay_payment_id').value = response.razorpay_payment_id;
document.getElementById('razorpay_signature').value = response.razorpay_signature;
document.razorpayform.submit();
};
options.modal = {
ondismiss: function () {
document.location = "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/addFunds.php";
console.log("This code runs when the popup is closed");
},
// Boolean indicating whether pressing escape key
// should close the checkout form. (default: true)
escape: true,
// Boolean indicating whether clicking translucent blank
// space outside checkout form should close the form. (default: false)
backdropclose: false
};
var rzp = new Razorpay(options);
rzp.open();
});
</script>
</body>
</html>
<?php
if (empty($_POST['value'])) {
die("The value is empty");
}
if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = '../../../../';
}
require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once ($global['systemRootPath'] . 'plugin/RazorPayYPT/razorpay-php/Razorpay.php');
// Create the Razorpay Order
use Razorpay\Api\Api;
$razorPay = AVideoPlugin::loadPlugin('RazorPayYPT');
$pluginS = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$objS = $pluginS->getDataObject();
$obj = $razorPay->getDataObject();
$api = new Api($obj->api_key, $obj->api_secret);
//
// We create an razorpay order using orders api
// Docs: https://docs.razorpay.com/docs/orders
//
$invoiceNumber = uniqid();
$displayCurrency = $objS->currency;
$orderData = [
'receipt' => $invoiceNumber,
'amount' => $_POST['value'] * 100, // 2000 rupees in paise
'currency' => $displayCurrency,
'payment_capture' => 1, // auto capture
'notes' => array(
'user' => User::getUserName(),
'users_id' => User::getId()
)
];
$data = [];
try {
$razorpayOrder = $api->order->create($orderData);
} catch (Exception $exc) {
if ($exc->getMessage() === "Currency is not supported") {
echo "<a href='https://razorpay.com/docs/international-payments/#enable-or-disable-international-payments-from-the-dashboard'>Enable or Disable International Payments</a><br>";
}
error_log("Razorpay requestPayment.json.php: [" . $exc->getCode() . "] " . $exc->getMessage());
error_log("Razorpay requestPayment.json.php: " . $exc->getTraceAsString());
die("Fail to connect on RazorPay");
}
$razorpayOrderId = $razorpayOrder['id'];
$_SESSION['razorpay_order_id'] = $razorpayOrderId;
$displayAmount = $amount = $orderData['amount'];
if ($displayCurrency !== 'INR') {
$url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR";
$exchange = _json_decode(file_get_contents($url), true);
$displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100;
}
$checkout = 'automatic';
if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) {
$checkout = $_GET['checkout'];
}
$data = [
"key" => $obj->api_key,
"amount" => $amount,
"name" => $config->getWebSiteTitle() . " Payment",
"image" => $config->getLogo(),
"prefill" => [
"name" => User::getName(),
"email" => User::getEmail_()
],
"notes" => [
"users_id" => User::getId(),
],
"order_id" => $razorpayOrderId,
"callback_url" => "{$global['webSiteRootURL']}plugin/YPTWallet/plugins/YPTWalletRazorPay/redirect_url.php",
"redirect" => true
];
if ($displayCurrency !== 'INR') {
$data['display_currency'] = $displayCurrency;
$data['display_amount'] = $displayAmount;
}
$json = json_encode($data);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title>Add Funds</title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<style>
.razorpay-payment-button{
display: none;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Process Payment"); ?></div>
<div class="panel-body">
<form name='razorpayform' action="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/plugins/YPTWalletRazorPay/redirect_url.php" method="POST">
<input type="hidden" name="razorpay_payment_id" id="razorpay_payment_id">
<input type="hidden" name="razorpay_signature" id="razorpay_signature" >
<input type="hidden" name="users_id" value="<?php echo User::getId(); ?>">
</form>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var options = <?php echo $json ?>;
/**
* The entire list of Checkout fields is available at
* https://docs.razorpay.com/docs/checkout-form#checkout-fields
*/
options.handler = function (response) {
document.getElementById('razorpay_payment_id').value = response.razorpay_payment_id;
document.getElementById('razorpay_signature').value = response.razorpay_signature;
document.razorpayform.submit();
};
options.modal = {
ondismiss: function () {
document.location = "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/addFunds.php";
console.log("This code runs when the popup is closed");
},
// Boolean indicating whether pressing escape key
// should close the checkout form. (default: true)
escape: true,
// Boolean indicating whether clicking translucent blank
// space outside checkout form should close the form. (default: false)
backdropclose: false
};
var rzp = new Razorpay(options);
rzp.open();
});
</script>
</body>
</html>

View file

@ -80,7 +80,7 @@ if ($obj->error) {
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title>Add Funds</title>
<?php

View file

@ -1,97 +1,97 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$paypal = AVideoPlugin::loadPluginIfEnabled("PayPalYPT");
$obj = $plugin->getDataObject();
if (!empty($paypal)) {
$paypalObj = $paypal->getDataObject();
}
$options = _json_decode($obj->addFundsOptions);
//unset($_SESSION['addFunds_Success']);
//unset($_SESSION['addFunds_Fail']);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Add Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Add Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->add_funds_text ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Add Funds"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<?php
$plugin->getAvailablePayments();
?>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$paypal = AVideoPlugin::loadPluginIfEnabled("PayPalYPT");
$obj = $plugin->getDataObject();
if (!empty($paypal)) {
$paypalObj = $paypal->getDataObject();
}
$options = _json_decode($obj->addFundsOptions);
//unset($_SESSION['addFunds_Success']);
//unset($_SESSION['addFunds_Fail']);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Add Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Add Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->add_funds_text ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Add Funds"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<?php
$plugin->getAvailablePayments();
?>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
});
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@ $plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$obj = $plugin->getDataObject();
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Support Author") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -14,7 +14,7 @@ $wallet = new Wallet(0);
$wallet->setUsers_id(User::getId());
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Configuration") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -1,169 +1,169 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$users_id = 0;
if (!empty($_GET['users_id'])) {
$users_id = $_GET['users_id'];
}else{
$users_id = User::getId();
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("History") . $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">
<div class="panel panel-default">
<div class="panel-heading" style="height: 70px;">
<img src="<?php echo User::getPhoto($users_id); ?>" class="img img-responsive img-circle pull-left" style="height: 50px; margin-right: 10px;" alt="User Photo">
<h1><?php echo User::getNameIdentificationById($users_id); ?></h1>
</div>
<div class="panel-body">
<div class="row bgWhite list-group-item">
<table id="grid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="valueText" data-width="150px"><?php echo __("Value"); ?></th>
<th data-column-id="description" data-formatter="description" ><?php echo __("Description"); ?></th>
<th data-column-id="status" data-formatter="status" data-width="250px"><?php echo __("Status"); ?></th>
<th data-column-id="created" data-order="desc" data-width="150px"><?php echo __("Date"); ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var grid = $("#grid").bootgrid({
labels: {
noResults: "<?php echo __("No results found!"); ?>",
all: "<?php echo __("All"); ?>",
infos: "<?php echo __("Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries"); ?>",
loading: "<?php echo __("Loading..."); ?>",
refresh: "<?php echo __("Refresh"); ?>",
search: "<?php echo __("Search"); ?>",
},
ajax: true,
url: "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/log.json.php?users_id=<?php echo $users_id; ?>",
formatters: {
"description": function (column, row) {
if(row.information){
return row.information;
}else{
return row.description;
}
},
"status": function (column, row) {
var status = "";
if (row.type == "<?php echo YPTWallet::MANUAL_ADD; ?>" || row.type == "<?php echo YPTWallet::MANUAL_WITHDRAW; ?>") {
status = "<span class='label label-success'>Success</span>";
if (row.status == 'pending') {
status = "<span class='label label-warning'>Pending</span>";
} else if (row.status == 'canceled') {
status = "<span class='label label-danger'>Canceled</span>";
}
<?php
if (User::isAdmin()) {
?>
status += "<br><br><div class=\"btn-group\"><button class='btn btn-default btn-xs command-status-success'>Success</button>";
status += "<button class='btn btn-default btn-xs command-status-pending'>Pending</button>";
status += "<button class='btn btn-default btn-xs command-status-canceled'>Canceled</button><div>";
<?php
}
?>
}else{
if (row.status == 'success') {
status = "<span class='label label-success'>Success</span>";
}else if (row.status == 'pending') {
status = "<span class='label label-warning'>Pending</span>";
} else if (row.status == 'canceled') {
status = "<span class='label label-danger'>Canceled</span>";
}
}
return status;
}
}
}).on("loaded.rs.jquery.bootgrid", function () {
<?php
if (User::isAdmin()) {
?>
/* Executes after data is loaded and rendered */
grid.find(".command-status-success").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("success", row.id);
});
grid.find(".command-status-pending").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("pending", row.id);
});
grid.find(".command-status-canceled").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("canceled", row.id);
});
<?php
}
?>
});
});
<?php
if (User::isAdmin()) {
?>
function setStatus(status, wallet_log_id) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/changeLogStatus.json.php',
type: "POST",
data: {
status: status,
wallet_log_id: wallet_log_id
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
$("#grid").bootgrid("reload");
}
}
});
}
<?php
}
?>
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
$users_id = 0;
if (!empty($_GET['users_id'])) {
$users_id = $_GET['users_id'];
}else{
$users_id = User::getId();
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("History") . $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">
<div class="panel panel-default">
<div class="panel-heading" style="height: 70px;">
<img src="<?php echo User::getPhoto($users_id); ?>" class="img img-responsive img-circle pull-left" style="height: 50px; margin-right: 10px;" alt="User Photo">
<h1><?php echo User::getNameIdentificationById($users_id); ?></h1>
</div>
<div class="panel-body">
<div class="row bgWhite list-group-item">
<table id="grid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="valueText" data-width="150px"><?php echo __("Value"); ?></th>
<th data-column-id="description" data-formatter="description" ><?php echo __("Description"); ?></th>
<th data-column-id="status" data-formatter="status" data-width="250px"><?php echo __("Status"); ?></th>
<th data-column-id="created" data-order="desc" data-width="150px"><?php echo __("Date"); ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var grid = $("#grid").bootgrid({
labels: {
noResults: "<?php echo __("No results found!"); ?>",
all: "<?php echo __("All"); ?>",
infos: "<?php echo __("Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries"); ?>",
loading: "<?php echo __("Loading..."); ?>",
refresh: "<?php echo __("Refresh"); ?>",
search: "<?php echo __("Search"); ?>",
},
ajax: true,
url: "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/log.json.php?users_id=<?php echo $users_id; ?>",
formatters: {
"description": function (column, row) {
if(row.information){
return row.information;
}else{
return row.description;
}
},
"status": function (column, row) {
var status = "";
if (row.type == "<?php echo YPTWallet::MANUAL_ADD; ?>" || row.type == "<?php echo YPTWallet::MANUAL_WITHDRAW; ?>") {
status = "<span class='label label-success'>Success</span>";
if (row.status == 'pending') {
status = "<span class='label label-warning'>Pending</span>";
} else if (row.status == 'canceled') {
status = "<span class='label label-danger'>Canceled</span>";
}
<?php
if (User::isAdmin()) {
?>
status += "<br><br><div class=\"btn-group\"><button class='btn btn-default btn-xs command-status-success'>Success</button>";
status += "<button class='btn btn-default btn-xs command-status-pending'>Pending</button>";
status += "<button class='btn btn-default btn-xs command-status-canceled'>Canceled</button><div>";
<?php
}
?>
}else{
if (row.status == 'success') {
status = "<span class='label label-success'>Success</span>";
}else if (row.status == 'pending') {
status = "<span class='label label-warning'>Pending</span>";
} else if (row.status == 'canceled') {
status = "<span class='label label-danger'>Canceled</span>";
}
}
return status;
}
}
}).on("loaded.rs.jquery.bootgrid", function () {
<?php
if (User::isAdmin()) {
?>
/* Executes after data is loaded and rendered */
grid.find(".command-status-success").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("success", row.id);
});
grid.find(".command-status-pending").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("pending", row.id);
});
grid.find(".command-status-canceled").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("canceled", row.id);
});
<?php
}
?>
});
});
<?php
if (User::isAdmin()) {
?>
function setStatus(status, wallet_log_id) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/changeLogStatus.json.php',
type: "POST",
data: {
status: status,
wallet_log_id: wallet_log_id
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
$("#grid").bootgrid("reload");
}
}
});
}
<?php
}
?>
</script>
</body>
</html>

View file

@ -1,121 +1,121 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}");
}
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$obj = $plugin->getDataObject();
$options = _json_decode($obj->addFundsOptions);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Add Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Add Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->add_funds_text ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Specify Amount"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<div class="form-group">
<label for="information"><?php echo __("Information"); ?></label>
<textarea class="form-control" id="information" name="information"></textarea>
</div>
<button class="btn btn-primary" id="manualAddFundsPageButton">
<?php echo $obj->manualAddFundsPageButton; ?>
</button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#manualAddFundsPageButton').click(function () {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualAddFunds.json.php',
type: "POST",
data: {
value: $('#value').val(),
information: $('#information').val(),
autoWithdraw: <?php echo empty($autoWithdraw)?0:1; ?>
},
success: function (response) {
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your request was sent"); ?>", "success");
}, 500);
}
}
});
});
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}");
}
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$obj = $plugin->getDataObject();
$options = _json_decode($obj->addFundsOptions);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Add Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Add Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->add_funds_text ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Specify Amount"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<div class="form-group">
<label for="information"><?php echo __("Information"); ?></label>
<textarea class="form-control" id="information" name="information"></textarea>
</div>
<button class="btn btn-primary" id="manualAddFundsPageButton">
<?php echo $obj->manualAddFundsPageButton; ?>
</button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#manualAddFundsPageButton').click(function () {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualAddFunds.json.php',
type: "POST",
data: {
value: $('#value').val(),
information: $('#information').val(),
autoWithdraw: <?php echo empty($autoWithdraw)?0:1; ?>
},
success: function (response) {
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your request was sent"); ?>", "success");
}, 500);
}
}
});
});
});
</script>
</body>
</html>

View file

@ -1,127 +1,127 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
gotToLoginAndComeBackHere();
}
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$obj = $plugin->getDataObject();
$options = _json_decode($obj->withdrawFundsOptions);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Withdraw Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __("Withdraw Funds"); ?>
<?php
if ($obj->enableAutoWithdrawFundsPagePaypal) {
?>
<label class="label label-success pull-right"><i class="fab fa-paypal"></i> <?php echo __('Automatic Withdraw'); ?></label>
<?php
}
?>
</div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->withdraw_funds_text ?>
<?php echo AVideoPlugin::getWalletConfigurationHTML(User::getId(), $plugin, $obj); ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Specify Amount"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<div class="form-group">
<label for="information"><?php echo __("Information"); ?></label>
<textarea class="form-control" id="information" name="information"></textarea>
</div>
<button class="btn btn-primary btn-block" id="manualWithdrawFundsPageButton">
<i class="fas fa-dollar-sign"></i>
<?php echo $obj->manualWithdrawFundsPageButton; ?>
</button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#manualWithdrawFundsPageButton').click(function () {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualWithdrawFunds.json.php',
type: "POST",
data: {
value: $('#value').val(),
information: $('#information').val()
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your request was sent"); ?>", "success");
}, 500);
}
}
});
});
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
gotToLoginAndComeBackHere();
}
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
$obj = $plugin->getDataObject();
$options = _json_decode($obj->withdrawFundsOptions);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Withdraw Funds") . $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">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo __("Withdraw Funds"); ?>
<?php
if ($obj->enableAutoWithdrawFundsPagePaypal) {
?>
<label class="label label-success pull-right"><i class="fab fa-paypal"></i> <?php echo __('Automatic Withdraw'); ?></label>
<?php
}
?>
</div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->withdraw_funds_text ?>
<?php echo AVideoPlugin::getWalletConfigurationHTML(User::getId(), $plugin, $obj); ?>
</div>
<div class="col-sm-6">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->add_funds_success_fail;
break;
case "success":
$text = $obj->add_funds_success_success;
$class = "success";
break;
case "cancel":
$text = $obj->add_funds_success_cancel;
$class = "warning";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
<div class="form-group">
<label for="value"><?php echo __("Specify Amount"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<select class="form-control" id="value" >
<?php
foreach ($options as $value) {
?>
<option value="<?php echo $value; ?>"><?php echo $obj->currency_symbol; ?> <?php echo $value; ?> <?php echo $obj->currency; ?></option>
<?php
}
?>
</select>
</div>
<div class="form-group">
<label for="information"><?php echo __("Information"); ?></label>
<textarea class="form-control" id="information" name="information"></textarea>
</div>
<button class="btn btn-primary btn-block" id="manualWithdrawFundsPageButton">
<i class="fas fa-dollar-sign"></i>
<?php echo $obj->manualWithdrawFundsPageButton; ?>
</button>
</div>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#manualWithdrawFundsPageButton').click(function () {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualWithdrawFunds.json.php',
type: "POST",
data: {
value: $('#value').val(),
information: $('#information').val()
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your request was sent"); ?>", "success");
}, 500);
}
}
});
});
});
</script>
</body>
</html>

View file

@ -1,126 +1,126 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Pending Requests") . $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">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo __("Pending Requests");
?>
</div>
<div class="panel-body">
<div class="row bgWhite list-group-item">
<table id="grid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="user" data-width="150px"><?php echo __("User"); ?></th>
<th data-column-id="valueText" data-width="150px"><?php echo __("Value"); ?></th>
<th data-column-id="description" data-formatter="description" ><?php echo __("Description"); ?></th>
<th data-column-id="status" data-formatter="status" data-width="150px"><?php echo __("Status"); ?></th>
<th data-column-id="created" data-order="desc" data-formatter="created" data-width="150px"><?php echo __("Date"); ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var grid = $("#grid").bootgrid({
labels: {
noResults: "<?php echo __("No results found!"); ?>",
all: "<?php echo __("All"); ?>",
infos: "<?php echo __("Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries"); ?>",
loading: "<?php echo __("Loading..."); ?>",
refresh: "<?php echo __("Refresh"); ?>",
search: "<?php echo __("Search"); ?>",
},
ajax: true,
url: "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/pendingRequests.json.php",
formatters: {
"status": function (column, row) {
var status = "";
status = "<div class=\"btn-group\"><button class='btn btn-success btn-xs command-status-success'>Confirm</button>";
status += "<button class='btn btn-danger btn-xs command-status-canceled'>Cancel</button><div>";
return status;
},
"description": function (column, row) {
if(row.information){
return row.information;
}else{
return row.description;
}
},
"created": function (column, row) {
return '<span class="pendingTimers">'+row.created+'</span>';
}
}
}).on("loaded.rs.jquery.bootgrid", function () {
/* Executes after data is loaded and rendered */
grid.find(".command-status-success").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("success", row.id);
});
grid.find(".command-status-canceled").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("canceled", row.id);
});
createTimer('.pendingTimers');
});
});
function setStatus(status, wallet_log_id) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/changeLogStatus.json.php',
type: "POST",
data: {
status: status,
wallet_log_id: wallet_log_id
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
$("#grid").bootgrid("reload");
}
}
});
}
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isAdmin()) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
exit;
}
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Pending Requests") . $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">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo __("Pending Requests");
?>
</div>
<div class="panel-body">
<div class="row bgWhite list-group-item">
<table id="grid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="user" data-width="150px"><?php echo __("User"); ?></th>
<th data-column-id="valueText" data-width="150px"><?php echo __("Value"); ?></th>
<th data-column-id="description" data-formatter="description" ><?php echo __("Description"); ?></th>
<th data-column-id="status" data-formatter="status" data-width="150px"><?php echo __("Status"); ?></th>
<th data-column-id="created" data-order="desc" data-formatter="created" data-width="150px"><?php echo __("Date"); ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
var grid = $("#grid").bootgrid({
labels: {
noResults: "<?php echo __("No results found!"); ?>",
all: "<?php echo __("All"); ?>",
infos: "<?php echo __("Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries"); ?>",
loading: "<?php echo __("Loading..."); ?>",
refresh: "<?php echo __("Refresh"); ?>",
search: "<?php echo __("Search"); ?>",
},
ajax: true,
url: "<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/pendingRequests.json.php",
formatters: {
"status": function (column, row) {
var status = "";
status = "<div class=\"btn-group\"><button class='btn btn-success btn-xs command-status-success'>Confirm</button>";
status += "<button class='btn btn-danger btn-xs command-status-canceled'>Cancel</button><div>";
return status;
},
"description": function (column, row) {
if(row.information){
return row.information;
}else{
return row.description;
}
},
"created": function (column, row) {
return '<span class="pendingTimers">'+row.created+'</span>';
}
}
}).on("loaded.rs.jquery.bootgrid", function () {
/* Executes after data is loaded and rendered */
grid.find(".command-status-success").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("success", row.id);
});
grid.find(".command-status-canceled").on("click", function (e) {
var row_index = $(this).closest('tr').index();
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
setStatus("canceled", row.id);
});
createTimer('.pendingTimers');
});
});
function setStatus(status, wallet_log_id) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/changeLogStatus.json.php',
type: "POST",
data: {
status: status,
wallet_log_id: wallet_log_id
},
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
$("#grid").bootgrid("reload");
}
}
});
}
</script>
</body>
</html>

View file

@ -1,201 +1,201 @@
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}");
}
$obj = AVideoPlugin::getObjectDataIfEnabled("YPTWallet");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Transfer Funds") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.ui-menu .ui-menu-item {
list-style-image: none !important;
color: #EEE;
font-weight: bolder;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="row">
<div class="row ">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Transfer Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->transfer_funds_text ?>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->transfer_funds_success_fail;
break;
case "success":
$text = $obj->transfer_funds_success_success;
$class = "success";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="value"><?php echo __("Transfer Funds"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<input type="number" name="value" id="value" placeholder="<?php echo __("Total Amount"); ?>">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="users_name"><i class="fa fa-user"></i> <?php echo __("Transfer Funds to"); ?></label>
<input type="text" id="users_name" placeholder="<?php echo __("Username or Email"); ?>">
<input type="hidden" name="users_id" id="users_id">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="input-group">
<span class="input-group-addon"><img src="<?php echo $global['webSiteRootURL']; ?>captcha" id="captcha"></span>
<span class="input-group-addon"><span class="btn btn-xs btn-success" id="btnReloadCapcha"><span class="glyphicon glyphicon-refresh"></span></span></span>
<input name="captcha" placeholder="<?php echo __("Type the code"); ?>" class="form-control" type="text" style="height: 60px;" maxlength="5" id="captchaText">
</div>
</div>
</div>
<div class="row">
<br>
<div class="col-sm-12 text-center">
<button class="btn btn-primary" id="transferNow"><i class="fa fa-exchange" aria-hidden="true"></i> <?php echo __("Transfer now"); ?></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="hidden" id="model">
<div style="background-image: url('{background}'); background-size: cover; height: 50px; width: 100%;" >
<img src="{photo}" class="pull-left img img-responsive img-circle" style="max-height: 40px;" alt="User Photo">
<div class="pull-left">
{identification}
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#btnReloadCapcha').click(function () {
$('#captcha').attr('src', '<?php echo $global['webSiteRootURL']; ?>captcha?' + Math.random());
$('#captchaText').val('');
});
$('#transferNow').click(function () {
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then(function(willDelete) {
if (willDelete) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/transferFunds.json.php',
data: {
"value": $('#value').val(),
"users_id": $('#users_id').val(),
"captcha": $('#captchaText').val()
},
type: 'post',
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Funds successfully transferred"); ?>", "success");
}, 500);
}
}
});
}
});
});
$("#users_name").autocomplete({
minLength: 0,
source: function (req, res) {
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/users.json.php',
type: "POST",
data: {
searchPhrase: req.term
},
success: function (data) {
res(data.rows);
}
});
},
focus: function (event, ui) {
$("#users_name").val(ui.item.identification);
return false;
},
select: function (event, ui) {
$("#users_name").val(ui.item.identification);
$("#users_id").val(ui.item.id);
return false;
}
}).autocomplete("instance")._renderItem = function (ul, item) {
var html = $("#model").html();
html = html.replace(new RegExp("{background}", 'g'), item.background);
html = html.replace(new RegExp("{photo}", 'g'), item.photo);
html = html.replace(new RegExp("{identification}", 'g'), item.identification);
return $("<li>").append(html).appendTo(ul);
};
});
</script>
</body>
</html>
<?php
require_once '../../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
if (!User::isLogged()) {
header("Location: {$global['webSiteRootURL']}");
}
$obj = AVideoPlugin::getObjectDataIfEnabled("YPTWallet");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Transfer Funds") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
.ui-menu .ui-menu-item {
list-style-image: none !important;
color: #EEE;
font-weight: bolder;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="row">
<div class="row ">
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Transfer Funds"); ?></div>
<div class="panel-body">
<div class="col-sm-6">
<?php echo $obj->transfer_funds_text ?>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
<?php
if (!empty($_GET['status'])) {
$text = "unknow";
$class = "danger";
switch ($_GET['status']) {
case "fail":
$text = $obj->transfer_funds_success_fail;
break;
case "success":
$text = $obj->transfer_funds_success_success;
$class = "success";
break;
}
?>
<div class="alert alert-<?php echo $class; ?>">
<?php echo $text; ?>
</div>
<?php
}
?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="value"><?php echo __("Transfer Funds"); ?> <?php echo $obj->currency_symbol; ?> <?php echo $obj->currency; ?></label>
<input type="number" name="value" id="value" placeholder="<?php echo __("Total Amount"); ?>">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="users_name"><i class="fa fa-user"></i> <?php echo __("Transfer Funds to"); ?></label>
<input type="text" id="users_name" placeholder="<?php echo __("Username or Email"); ?>">
<input type="hidden" name="users_id" id="users_id">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="input-group">
<span class="input-group-addon"><img src="<?php echo $global['webSiteRootURL']; ?>captcha" id="captcha"></span>
<span class="input-group-addon"><span class="btn btn-xs btn-success" id="btnReloadCapcha"><span class="glyphicon glyphicon-refresh"></span></span></span>
<input name="captcha" placeholder="<?php echo __("Type the code"); ?>" class="form-control" type="text" style="height: 60px;" maxlength="5" id="captchaText">
</div>
</div>
</div>
<div class="row">
<br>
<div class="col-sm-12 text-center">
<button class="btn btn-primary" id="transferNow"><i class="fa fa-exchange" aria-hidden="true"></i> <?php echo __("Transfer now"); ?></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="hidden" id="model">
<div style="background-image: url('{background}'); background-size: cover; height: 50px; width: 100%;" >
<img src="{photo}" class="pull-left img img-responsive img-circle" style="max-height: 40px;" alt="User Photo">
<div class="pull-left">
{identification}
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#btnReloadCapcha').click(function () {
$('#captcha').attr('src', '<?php echo $global['webSiteRootURL']; ?>captcha?' + Math.random());
$('#captchaText').val('');
});
$('#transferNow').click(function () {
swal({
title: "<?php echo __("Are you sure?"); ?>",
text: "<?php echo __("You will not be able to recover this action!"); ?>",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then(function(willDelete) {
if (willDelete) {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/transferFunds.json.php',
data: {
"value": $('#value').val(),
"users_id": $('#users_id').val(),
"captcha": $('#captchaText').val()
},
type: 'post',
success: function (response) {
$(".walletBalance").text(response.walletBalance);
modal.hidePleaseWait();
if (response.error) {
setTimeout(function () {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}, 500);
} else {
setTimeout(function () {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Funds successfully transferred"); ?>", "success");
}, 500);
}
}
});
}
});
});
$("#users_name").autocomplete({
minLength: 0,
source: function (req, res) {
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/users.json.php',
type: "POST",
data: {
searchPhrase: req.term
},
success: function (data) {
res(data.rows);
}
});
},
focus: function (event, ui) {
$("#users_name").val(ui.item.identification);
return false;
},
select: function (event, ui) {
$("#users_name").val(ui.item.identification);
$("#users_id").val(ui.item.id);
return false;
}
}).autocomplete("instance")._renderItem = function (ul, item) {
var html = $("#model").html();
html = html.replace(new RegExp("{background}", 'g'), item.background);
html = html.replace(new RegExp("{photo}", 'g'), item.photo);
html = html.replace(new RegExp("{identification}", 'g'), item.identification);
return $("<li>").append(html).appendTo(ul);
};
});
</script>
</body>
</html>

View file

@ -6,7 +6,7 @@ if (!isset($global['systemRootPath'])) {
$metaDescription = "About Page";
?>
<!DOCTYPE html>
<html lang="<?php echo $config->getLanguage(); ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("About") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -1,57 +1,57 @@
<?php
global $global, $config, $isChannel;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
$isChannel = 1;
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
session_write_close();
$user_id = isChannel();
$user = new User($user_id);
if ($user->getStatus() === 'i') {
forbiddenPage(__("This user is inactive"));
}
$isMyChannel = $user_id == User::getId();
$channelPassword = User::getProfilePassword($user_id);
if (!empty($channelPassword)) {
forbiddenPage('This channel is password protected', false, $channelPassword);
}
AVideoPlugin::getChannel($user_id, $user);
$channelFluidLayout = true;
// verify the width to match with the old profile bg image
$bgImagePath = $global['systemRootPath'] . $user->getBackgroundURL();
$bgSize = getimagesize($bgImagePath);
if ($bgSize[0] < 2048) {
$channelFluidLayout = false;
}
$metaDescription = " Channel - {$_GET['channelName']}";
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo @$_GET['channelName'] . $config->getPageTitleSeparator() . __("Channel") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'view/channelHead.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?> userChannel">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container<?php echo!empty($channelFluidLayout) ? "-fluid" : ""; ?>">
<?php
include $global['systemRootPath'] . 'view/channelBody.php';
?>
</div>
<?php
//include $global['systemRootPath'] . 'view/include/footer.php';
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixFooter.php';
?>
</body>
</html>
<?php
global $global, $config, $isChannel;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
$isChannel = 1;
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
session_write_close();
$user_id = isChannel();
$user = new User($user_id);
if ($user->getStatus() === 'i') {
forbiddenPage(__("This user is inactive"));
}
$isMyChannel = $user_id == User::getId();
$channelPassword = User::getProfilePassword($user_id);
if (!empty($channelPassword)) {
forbiddenPage('This channel is password protected', false, $channelPassword);
}
AVideoPlugin::getChannel($user_id, $user);
$channelFluidLayout = true;
// verify the width to match with the old profile bg image
$bgImagePath = $global['systemRootPath'] . $user->getBackgroundURL();
$bgSize = getimagesize($bgImagePath);
if ($bgSize[0] < 2048) {
$channelFluidLayout = false;
}
$metaDescription = " Channel - {$_GET['channelName']}";
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo @$_GET['channelName'] . $config->getPageTitleSeparator() . __("Channel") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
include $global['systemRootPath'] . 'view/channelHead.php';
?>
</head>
<body class="<?php echo $global['bodyClass']; ?> userChannel">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container<?php echo!empty($channelFluidLayout) ? "-fluid" : ""; ?>">
<?php
include $global['systemRootPath'] . 'view/channelBody.php';
?>
</div>
<?php
//include $global['systemRootPath'] . 'view/include/footer.php';
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixFooter.php';
?>
</body>
</html>

View file

@ -37,7 +37,7 @@ if (empty($programs)) {
$playListsObj = AVideoPlugin::getObjectData("PlayLists");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Program") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php

View file

@ -1,118 +1,118 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/Channel.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
if (isset($_SESSION['channelName'])) {
_session_start();
unset($_SESSION['channelName']);
}
$totalChannels = Channel::getTotalChannels();
if (!empty($_GET['page'])) {
$_POST['current'] = intval($_GET['page']);
} else {
$_POST['current'] = 1;
}
$users_id_array = VideoStatistic::getUsersIDFromChannelsWithMoreViews();
$current = $_POST['current'];
$_REQUEST['rowCount'] = 10;
$channels = Channel::getChannels(true, "u.id, '" . implode(",", $users_id_array) . "'");
$totalPages = ceil($totalChannels / $_REQUEST['rowCount']);
$metaDescription = __("Channels");
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo __("Channels") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
</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-heading">
<form id="search-form" name="search-form" action="<?php echo $global['webSiteRootURL']; ?>channels" method="get">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="search" name="searchPhrase" class="form-control input-lg" placeholder="<?php echo __("Search Channels"); ?>" value="<?php
echo htmlentities(@$_GET['searchPhrase']);
unsetSearch();
?>" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="submit">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
</form>
</div>
<div class="panel-body" >
<ul class="pages">
</ul>
<?php
foreach ($channels as $value) {
User::getChannelPanel($value['id']);
}
echo getPagination($totalPages, $current, "{$global['webSiteRootURL']}channels?page={page}");
?>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/Channel.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
if (isset($_SESSION['channelName'])) {
_session_start();
unset($_SESSION['channelName']);
}
$totalChannels = Channel::getTotalChannels();
if (!empty($_GET['page'])) {
$_POST['current'] = intval($_GET['page']);
} else {
$_POST['current'] = 1;
}
$users_id_array = VideoStatistic::getUsersIDFromChannelsWithMoreViews();
$current = $_POST['current'];
$_REQUEST['rowCount'] = 10;
$channels = Channel::getChannels(true, "u.id, '" . implode(",", $users_id_array) . "'");
$totalPages = ceil($totalChannels / $_REQUEST['rowCount']);
$metaDescription = __("Channels");
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Channels") . getSEOComplement() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
</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-heading">
<form id="search-form" name="search-form" action="<?php echo $global['webSiteRootURL']; ?>channels" method="get">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="search" name="searchPhrase" class="form-control input-lg" placeholder="<?php echo __("Search Channels"); ?>" value="<?php
echo htmlentities(@$_GET['searchPhrase']);
unsetSearch();
?>" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="submit">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
</form>
</div>
<div class="panel-body" >
<ul class="pages">
</ul>
<?php
foreach ($channels as $value) {
User::getChannelPanel($value['id']);
}
echo getPagination($totalPages, $current, "{$global['webSiteRootURL']}channels?page={page}");
?>
</div>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</html>

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