1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
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
global $global, $config;
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 'videos/configuration.php';
require_once 'objects/configuration.php';
@ -10,9 +16,6 @@ $config = new Configuration();
SimpleRouter::get($basePath, function() {
require_once "view/index.php";
});
SimpleRouter::get($basePath, function() {
require_once "view/index.php";
});
SimpleRouter::get($basePath."info", function() {
require_once "view/info.php";
});

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -104,7 +104,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
});
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>";
fullCatList = data;
$.each( data.rows, function( key, val ) {
@ -132,7 +132,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
search: "<?php echo __("Search"); ?>",
},
ajax: true,
url: "<?php echo $global['webSiteRootURL'] . "categories.json"; ?>",
url: "<?php echo $global['webSiteRootURL'] . "objects/categories.json.php"; ?>",
formatters: {
"nextVideoOrder": function(column, row){
if(row.nextVideoOrder==0){
@ -217,7 +217,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
modal.showPleaseWait();
$.ajax({
url: 'deleteCategory',
url: '<?php echo $global['webSiteRootURL'] . "objects/categoryDelete.json.php"; ?>',
data: {"id": row.id},
type: 'post',
success: function (response) {
@ -262,7 +262,7 @@ require_once $global['systemRootPath'] . 'objects/category.php'; ?>
evt.preventDefault();
modal.showPleaseWait();
$.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")},
type: 'post',
success: function (response) {

View file

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

View file

@ -3,12 +3,6 @@ global $global, $config;
if(!isset($global['systemRootPath'])){
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();
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/category.php';
@ -305,7 +299,7 @@ $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
<script>
function loadPlayLists() {
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>playLists.json',
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlists.json.php',
success: function (response) {
$('#searchlist').html('');
for (var i in response) {
@ -358,7 +352,7 @@ $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
$('#addPlayList').click(function () {
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>addNewPlayList',
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
method: 'POST',
data: {
'videos_id': <?php echo $video['id']; ?>,