1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Update logoff

This commit is contained in:
Daniel 2022-11-24 18:24:54 -03:00
parent bf29c081fa
commit d6f2fcf5f7
4 changed files with 14 additions and 3 deletions

View file

@ -57,7 +57,7 @@ if (empty($advancedCustomUser->doNotShowRightProfile) && (User::isLogged() || em
if (!$advancedCustomUser->disableSignOutButton) {
?>
<li>
<a href="<?php echo $global['webSiteRootURL']; ?>logoff" >
<a href="#" onclick="avideoLogoff();" >
<?php
if (!empty($_COOKIE['user']) && !empty($_COOKIE['pass'])) {
?>

View file

@ -4,7 +4,7 @@ if (!empty($advancedCustomUser->signInOnRight)) {
if (!$advancedCustomUser->disableSignOutButton) {
?>
<li>
<a class="btn navbar-btn btn-default" href="<?php echo $global['webSiteRootURL']; ?>logoff">
<a class="btn navbar-btn btn-default" href="#" onclick="avideoLogoff();" >
<?php
if (!empty($_COOKIE['user']) && !empty($_COOKIE['pass'])) {
?>

View file

@ -74,7 +74,7 @@
if (!$advancedCustomUser->disableSignOutButton) {
?>
<div>
<a href="<?php echo $global['webSiteRootURL']; ?>logoff" class="btn btn-default btn-block" >
<a href="#" onclick="avideoLogoff();" class="btn btn-default btn-block" >
<?php
if (!empty($_COOKIE['user']) && !empty($_COOKIE['pass'])) {
?>

View file

@ -3670,3 +3670,14 @@ function addScript(src) {
}
}
}
function avideoLogoff(){
sendAVideoMobileLiveStreamerMessage('logoff', '');
document.location = webSiteRootURL+'logoff';
}
function sendAVideoMobileLiveStreamerMessage(type, value){
if(window.AVideoMobileLiveStreamer){
window.AVideoMobileLiveStreamer.postMessage({type:type, value:value});
}
}