1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Vinzenz Hersche 2018-06-06 20:16:53 +02:00
parent a2c603e26f
commit a11ae23eee
9 changed files with 37 additions and 49 deletions

View file

@ -1,6 +1,12 @@
<?php <?php
global $global, $config; global $global, $config;
ini_set('error_log', $global['systemRootPath'].'videos/youphptube.log'); ini_set('error_log', $global['systemRootPath'].'videos/youphptube.log');
if (!file_exists('videos/configuration.php')) {
if (!file_exists('install/index.php')) {
die("No Configuration and no Installation");
}
header("Location: install/index.php");
}
require_once 'objects/simple-php-router/vendor/autoload.php'; require_once 'objects/simple-php-router/vendor/autoload.php';
require_once 'videos/configuration.php'; require_once 'videos/configuration.php';
require_once 'objects/configuration.php'; require_once 'objects/configuration.php';
@ -10,9 +16,6 @@ $config = new Configuration();
SimpleRouter::get($basePath, function() { SimpleRouter::get($basePath, function() {
require_once "view/index.php"; require_once "view/index.php";
}); });
SimpleRouter::get($basePath, function() {
require_once "view/index.php";
});
SimpleRouter::get($basePath."info", function() { SimpleRouter::get($basePath."info", function() {
require_once "view/info.php"; require_once "view/info.php";
}); });

View file

@ -179,7 +179,7 @@ if (!empty($videos)) {
<script> <script>
function loadPlayLists<?php echo $video['id']; ?>() { function loadPlayLists<?php echo $video['id']; ?>() {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>playLists.json', url: '<?php echo $global['webSiteRootURL']; ?>objects/playlists.json.php',
success: function (response) { success: function (response) {
$('#searchlist<?php echo $video['id']; ?>').html(''); $('#searchlist<?php echo $video['id']; ?>').html('');
for (var i in response) { for (var i in response) {
@ -228,7 +228,7 @@ if (!empty($videos)) {
$('#addPlayList<?php echo $video['id']; ?>').click(function () { $('#addPlayList<?php echo $video['id']; ?>').click(function () {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>addNewPlayList', url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
method: 'POST', method: 'POST',
data: { data: {
'videos_id': <?php echo $video['id']; ?>, 'videos_id': <?php echo $video['id']; ?>,

View file

@ -1,12 +1,8 @@
<?php <?php
if (!file_exists('../videos/configuration.php')) { global $global, $config;
if (!file_exists('../install/index.php')) { if(!isset($global['systemRootPath'])){
die("No Configuration and no Installation"); require_once '../videos/configuration.php';
}
header("Location: install/index.php");
} }
require_once '../videos/configuration.php';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>"> <html lang="<?php echo $_SESSION['language']; ?>">
@ -16,17 +12,17 @@ require_once '../videos/configuration.php';
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
?> ?>
<link href="<?php echo $global['webSiteRootURL']; ?>plugin/FBTube/view/style.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>plugin/FBTube/view/style.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo $global['webSiteRootURL']; ?>js/video.js/video-js.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>view/js/video.js/video-js.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo $global['webSiteRootURL']; ?>plugin/FBTube/view/player.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>plugin/FBTube/view/player.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo $global['webSiteRootURL']; ?>css/social.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>view/css/social.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo $global['webSiteRootURL']; ?>js/video.js/video.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/js/video.js/video.js" type="text/javascript"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/videojs-rotatezoom/videojs.zoomrotate.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/js/videojs-rotatezoom/videojs.zoomrotate.js" type="text/javascript"></script>
<link href="<?php echo $global['webSiteRootURL']; ?>js/webui-popover/jquery.webui-popover.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>view/js/webui-popover/jquery.webui-popover.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo $global['webSiteRootURL']; ?>js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo $global['webSiteRootURL']; ?>view/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo $global['webSiteRootURL']; ?>js/videojs-persistvolume/videojs.persistvolume.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/view/js/videojs-persistvolume/videojs.persistvolume.js" type="text/javascript"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/webui-popover/jquery.webui-popover.min.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/js/webui-popover/jquery.webui-popover.min.js" type="text/javascript"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/bootstrap-list-filter/bootstrap-list-filter.min.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/js/bootstrap-list-filter/bootstrap-list-filter.min.js" type="text/javascript"></script>
<script src="<?php echo $global['webSiteRootURL']; ?>js/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> <script src="<?php echo $global['webSiteRootURL']; ?>view/js/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script> <script>
/*** Handle jQuery plugin naming conflict between jQuery UI and Bootstrap ***/ /*** Handle jQuery plugin naming conflict between jQuery UI and Bootstrap ***/
$.widget.bridge('uibutton', $.ui.button); $.widget.bridge('uibutton', $.ui.button);

View file

@ -1,9 +1,7 @@
<?php <?php
if (!file_exists('../videos/configuration.php')) { global $global, $config;
if (!file_exists('../install/index.php')) { if(!isset($global['systemRootPath'])){
die("No Configuration and no Installation"); require_once '../videos/configuration.php';
}
header("Location: install/index.php");
} }
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,11 +1,8 @@
<?php <?php
if (! file_exists('../videos/configuration.php')) { global $global, $config;
if (! file_exists('../install/index.php')) { if(!isset($global['systemRootPath'])){
die("No Configuration and no Installation"); require_once '../videos/configuration.php';
}
header("Location: install/index.php");
} }
require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video.php'; require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/category.php'; require_once $global['systemRootPath'] . 'objects/category.php';

View file

@ -17,7 +17,7 @@ function isFlickityEnabled(selector){
function loadPlayLists() { function loadPlayLists() {
$.ajax({ $.ajax({
url: webSiteRootURL + 'playLists.json', url: webSiteRootURL + 'objects/playlists.json.php',
success: function (response) { success: function (response) {
$('#searchlist').html(''); $('#searchlist').html('');
for (var i in response) { for (var i in response) {
@ -137,7 +137,7 @@ $(function () {
$('#addPlayList').click(function () { $('#addPlayList').click(function () {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: webSiteRootURL + 'addNewPlayList', url: webSiteRootURL + 'objects/playlistAddNew.json.php',
method: 'POST', method: 'POST',
data: { data: {
'videos_id': videos_id, 'videos_id': videos_id,

View file

@ -104,7 +104,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
}); });
function refreshSubCategoryList(){ function refreshSubCategoryList(){
$.getJSON( "<?php echo $global['webSiteRootURL'] . "categories.json"; ?>", function( data ) { $.getJSON( "<?php echo $global['webSiteRootURL'] . "objects/categories.json.php"; ?>", function( data ) {
var tmpHtml = "<option value='0' ><?php echo __("None (Parent)"); ?></option>"; var tmpHtml = "<option value='0' ><?php echo __("None (Parent)"); ?></option>";
fullCatList = data; fullCatList = data;
$.each( data.rows, function( key, val ) { $.each( data.rows, function( key, val ) {
@ -132,7 +132,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
search: "<?php echo __("Search"); ?>", search: "<?php echo __("Search"); ?>",
}, },
ajax: true, ajax: true,
url: "<?php echo $global['webSiteRootURL'] . "categories.json"; ?>", url: "<?php echo $global['webSiteRootURL'] . "objects/categories.json.php"; ?>",
formatters: { formatters: {
"nextVideoOrder": function(column, row){ "nextVideoOrder": function(column, row){
if(row.nextVideoOrder==0){ if(row.nextVideoOrder==0){
@ -217,7 +217,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: 'deleteCategory', url: '<?php echo $global['webSiteRootURL'] . "objects/categoryDelete.json.php"; ?>',
data: {"id": row.id}, data: {"id": row.id},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -262,7 +262,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
evt.preventDefault(); evt.preventDefault();
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: 'addNewCategory', url: '<?php echo $global['webSiteRootURL'] . "objects/categoryAddNew.json.php"; ?>',
data: {"id": $('#inputCategoryId').val(), "name": $('#inputName').val(), "clean_name": $('#inputCleanName').val(),"description": $('#inputDescription').val(),"nextVideoOrder": $('#inputNextVideoOrder').val(),"parentId": $('#inputParentId').val(),"type": $('#inputType').val(), "iconClass": $(".iconCat i").attr("class")}, data: {"id": $('#inputCategoryId').val(), "name": $('#inputName').val(), "clean_name": $('#inputCleanName').val(),"description": $('#inputDescription').val(),"nextVideoOrder": $('#inputNextVideoOrder').val(),"parentId": $('#inputParentId').val(),"type": $('#inputType').val(), "iconClass": $(".iconCat i").attr("class")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -436,7 +436,7 @@ require_once $global['systemRootPath'] . 'objects/plugin.php';
var row = $("#grid").bootgrid("getCurrentRows")[row_index]; var row = $("#grid").bootgrid("getCurrentRows")[row_index];
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: 'switchPlugin', url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginSwitch.json.php',
data: {"uuid": row.uuid, "name": row.name, "dir": row.dir, "enable": $('#enable' + row.uuid).is(":checked")}, data: {"uuid": row.uuid, "name": row.name, "dir": row.dir, "enable": $('#enable' + row.uuid).is(":checked")},
type: 'post', type: 'post',
success: function (response) { success: function (response) {
@ -461,7 +461,7 @@ require_once $global['systemRootPath'] . 'objects/plugin.php';
$('#inputData').val(JSON.stringify(row.data_object)); $('#inputData').val(JSON.stringify(row.data_object));
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: 'runDBScriptPlugin.json', url: '<?php echo $global['webSiteRootURL']; ?>objects/pluginRunDatabaseScript.json.php',
data: {"name": row.name}, data: {"name": row.name},
type: 'post', type: 'post',
success: function (response) { success: function (response) {

View file

@ -3,12 +3,6 @@ global $global, $config;
if(!isset($global['systemRootPath'])){ if(!isset($global['systemRootPath'])){
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
} }
if ((!file_exists('videos/configuration.php')) && (empty($global['systemRootPath']))) {
if (!file_exists('install/index.php')) {
die("No Configuration and no Installation");
}
header("Location: install/index.php");
}
session_write_close(); session_write_close();
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/category.php'; require_once $global['systemRootPath'] . 'objects/category.php';
@ -305,7 +299,7 @@ $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
<script> <script>
function loadPlayLists() { function loadPlayLists() {
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>playLists.json', url: '<?php echo $global['webSiteRootURL']; ?>objects/playlists.json.php',
success: function (response) { success: function (response) {
$('#searchlist').html(''); $('#searchlist').html('');
for (var i in response) { for (var i in response) {
@ -358,7 +352,7 @@ $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
$('#addPlayList').click(function () { $('#addPlayList').click(function () {
modal.showPleaseWait(); modal.showPleaseWait();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>addNewPlayList', url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
method: 'POST', method: 'POST',
data: { data: {
'videos_id': <?php echo $video['id']; ?>, 'videos_id': <?php echo $video['id']; ?>,