Update index.php

This commit is contained in:
Lilith Ashley Nyx Arson 🔥 2024-05-24 00:44:53 +02:00
parent c2175e7237
commit 6a89d148eb

View file

@ -2,33 +2,6 @@
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
/*$status_api = "https://possum.city/api/users/notes";
$limit = 5;
if (!file_exists("posts.json"))
file_put_contents("posts.json", json_encode(array("time" => 0)));
$data = array("userId" => '99nedgtgoz', "includeReplies" => false);
$posts = json_decode(file_get_contents("posts.json"), true);
$time = time() - $posts["time"];
if ($time > 0) {
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $status_api,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-Type: application/json')
));
$res = curl_exec($ch);
curl_close($ch);
$posts = json_decode($res, true);
$posts["time"] = time();
file_put_contents("posts.json", json_encode($posts));
}*/
?>
<!DOCTYPE html>
<html lang="en">
@ -37,8 +10,8 @@ if ($time > 0) {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yuki</title>
<link rel="shortcut icon" href="img/yuki.png" type="image/jpg">
<title>Ashley</title>
<link rel="shortcut icon" href="img/ashley.png" type="image/jpg">
<link rel="stylesheet" href="css/style.css">
</head>
@ -48,7 +21,7 @@ if ($time > 0) {
<?php include("inc/header.php"); ?>
<div class="section">
<h2>Introduction</h2>
<p>hello im yuki and welcome to my super epic webpage</p>
<p>hello im ashley and welcome to my super epic webpage</p>
<p>this is basically a shitpost so don't expect it to look good!!!</p>
<br>
<p><a href="0x412E93F5.asc">My PGP key</a></p>
@ -74,28 +47,6 @@ if ($time > 0) {
<?php } ?>
</ul>
</div>
<?php /*
<div class="section">
<h2>Latest Posts</h2>
<?php $i = 0;
foreach ($posts as $idx => $post) {
if ($idx === "time")
continue;
if ($post["text"] == null)
continue;
if (++$i > $limit)
break;
$files = count($post["fileIds"]); ?>
<p><?= $post["text"] ?></p><?= $files > 0 ? '<small>(' . $files . ' File' . ($files !== 1 ? 's' : '') . ')</small>' . PHP_EOL : '' ?>
<small>@ <?= date('d/n/Y H:i', strtotime($post["createdAt"])) ?> | <a
href="https://possum.city/notes/<?= htmlspecialchars($post["id"]) ?>" target="_blank"
rel="noopener noreferrer">View Original</a></small>
<?php if ($i < min($limit, count($posts) - 1)) { ?><br><br>
<hr><br><?php } ?>
<?php } ?>
</div>
*/ ?>
<?php include("inc/footer.php"); ?>
</div>
</body>