From 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sun, 12 Jul 2026 11:08:50 +0200 Subject: update --- static/index.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 static/index.php (limited to 'static/index.php') diff --git a/static/index.php b/static/index.php new file mode 100755 index 0000000..19b2e8b --- /dev/null +++ b/static/index.php @@ -0,0 +1,82 @@ + + + + + + + + Bloggings + + +
+

Bloggings

+ + +
+
+
+

Static pages

+ +"; +// iterate through files +$i = 0; +$thisdir = new DirectoryIterator("./"); +foreach ($thisdir as $file) { + if ((!$file->isDot()) && (!$file->isDir()) && ($file!="index.php")) { + $i++; + $content = file_get_contents($file->getPathname()); + preg_match("/
(.*?)<\/h5>/s", $content, $date); + $filedate = date("Y-m-d"); + + if (isset($date[1]) && strtotime($date[1])) { + $filedate = date("Y-m-d", strtotime($date[1])); + } + + preg_match("/

(.*?)<\/h2>/s", $content, $titre); + $title = "?"; + + if (isset($titre[1])) { + $title = ucfirst($titre[1]); + } + $items[$i][0] = $i; + $items[$i][1] = $file->getPathname(); + $items[$i][2] = $title; + } +} +$values = array_column($items, 2); +array_multisort($values, SORT_ASC, $items); + +$i = 0; +while ($i < count($items)) { + echo '"; + $i++; +} +echo ""; +?> +

+
+ + + -- cgit v1.3.1