blob: 7c8006e131c48e28513328b2ac19912cb063e1c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>/log/txt</title>
<link href="../style.css" rel="stylesheet" type="text/css" media="all">
<?php include("../seasonal.php"); ?>
</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>
|