mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
15 lines
436 B
PHP
15 lines
436 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
global $global, $config;
|
|
if (!isset($global['systemRootPath'])) {
|
|
require_once '../videos/configuration.php';
|
|
}
|
|
require_once $global['systemRootPath'] . 'objects/user.php';
|
|
if (!User::isAdmin()) {
|
|
die('{"error":"' . __("Permission denied") . '"}');
|
|
}
|
|
|
|
$config = new Configuration();
|
|
$config->setTheme($_POST['theme']);
|
|
|
|
echo '{"status":"' . $config->save() . '"}';
|