42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?php
|
|
// Main page search box
|
|
|
|
if (!$IS_FRONTEND) {
|
|
http_response_code(500);
|
|
die();
|
|
}
|
|
|
|
?>
|
|
<div class="nibbabox searchbox">
|
|
<h1 class="title"><a href=".">E949</a></h1>
|
|
<div class="nav">
|
|
<?php
|
|
// If user is logged in
|
|
if ($LOGGED_IN) {
|
|
$res = User_GetInfoByID($THIS_USER);
|
|
if ($res->IsError())
|
|
$res->ThrowJSONError();
|
|
$uname = $res->GetData()["login"];
|
|
echo "<a class=\"useraccount\" title=\"Account page\" href=\"./?do=view_user&id=$THIS_USER\">$uname</a>";
|
|
} else { // If user is NOT logged in
|
|
?>
|
|
<a title="Login in existing account" href="./?do=login">Login</a>
|
|
<a title="Create new account" href="./?do=signup">Signup</a>
|
|
<?php
|
|
}
|
|
?>
|
|
<a title="A paginated list of every post" href="./?do=view_all_posts">Posts</a>
|
|
<a title="A paginated list of every tag" href="./?do=view_all_tags">Tags</a>
|
|
<a title="Statistics of current instance" href="./?do=view_stats">Statistics</a>
|
|
<a title="A site map" href="./?do=view_sitemap">Site map</a>
|
|
</div>
|
|
<div>
|
|
<form action="." accept-charset="UTF-8" method="get">
|
|
<input type="text" name="tags" id="tags" value="" size="36" autofocus="autofocus" autocomplete="on"><br>
|
|
<input type="submit" value="Search">
|
|
<!-- TODO: JS
|
|
<input type="button" value="Show random meme" id="random-meme">
|
|
-->
|
|
</form>
|
|
</div>
|
|
</div>
|