Compare commits
No commits in common. "master" and "v0.1.2" have entirely different histories.
5 changed files with 59 additions and 51 deletions
|
@ -202,10 +202,6 @@ iframe {
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
.header a.leave {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.clickie {
|
||||
width: min-content;
|
||||
margin-top: 40px;
|
||||
|
|
|
@ -4,17 +4,25 @@ require(__DIR__ . "/../libs/form.php");
|
|||
require(__DIR__ . "/../libs/comment.php");
|
||||
|
||||
page_header();
|
||||
if (!($_GET['page'] > 0) && is_null($username)) { ?>
|
||||
if (!is_null($username)) {
|
||||
//comments("root","root");
|
||||
}
|
||||
if (!($_GET['page'] > 0)) { ?>
|
||||
<div class="banner"><img class="banner-background" src="/img/newlogo.svg">
|
||||
<div class="banner-content">
|
||||
<h1>BiglyChat</h1>
|
||||
<pre>BiglyChat is a social environment for the cool creative projects on Dervland.</pre>
|
||||
<pre>BiglyChat is a social environment with active developers who respond to community feedback.</pre>
|
||||
<pre>It features a <a class='link' href='/stats.php'>custom algorithm</a>, <a class='link' href='https://gw.dervland.net/'>cool web games</a>, and much more.</pre>
|
||||
<pre>Anyone can <a class='link' href='/register.php'>join our community</a> and become a part of BiglyChat.</pre>
|
||||
<pre><i>BiglyChat is currently on version <a href='<?php echo htmlspecialchars(exec("git remote get-url origin"))?>' class='link'><?php echo exec("git describe --exact-match --tags") ?></b></a>.</i></pre>
|
||||
<a class="form-button" href="/tou.php">Terms of Use</a>
|
||||
<a class="form-button" href="https://dervland.net/">Dervland</a>
|
||||
<a class="form-button" href="https://dervland.net/">More Projects</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
//if (is_null($username)) {
|
||||
comments("root", "root");
|
||||
//}
|
||||
page_footer();
|
||||
?>
|
||||
|
|
|
@ -44,12 +44,6 @@ function post_handler()
|
|||
$stmt = $db->prepare("INSERT INTO main.auth (username, password) VALUES (?, ?)");
|
||||
$stmt->execute([$user,$hashed]);
|
||||
|
||||
$token = bin2hex(random_bytes(32));
|
||||
$stmt = $db->prepare("INSERT INTO main.token (username, token) VALUES (?, ?)");
|
||||
$stmt->execute([$user,$token]);
|
||||
|
||||
setcookie("token", $token, time() + 3600 * 24);
|
||||
|
||||
header("Location: /");
|
||||
die();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,18 @@ function comments($typer, $idr, $disable = false)
|
|||
$qss['page'] = $page - 1;
|
||||
$qs_prev = http_build_query($qss);
|
||||
$qss['page'] = $page;
|
||||
|
||||
$qss['mode'] = 'all';
|
||||
$qs_1 = http_build_query($qss);
|
||||
|
||||
$qss['mode'] = 'followers';
|
||||
$qs_2 = http_build_query($qss);
|
||||
?>
|
||||
|
||||
<div>
|
||||
<a class="form-button" href="?<?php echo $qs_1 ?>">Everyone</a>
|
||||
<a class="form-button" href="?<?php echo $qs_2 ?>">Following</a>
|
||||
</div>
|
||||
<div>
|
||||
<?php if ($page > 0) { ?>
|
||||
<a class="form-button" href="?<?php echo $qs_prev ?>">Previous</a>
|
||||
|
|
|
@ -24,23 +24,21 @@ function page_header()
|
|||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="/index.php"><img class="header-img header-link" src="/img/bgc.svg">BiglyChat</a>
|
||||
<a href="/"><img class="header-img header-link" src="/img/bgc.svg">BiglyChat</a>
|
||||
<?php if (isset($username)) { ?>
|
||||
<a href="/index.php?mode=followers"><img class="header-img header-link" src="/img/bgc.svg">Feed</a>
|
||||
<a href="/user.php?id=<?php echo $username ?>"><img class="header-img header-link" src="/pfp/<?php echo $username ?>.png">Wall</a>
|
||||
<a href="/stats.php?username=<?php echo $username ?>"><img class="header-img header-link" src="/img/home.svg">Users</a>
|
||||
<a href="/notif.php"> <img class="header-img header-link" src="/img/mail.svg"><span>Mail<sub> <?php echo $edge?></sub></span></a>
|
||||
<a href="/logout.php" class='leave'><img class="header-img header-link" src="/img/logout.svg">Leave</a>
|
||||
<a href="/stats.php?username=<?php echo $username ?>"><img class="header-img header-link" src="/img/home.svg">Users</a>
|
||||
<a href="/logout.php"><img class="header-img header-link" src="/img/logout.svg">Leave</a>
|
||||
<?php } else { ?>
|
||||
<a href="/login.php"><img class="header-img header-link" src="/img/home.svg">Join</a>
|
||||
<a href="/stats.php"><img class="header-img header-link" src="/img/home.svg">Users</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
function page_footer()
|
||||
{
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
function page_footer()
|
||||
{ ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php }
|
||||
|
@ -51,13 +49,14 @@ function user_block($usern, $meta, $tag)
|
|||
<div class="avatar">
|
||||
<img src="/pfp/<?php echo $usern ?>.png" class="avatar-img">
|
||||
<div>
|
||||
<b>
|
||||
<div><b>
|
||||
<a class="link" href="/user.php?id=<?php echo $usern ?>">
|
||||
<?php echo $usern ?>
|
||||
</a>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo (is_null($meta) || !$meta) ? '' : "<b>$tag</b>: $meta"; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
|
Loading…
Reference in a new issue