diff --git a/admin/customize_settings_native.php b/admin/customize_settings_native.php index eda698a875..c64b8d1a09 100644 --- a/admin/customize_settings_native.php +++ b/admin/customize_settings_native.php @@ -107,7 +107,7 @@ logoImgBase64 = resp; $.ajax({ - url: 'admin/customize_settings_nativeUpdate.json.php', + url: webSiteRootURL+'admin/customize_settings_nativeUpdate.json.php', data: { "logoImgBase64": logoImgBase64, "webSiteTitle": $('#inputWebSiteTitle').val(), diff --git a/admin/design_first_page.php b/admin/design_first_page.php index bcce93ad0e..9b543ae322 100644 --- a/admin/design_first_page.php +++ b/admin/design_first_page.php @@ -95,27 +95,27 @@ $delay = 0.5; modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": 'default'}, type: 'post', success: function (response) { @@ -142,27 +142,27 @@ $delay = 0.5; modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": true}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": 'netflix'}, type: 'post', success: function (response) { @@ -189,27 +189,27 @@ $delay = 0.5; modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": true}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": 'default'}, type: 'post', success: function (response) { @@ -236,27 +236,27 @@ $delay = 0.5; modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": true}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": 'default'}, type: 'post', success: function (response) { @@ -285,27 +285,27 @@ $delay = 0.5; modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "a06505bf-3570-4b1f-977a-fd0e5cab205d", "name": "Gallery", "dir": "Gallery", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e3a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "YouPHPFlix2", "dir": "YouPHPFlix2", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "youu05bf-3570-4b1f-977a-fd0e5cabtube", "name": "YouTube", "dir": "YouTube", "enable": false}, type: 'post', success: function (response) { $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "channel-first-page-977a-fd0e5cab205d", "name": "FirstPageChannelList", "dir": "FirstPageChannelList", "enable": true}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": 'default'}, type: 'post', success: function (response) { diff --git a/admin/design_player.php b/admin/design_player.php index 1b7ca80cf9..75f2af77bc 100644 --- a/admin/design_player.php +++ b/admin/design_player.php @@ -53,12 +53,12 @@ $delay = 0.2; $('.playerSwitch').not(this).prop('checked', false); var skin = $(this).val(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": "e9a568e6-ef61-4dcc-aad0-0109e9be8e36", "name": "PlayerSkins", "dir": "PlayerSkins", "enable": true}, type: 'post', success: function (response) { $.ajax({ - url: 'admin/playerUpdate.json.php', + url: webSiteRootURL+'admin/playerUpdate.json.php', data: {"skin": skin}, type: 'post', success: function (response) { diff --git a/admin/design_themes.php b/admin/design_themes.php index 88701290ab..9d79efcb52 100644 --- a/admin/design_themes.php +++ b/admin/design_themes.php @@ -41,7 +41,7 @@ modal.showPleaseWait(); $('.themeSwitch').not(this).prop('checked', false); $.ajax({ - url: 'admin/themeUpdate.json.php', + url: webSiteRootURL+'admin/themeUpdate.json.php', data: {"theme": $(this).val()}, type: 'post', success: function (response) { diff --git a/admin/index.php b/admin/index.php index ad529f1495..011d59cd45 100644 --- a/admin/index.php +++ b/admin/index.php @@ -358,7 +358,7 @@ switch ($_GET['page']) { e.preventDefault(); modal.showPleaseWait(); $.ajax({ - url: 'admin/save.json.php', + url: webSiteRootURL+'admin/save.json.php', data: $(this).serialize(), type: 'post', success: function (response) { @@ -369,7 +369,7 @@ switch ($_GET['page']) { $('.pluginSwitch').change(function (e) { modal.showPleaseWait(); $.ajax({ - url: 'objects/pluginSwitch.json.php', + url: webSiteRootURL+'objects/pluginSwitch.json.php', data: {"uuid": $(this).attr('uuid'), "name": $(this).attr('name'), "dir": $(this).attr('name'), "enable": $(this).is(":checked")}, type: 'post', success: function (response) { diff --git a/admin/mail_all_users.php b/admin/mail_all_users.php index a362b1e85f..4efd06dabe 100644 --- a/admin/mail_all_users.php +++ b/admin/mail_all_users.php @@ -50,7 +50,7 @@ modal.showPleaseWait(); $("#emailMessage").val(tinymce.get('emailMessage').getContent()); $.ajax({ - url: 'objects/emailAllUsers.json.php', + url: webSiteRootURL+'objects/emailAllUsers.json.php', method: 'POST', data: { 'message': $('#emailMessage').val(), diff --git a/locale/index.php b/locale/index.php index fba39d543d..10a79b7d57 100644 --- a/locale/index.php +++ b/locale/index.php @@ -8,17 +8,17 @@ if (isset($_GET['getLanguage'])) { require_once($lngFile); foreach ($t as $key => $value) { - if(empty($value)){ + if (empty($value)) { $t[$key] = $key; } } - if(!empty($_REQUEST['print'])){ + if (!empty($_REQUEST['print'])) { header('Content-Type: text/plain'); foreach ($t as $key => $value) { - echo $value.PHP_EOL; + echo $value . PHP_EOL; } - }else{ + } else { header('Content-Type: application/json'); echo json_encode($t); } @@ -34,178 +34,162 @@ if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) { } $vars = listAllWordsToTranslate(); +$_page = new Page(array('Translate AVideo')); ?> - - -
- - - - + +chown www-data:www-data locale && sudo chmod -R 755 locale
-