diff --git a/docs/comment.php b/docs/comment.php index 1abcdda..4b2c20e 100644 --- a/docs/comment.php +++ b/docs/comment.php @@ -4,8 +4,6 @@ require(__DIR__ . "/../libs/page.php"); require(__DIR__ . "/../libs/form.php"); require(__DIR__ . "/../libs/comment.php"); -$ref = 1732684297; - page_header(); comments("comment", $_GET['id']); page_footer(); diff --git a/docs/css/main.css b/docs/css/main.css index 99edeba..22955cf 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -202,6 +202,10 @@ iframe { justify-content: center; } +.header a.leave { + margin-left: auto; +} + .clickie { width: min-content; margin-top: 40px; diff --git a/docs/index.php b/docs/index.php index d2d13df..1ea5085 100644 --- a/docs/index.php +++ b/docs/index.php @@ -4,26 +4,17 @@ require(__DIR__ . "/../libs/form.php"); require(__DIR__ . "/../libs/comment.php"); page_header(); -if (!is_null($username)) { - //comments("root","root"); -} -if (!($_GET['page'] > 0)) { ?> +if (!($_GET['page'] > 0) && is_null($username)) { ?> diff --git a/docs/meta.php b/docs/meta.php index ba9c6f2..cddee71 100644 --- a/docs/meta.php +++ b/docs/meta.php @@ -50,28 +50,13 @@ function get_handler() $followers = $stmt->fetchAll(PDO::FETCH_DEFAULT); } get_handler(); -//todo: rewrite ?>

Following

-
-
- -
-
- - - - -
-
-
-
- @@ -79,23 +64,7 @@ get_handler(); -
-
- -
-
- - - - -
-
-
-
- - diff --git a/docs/register.php b/docs/register.php index d99c4ed..004c402 100755 --- a/docs/register.php +++ b/docs/register.php @@ -44,6 +44,12 @@ 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(); } diff --git a/docs/stats.php b/docs/stats.php index 0edcbf2..cdf0f09 100755 --- a/docs/stats.php +++ b/docs/stats.php @@ -27,22 +27,9 @@ function get_handler() $api = file_get_contents($node_backend . "/top?ref=" . $_GET['username']); $pr = json_decode($api); - foreach ($pr as $usern => $rr) { ?> -
-
- -
-
- - - - -
-
-
-
Power:
-
- $rr) { + user_block($usern, $rr, "Popularity"); + } } get_handler(); diff --git a/libs/comment.php b/libs/comment.php index f3fb034..63ddbd4 100644 --- a/libs/comment.php +++ b/libs/comment.php @@ -32,18 +32,7 @@ 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); ?> - -
- Everyone - Following -
0) { ?> Previous diff --git a/libs/markdown.php b/libs/markdown.php index eec5fd0..28a7656 100755 --- a/libs/markdown.php +++ b/libs/markdown.php @@ -2,40 +2,24 @@ function markdown($text) { $search = array( - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(png|jpg|jpeg|gif))~i', - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(mp3|wav))~i', - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(webm|mp4))~i', - //'~(https://studio\.penguinmod\.com/[^\s
$1
', - '
$1
', - '
$1
', - //'https://studio.penguinmod.com/?#$2', - //'
$1
', - '$0', - '@$1', - '$2', - '$2', - '$2', - '', - '
  • $2
  • ', - '

    $2

    ', - '$4', - '$2' - ); + '
    $1
    ', + '
    $1
    ', + '
    $1
    ', + //'https://studio.penguinmod.com/?#$2', + //'
    $1
    ', + '$0', + '@$1', + ); $text = preg_replace($search, $replace, $text); diff --git a/libs/page.php b/libs/page.php index 81f7494..da182a2 100755 --- a/libs/page.php +++ b/libs/page.php @@ -7,39 +7,58 @@ function page_header() global $username; $stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC"); $stmt->execute([ - "notification", - $username, + "notification", + $username, ]); $posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT); $edge = count($posts2); ?> - - - - BiglyChat - - - - - -
    - BiglyChat - - Wall - Mail - Users - Leave - - Join -Users - -
    - + + + BiglyChat + + + + + +
    + BiglyChat + + Feed + Wall + Users + Mail + Leave + + Join + Users + +
    + - - - + + + +
    +
    + +
    + + + + + +
    +
    + $tag: $meta"; ?> +
    +