mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Minor code style patch.
This commit is contained in:
parent
8108fc1e68
commit
172fa35b49
15 changed files with 72 additions and 79 deletions
|
@ -11,16 +11,16 @@
|
|||
<hr>
|
||||
<div class="alert alert-info">
|
||||
<i class="fas fa-info-circle"></i> As a database increases in size full database backups take more time to complete, and require more storage space. please be patience
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="alert alert-info">
|
||||
<h2><i class="fas fa-undo"></i> Prevent Data Loss</h2>
|
||||
Backing up your video files and databases, running test restores procedures on your backups, and storing copies of backups in a safe, off-site location protects you from potentially catastrophic data loss. Backing up is the only way to protect your data.
|
||||
<br> We can help you with this task,
|
||||
<br> We can help you with this task,
|
||||
<a class="btn btn-info btn-sm btn-xs" href="https://www.avideo.com/plugins/">Buy our Backup Plugin Now</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<div class="alert alert-info">
|
||||
<i class="fas fa-info-circle"></i> This Plugin helps you to clone your video site, it is really helpful for backup routines, load balance, etc.<br>
|
||||
You May find some help how to use Clone Plugin <a target="_blank" href="https://github.com/WWBN/AVideo/wiki/Clone-Site-Plugin">here</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$filter = array(
|
||||
'cloneSiteURL' => 'Place here the URL of the site you want to clone');
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?php
|
||||
include './customize_settings_native.php';
|
||||
include './customize_settings_plugin.php';
|
||||
?>
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
global $global, $config;
|
||||
if(!isset($global['systemRootPath'])){
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../videos/configuration.php';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="alert alert-info">
|
||||
Truly customize your AVideo and create a more professional video sharing site experience for your visitors by removing or replacing the footer, about page and Meta Description with your own.
|
||||
<a class="btn btn-info btn-sm btn-xs" href="https://www.avideo.com/plugins/">Buy the Customize plugin now</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -13,8 +13,8 @@ $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
|
|||
</div>
|
||||
</div>
|
||||
<div class="panel-body" style="padding: 0;">
|
||||
<iframe fameBorder="0"
|
||||
src="<?php echo $global['webSiteRootURL']; ?>plugin/PlayerSkins/playerSample.php"
|
||||
<iframe fameBorder="0"
|
||||
src="<?php echo $global['webSiteRootURL']; ?>plugin/PlayerSkins/playerSample.php"
|
||||
style="width: 100%; height: 300px; border: 0;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,8 +35,8 @@ $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/';
|
|||
</div>
|
||||
</div>
|
||||
<div class="panel-body" style="padding: 0;">
|
||||
<iframe fameBorder="0"
|
||||
src="<?php echo $global['webSiteRootURL']; ?>plugin/PlayerSkins/playerSample.php?playerSkin=<?php echo ($fileEx); ?>"
|
||||
<iframe fameBorder="0"
|
||||
src="<?php echo $global['webSiteRootURL']; ?>plugin/PlayerSkins/playerSample.php?playerSkin=<?php echo ($fileEx); ?>"
|
||||
style="width: 100%; height: 300px; border: 0;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
function createTable($pluginName, $filter = array()){
|
||||
function createTable($pluginName, $filter = array()) {
|
||||
$plugin = AVideoPlugin::getObjectData($pluginName);
|
||||
if(empty($filter)){
|
||||
if (empty($filter)) {
|
||||
foreach ($plugin as $keyJson => $valueJson) {
|
||||
$filter[$keyJson] = " ";
|
||||
}
|
||||
|
@ -15,13 +15,13 @@ function createTable($pluginName, $filter = array()){
|
|||
$pluginsList = array();
|
||||
if (!AVideoPlugin::exists($pluginName)) {
|
||||
echo "<tr><td colspan='2'> Sorry you do not have the plugin </td></tr>";
|
||||
}else{
|
||||
if(!empty($plugin)){
|
||||
} else {
|
||||
if (!empty($plugin)) {
|
||||
$form = jsonToFormElements($plugin,$filter);
|
||||
//var_dump($form);
|
||||
echo implode("", $form);
|
||||
}
|
||||
|
||||
|
||||
echo "<tr><td colspan='2'> <button class='btn btn-block btn-primary'><i class='fa fa-save'></i> Save</button> </td></tr>";
|
||||
}
|
||||
echo '</table></form>';
|
||||
|
@ -63,9 +63,9 @@ function jsonToFormElements($json, $filter = array()) {
|
|||
}
|
||||
|
||||
function getPluginSwitch($pluginName) {
|
||||
if(!AVideoPlugin::exists($pluginName)){
|
||||
$input = '<a href="https://www.avideo.com/plugins/" class="btn btn-danger btn-sm btn-xs">Buy this plugin now</a>';
|
||||
}else{
|
||||
if (!AVideoPlugin::exists($pluginName)) {
|
||||
$input = '<a href="https://www.avideo.com/plugins/" class="btn btn-danger btn-sm btn-xs">Buy this plugin now</a>';
|
||||
} else {
|
||||
$plugin = AVideoPlugin::loadPluginIfEnabled($pluginName);
|
||||
$pluginForced = AVideoPlugin::loadPlugin($pluginName);
|
||||
$id = uniqid();
|
||||
|
|
|
@ -244,7 +244,7 @@ switch ($_GET['page']) {
|
|||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -264,9 +264,9 @@ switch ($_GET['page']) {
|
|||
} else {
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
Please forgive us for bothering you, but unfortunately you do not have this plugin yet. But do not hesitate to purchase it in our online store
|
||||
Please forgive us for bothering you, but unfortunately you do not have this plugin yet. But do not hesitate to purchase it in our online store
|
||||
<a class="btn btn-danger" href="https://www.avideo.com/plugins/">Plugin Store</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
@ -276,9 +276,9 @@ switch ($_GET['page']) {
|
|||
} else {
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
Please forgive us for bothering you, but unfortunately you do not have this plugin yet. But do not hesitate to purchase it in our online store
|
||||
Please forgive us for bothering you, but unfortunately you do not have this plugin yet. But do not hesitate to purchase it in our online store
|
||||
<a class="btn btn-danger" href="https://www.avideo.com/plugins/">Plugin Store</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
@ -324,6 +324,3 @@ switch ($_GET['page']) {
|
|||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="panel-heading"><?php echo __('Live') ?> <div class="pull-right"><?php echo getPluginSwitch('Live'); ?></div></div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
|
||||
|
||||
createTable("Live");
|
||||
?>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
<div class="panel-heading"><?php echo __('Live Chat') ?> <div class="pull-right"><?php echo getPluginSwitch('LiveChat'); ?></div></div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
|
||||
|
||||
createTable("LiveChat");
|
||||
?>
|
||||
|
||||
|
@ -28,10 +28,10 @@
|
|||
<div class="panel-heading"><?php echo __('Live Users') ?> <div class="pull-right"><?php echo getPluginSwitch('LiveUsers'); ?></div></div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
|
||||
|
||||
$filter = array(
|
||||
'doNotDisplayCounter' => 'It will collect usage info but will not display the counter on the live video');
|
||||
|
||||
|
||||
createTable("LiveUsers",$filter);
|
||||
?>
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
<div class="panel-heading"><?php echo __('Live Links') ?> <div class="pull-right"><?php echo getPluginSwitch('LiveLinks'); ?></div></div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
|
||||
|
||||
createTable("LiveLinks");
|
||||
?>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo __("Email All Users"); ?></div>
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">
|
||||
Sent only to this email:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
$filter = array(
|
||||
'rewardPerView' => 'How much will your users receive per each video view',
|
||||
'rewardOnlyLoggedUsersView' => 'Check this to allow only count rewards from logged users');
|
||||
|
||||
|
||||
createTable("MonetizeUsers",$filter);
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
global $global, $config;
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
|
@ -30,9 +29,9 @@ $pluginDB = Plugin::getPluginByName($pluginName);
|
|||
|
||||
foreach ($pluginDO as $key => $value) {
|
||||
if (isset($pluginValues[$key])) {
|
||||
if(is_bool($pluginDO->$key)){
|
||||
if (is_bool($pluginDO->$key)) {
|
||||
$pluginDO->$key = empty($pluginValues[$key])?false:true;
|
||||
}else{
|
||||
} else {
|
||||
//$pluginDO->$key = str_replace('"', '\\"', $pluginValues[$key]);
|
||||
$pluginDO->$key = $pluginValues[$key];
|
||||
}
|
||||
|
@ -44,6 +43,6 @@ $p->setObject_data(json_encode($pluginDO));
|
|||
|
||||
$obj = new stdClass();
|
||||
$obj->save = $p->save();
|
||||
if($obj->save === false) error_log("[ERROR] Error saving plugin $pluginName data. Maybe plugin is not enabled?");
|
||||
if ($obj->save === false) error_log("[ERROR] Error saving plugin $pluginName data. Maybe plugin is not enabled?");
|
||||
|
||||
echo (json_encode($obj));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
global $global, $config;
|
||||
if(!isset($global['systemRootPath'])){
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../videos/configuration.php';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
if (isset($_GET['getLanguage'])) {
|
||||
|
||||
if(isset($_GET['getLanguage'])) {
|
||||
$lngFile = './'.strtolower(str_replace(['.', '/', '\\'], '', $_GET['getLanguage'])).'.php';
|
||||
if (!file_exists($lngFile)) {
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
exit;
|
||||
}
|
||||
|
||||
$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;
|
||||
require_once($lngFile);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
|
||||
$vars = array();
|
||||
|
@ -78,37 +77,37 @@ sort($vars);
|
|||
$("#navBarFlag2").flagStrap({
|
||||
inputName: 'country2',
|
||||
buttonType: "btn-default navbar-btn",
|
||||
onSelect: function(value, element) {
|
||||
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');
|
||||
}
|
||||
});
|
||||
onSelect: function(value, element) {
|
||||
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());
|
||||
});
|
||||
tb1.scroll(function() {
|
||||
tb2.scrollTop(tb1.scrollTop());
|
||||
});
|
||||
|
||||
|
||||
}).fail(function(){
|
||||
console.log("New translation");
|
||||
tb1.scroll(function() {
|
||||
}).fail(function(){
|
||||
console.log("New translation");
|
||||
tb1.scroll(function() {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -336,4 +336,4 @@ $t['Site Settings'] = "Website Instellingen";
|
|||
$t['Social Login Settings'] = "Social Inlog Instellingen";
|
||||
$t['Upload a File'] = "Bestand Uploaden";
|
||||
$t['Want to subscribe to this channel?'] = "Wilt u zich op dit kanaal abonneren?";
|
||||
$t['Warning'] = "Let op";
|
||||
$t['Warning'] = "Let op";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
|
@ -22,7 +21,7 @@ if (!is_writable($dir)) {
|
|||
}
|
||||
$file = $dir.strtolower($_POST['flag']).".php";
|
||||
$myfile = fopen($file, "w") or die("Unable to open file!");
|
||||
if(!$myfile){
|
||||
if (!$myfile) {
|
||||
$obj->status = 0;
|
||||
$obj->error = __("Unable to open file!");
|
||||
die(json_encode($obj));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue