';
$headerNoButtons = '' . $sitename . '
';
$headerLoggedIn = '' . $sitename . '
';
$headerAdmin = '' . $sitename . '
';
$footer = '';
function dispImage($imgurl, $tags) {
$imgstart = '';
$imgend = '
';
echo "$imgstart";
for($x = 0; $x < count($tags); $x++) {
$tagblock = '' . $tags[$x] . '';
echo "$tagblock";
}
echo "$imgend";
}
function showHeader($hideButtons = 0) {
// PHP is so quirky!!! I love scoping :sparkling-heart:
global $headerNoButtons;
global $headerLoggedIn;
global $headerGuest;
global $headerAdmin;
global $db;
if ($hideButtons == 1) { echo $headerNoButtons; return; }
if (!empty($db) && isset($_COOKIE["meowboardSession"])) {
if (isAdmin(tokenToUsername($_COOKIE["meowboardSession"])) == 1) {
echo $headerAdmin;
return;
} else {
echo $headerLoggedIn;
return;
}
}
if (isset($_COOKIE["meowboardSession"])) { echo $headerLoggedIn; return; }
echo $headerGuest;
}
?>