File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/logout.php
<? require "application_top.php";
$loggedinfrom = isset($_SESSION['agfbsess'])? $_SESSION['agfbsess'] : 1;
//delete cookie
setcookie("simu","",time()-3600);
//delete session
session_unset();
session_destroy();
session_start();
$_SESSION['msg'] = "You have logged out successfully!";
if(($loggedinfrom == 1)||($loggedinfrom == 3)){
header('location:index.php'); exit;
}
?>
<html>
<head>
<meta name="google-signin-client_id" content="<?=GOOGLECLIENTID;?>">
</head>
<body>
<? if($loggedinfrom == 2){ ?>
<script src="https://apis.google.com/js/platform.js?onload=onLoadCallback" async defer></script>
<script>
window.onLoadCallback = function(){
gapi.load('auth2', function() {
gapi.auth2.init().then(function(){
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
document.location.href = 'login.php';
});
});
});
};
</script>
<? }?>
</body>
</html>