1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Oinktube/plugin/CustomizeUser/channelMenuRight.php

28 lines
No EOL
1 KiB
PHP

<?php
if (!empty($_SESSION['channelName'])) {
unset($_GET['channelName']);
$params = array_merge($_GET, array('leaveChannel' => '1'));
$_GET['channelName'] = $_SESSION['channelName'];
$new_query_string = http_build_query($params);
$request_uri = explode("?", $_SERVER['REQUEST_URI']);
$leaveLink = $request_uri[0] . '?' . $new_query_string;
if(!empty($obj->showLeaveChannelButton)){
?>
<li>
<a href="<?php echo $leaveLink; ?>" class="btn btn-default navbar-btn" data-toggle="tooltip" title="<?php echo __("Leave Channel"); ?>" data-placement="bottom" >
<span class="fa fa-times"></span> <span class="hidden-md hidden-sm hidden-mdx"><?php echo $_GET['channelName']; ?></span>
</a>
</li>
<?php
}
?>
<script>
$('#mainNavbarLogo').on('click', function (e) {
e.preventDefault();
var url = $(this).attr("href");
document.location = url+'?leaveChannel=1';
});
</script>
<?php
}
?>