<?php
$HomeLocation = "../HalbearNetlanding/index.php";
if(isset($_SESSION["ReturnPage"])) {
    switch($_SESSION["ReturnPage"]) {
        case "Forum":
            $HomeLocation = '../Forum.php';
            break;
        case "Index":
            $HomeLocation = '../index.php';
            break;
        case "Software":
            $HomeLocation = '../Software.php';
            break;
        case "Artwork":
            $HomeLocation = '../Artwork.php';
            break;
        case "Contact":
            $HomeLocation = '../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>
