bugfixes, refactoring
This commit is contained in:
parent
0ef97c4889
commit
f542656bc9
5 changed files with 50 additions and 94 deletions
|
@ -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();
|
||||
|
|
|
@ -50,28 +50,13 @@ function get_handler()
|
|||
$followers = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
}
|
||||
get_handler();
|
||||
//todo: rewrite
|
||||
?>
|
||||
|
||||
<h2>Following</h2>
|
||||
|
||||
<?php
|
||||
foreach ($following as $user) {
|
||||
$usern = $user['username']; ?>
|
||||
<div class='comment'>
|
||||
<div class="avatar">
|
||||
<img src="/pfp/<?php echo $usern ?>.png" class="avatar-img">
|
||||
<div>
|
||||
<div><b>
|
||||
<a class="link" href="/user.php?id=<?php echo $usern ?>">
|
||||
<?php echo $usern ?>
|
||||
</a>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
user_block($user['username'], false, false);
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -79,23 +64,7 @@ get_handler();
|
|||
|
||||
<?php
|
||||
foreach ($followers as $user) {
|
||||
$usern = $user['target']; ?>
|
||||
<div class='comment'>
|
||||
<div class="avatar">
|
||||
<img src="/pfp/<?php echo $usern ?>.png" class="avatar-img">
|
||||
<div>
|
||||
<div><b>
|
||||
<a class="link" href="/user.php?id=<?php echo $usern ?>">
|
||||
<?php echo $usern ?>
|
||||
</a>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
user_block($user['target'], false, false);
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
page_footer();
|
||||
?>
|
||||
|
|
|
@ -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) { ?>
|
||||
<div class='comment'>
|
||||
<div class="avatar">
|
||||
<img src="/pfp/<?php echo $usern ?>.png" class="avatar-img">
|
||||
<div>
|
||||
<div><b>
|
||||
<a class="link" href="/user.php?id=<?php echo $usern ?>">
|
||||
<?php echo $usern ?>
|
||||
</a>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div><b>Power</b>: <?php echo $rr ?></div>
|
||||
</div>
|
||||
<?php }
|
||||
foreach ($pr as $usern => $rr) {
|
||||
user_block($usern, $rr, "Popularity");
|
||||
}
|
||||
}
|
||||
|
||||
get_handler();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue