aboutsummaryrefslogtreecommitdiff
path: root/txt/index.php
diff options
context:
space:
mode:
authorAda Isopods <me@bathynomus.xyz>2024-12-05 20:26:58 -0700
committerAda Isopods <me@bathynomus.xyz>2026-10-21 23:30:20 -0600
commite0406f8c60a05887c2670d633d1d8eb58c7332c1 (patch)
tree77fd790ff67921e35f5c0f10a1c1e375a5b4d566 /txt/index.php
parentb58b9832183c5dec8af2dfd580abf3d5d9bdc086 (diff)
overhauled the entire site basically
Diffstat (limited to 'txt/index.php')
-rwxr-xr-xtxt/index.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/txt/index.php b/txt/index.php
new file mode 100755
index 0000000..8c6c445
--- /dev/null
+++ b/txt/index.php
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="icon" type="image/x-icon" href="/favicon.ico">
+ <title>/log/txt</title>
+ <link href="../style.css" rel="stylesheet" type="text/css" media="all">
+ <style>
+ </style>
+ </head>
+ <body>
+ <nav><a href="../"><<<</a></nav>
+ <p>$ pwd</p>
+ <h1 class="title">/log/txt</h1>
+ <p>$ cat sys.log</p>
+ <section class="dir">
+ <?php
+ $infile = fopen("sys.log", "r") or die("file read error -_-");
+ $content = fread($infile,filesize("sys.log"));
+ fclose($infile);
+ $post_arr = explode("\n",$content);
+ $posts_out = "";
+ date_default_timezone_set("Etc/GMT-1");
+ foreach($post_arr as $p) {
+ if(strlen($p) > 3) {
+ $date = substr($p, 0, strpos($p, " "));
+ $sdate = date(DateTime::ATOM, $date);
+ $hdate = date("Y-m-d@B", $date);
+ $pcont = substr($p, strpos($p, " ") + 1);
+ $posts_out = "<article><time datetime='$sdate'>$hdate</time> >> $pcont</article>$posts_out";
+ }
+ }
+ echo $posts_out;
+ ?>
+ </section>
+ <p>$</p>
+ </body>
+
+</html>