1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/view/user.php
DanieL 73e602261b ROKU JSON from playlists
Option for each user can select what playlist newly encoded videos will be automatically added
2022-09-05 17:20:10 -03:00

108 lines
5 KiB
PHP

<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/user.php';
if (User::isLogged()) {
redirectIfRedirectUriIsSet();
}
$tags = User::getTags(User::getId());
$tagsStr = '';
foreach ($tags as $value) {
$tagsStr .= "<span class=\"label label-{$value->type} fix-width\">{$value->text}</span>";
}
//$json_file = url_get_contents("{$global['webSiteRootURL']}plugin/CustomizeAdvanced/advancedCustom.json.php");
// convert the string to a json object
//$advancedCustom = _json_decode($json_file);
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("My Account") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
?>
<link href="<?php echo getURL('node_modules/croppie/croppie.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('node_modules/croppie/croppie.min.js'); ?>" type="text/javascript"></script>
<link href="<?php echo getURL('view/js/bootstrap-fileinput/css/fileinput.min.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('view/js/bootstrap-fileinput/js/fileinput.min.js'); ?>" type="text/javascript"></script>
<link href="<?php echo getURL('view/css/bodyFadein.css'); ?>" rel="stylesheet" type="text/css"/>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
<div class="container-fluid">
<?php
if (User::isLogged()) {
$user = new User("");
$user->loadSelfUser();
if (!empty($_REQUEST['basicInfoOnly'])) {
include $global['systemRootPath'] . './view/userBasicInfo.php';
} else {
?>
<div class="row">
<div>
<div class="panel panel-default" id="userTabsPanel">
<div class="panel-heading tabbable-line">
<div class="pull-right">
<?php echo $tagsStr; ?>
</div>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#basicInfo" id="aBasicInfo"><?php echo __("Basic Info") ?></a></li>
<?php if (empty($advancedCustomUser->disablePersonalInfo)) { ?>
<li><a data-toggle="tab" href="#personalInfo" id="aPersonalInfo"><?php echo __("Personal Info") ?></a></li>
<?php } ?>
<?php echo AVideoPlugin::profileTabName($user->getId()); ?>
</ul>
</div>
<div class="panel-body">
<div class="tab-content">
<div id="basicInfo" class="tab-pane fade in active" style="padding: 10px 0;">
<?php include $global['systemRootPath'] . './view/userBasicInfo.php'; ?>
</div>
<?php if (empty($advancedCustomUser->disablePersonalInfo)) { ?>
<div id="personalInfo" class="tab-pane fade" style="padding: 10px 0;">
<?php
include $global['systemRootPath'] . './view/userPersonalInfo.php';
?>
</div>
<?php } ?>
<?php echo AVideoPlugin::profileTabContent($user->getId()); ?>
</div>
</div>
</div>
</div>
</div>
<?php
}
} else {
include $global['systemRootPath'] . './view/userLogin.php';
}
?>
</div><!--/.container-->
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
<?php
if (!empty($_REQUEST['tab'])) {
$tab = preg_replace('/[^a-z0-9_-]/i', '', $_REQUEST['tab']);
?>
$('#userTabsPanel a[href="#<?php echo $tab; ?>"]').trigger('click');
<?php
}
?>
});
</script>
</body>
</html>