From d90aebe04f9db8233801b358c5074230ada466eb Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Wed, 7 May 2025 23:02:24 +0200 Subject: added web files --- sticky.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sticky.php (limited to 'sticky.php') diff --git a/sticky.php b/sticky.php new file mode 100644 index 0000000..abf6650 --- /dev/null +++ b/sticky.php @@ -0,0 +1,72 @@ + + + + + + + + Bloggings + + +
+

Bloggings

+

Blog | Sticky | Search | Français | Git | RSS | Bluesky

+
+
+

Sticky pages

+ +"; +// iterate through files +$i = 0; +$thisdir = new DirectoryIterator("./sticky"); +foreach ($thisdir as $file) { + if ((!$file->isDot()) && (!$file->isDir())) { + $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 "
  • " . + '' . + ucfirst($items[$i][2]) . + "
  • "; + $i++; +} +echo ""; +?> + +

     

    +
    +

    §

    + + -- cgit v1.2.3