Files
HalbearNetDesktopSite/HalbearNetLanding/AccountCentre/AccountCentreHotbar.php
T

46 lines
1.6 KiB
PHP

<?php
$HomeLocation = "../index.php";
if(isset($_SESSION["ReturnPage"])) {
switch($_SESSION["ReturnPage"]) {
case "Forum":
$HomeLocation = 'https://halbear.net/Desktop/Forum.php';
break;
case "Index":
$HomeLocation = 'https://halbear.net/Desktop/index.php';
break;
case "Software":
$HomeLocation = 'https://halbear.net/Desktop/Software.php';
break;
case "Artwork":
$HomeLocation = 'https://halbear.net/Desktop/Artwork.php';
break;
case "Contact":
$HomeLocation = 'https://halbear.net/Desktop/Contact.php';
break;
}
}
?>
<div class="HotbarWrapper">
<div class="HotbarSection">
<div class="Logo"></div>
<div class="Title">Halbear.Net Account Centre</div>
</div>
<div class="HotbarSection">
<button class="HotbarButton" onclick="HelpForm();">
Help
</button>
<button class="HotbarButton" onclick="document.location.href='<?php echo $HomeLocation; ?>'">
Back
</button>
<?php
if($LoggedIn){
$location = "'AccountCentre.php?logout=true'";
echo '<button class="HotbarButton" onclick="document.location.href='.$location.'">Log Out</Button>';
echo '<img class="AccountIcon" src="'.((isset($_SESSION["user_pfp"])) ? $_SESSION["user_pfp"] : "../GeneralAssets/AccountSymbol.png").'">';
} else{
echo '<button class="HotbarButton" onclick="signInForm();">Sign In</button>';
}
?>
</div>
</div>