1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/plugin/YouPHPFlix2/channelToYouPHPFlix2.json.php
Daniel Neto 64aac53ada Improve video sort parameters
the flix layour can now add specific channels
2024-03-19 13:51:29 -03:00

32 lines
669 B
PHP

<?php
require_once '../../videos/configuration.php';
header('Content-Type: application/json');
$resp = new stdClass();
$resp->error = true;
$resp->msg = "";
$resp->users_id = intval($_REQUEST['users_id']);
$resp->add = intval($_REQUEST['add']);
if (empty($resp->users_id)) {
forbiddenPage('User is empty');
}
if (!User::isAdmin()) {
forbiddenPage('Admin only');
}
$plugin = AVideoPlugin::loadPluginIfEnabled('YouPHPFlix2');
if (empty($plugin)) {
forbiddenPage('YouPHPFlix2 not enabled');
}
$resp->response = YouPHPFlix2::setAddChannelToYouPHPFlix2($resp->users_id, $resp->add);
$resp->error = empty($resp->response);
die(json_encode($resp));