Adding snufficon
This commit is contained in:
parent
390b6b1de9
commit
4a89a35984
79 changed files with 22 additions and 7 deletions
19
index.php
19
index.php
|
@ -1,5 +1,11 @@
|
|||
<?php
|
||||
require_once "inc/database.php";
|
||||
function getRandomIcon() {
|
||||
$files = glob('./snufficon/*.png');
|
||||
$random_file_num = array_rand($files);
|
||||
return $files[$random_file_num];;
|
||||
}
|
||||
$randomicon = getRandomIcon();
|
||||
$database = new DataBase();
|
||||
if(!$database) {
|
||||
die($database->lastErrorMsg());
|
||||
|
@ -10,7 +16,7 @@ if(!$database) {
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link rel="icon" type="image/x-icon" href="icon.png">
|
||||
<link rel="icon" type="image/x-icon" href="snufficon/mouthless.png">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Snuffler</title>
|
||||
</head>
|
||||
|
@ -33,7 +39,7 @@ if(!$database) {
|
|||
</div>
|
||||
|
||||
<div id="centerbox">
|
||||
<div id="titlebox"><img src="icon.png" alt="" />Snuffler</div>
|
||||
<div id="titlebox"><img src="<?php echo $randomicon; ?>" alt="" />Snuffler</div>
|
||||
|
||||
<?php
|
||||
if (!$database->getAuthedUserId()) {
|
||||
|
@ -77,7 +83,14 @@ foreach($posts as $post) {
|
|||
echo '<br><small>@' . $post["user.handle"] . '</small>';
|
||||
echo '<p>' . $post["post.text"] . '</p>';
|
||||
echo '<hr><small>' . date("D j.n.Y \@ G:i", $post["post.time"]) . '</small>';
|
||||
echo '<span class="postactions">👍5 👎0 💬2</span>';
|
||||
echo '
|
||||
<span class="postactions">
|
||||
<img class="reactionaction" src="snufficon/thumbs_up.png" />
|
||||
<img class="reactionaction" src="snufficon/thumbs_down.png" />
|
||||
<img class="reactionaction" src="snufficon/joy.png" />
|
||||
<img class="reactionaction" src="snufficon/sob.png" />
|
||||
<img class="reactionaction" src="snufficon/heart_eyes.png" />
|
||||
</span>';
|
||||
echo "</div>";
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue