fix encoding
changed font
display last modified date
This commit is contained in:
quenousimporte 2024-02-13 23:38:09 +01:00
parent d28322e983
commit 856f706ae4
1 changed files with 15 additions and 14 deletions

View File

@ -1,23 +1,12 @@
<?php
$password = '';
$dir = '../../data/bbn';
if (!isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $password) {
header('WWW-Authenticate: Basic realm="bbn"');
header('HTTP/1.0 401 Unauthorized');
echo '<p>Access denied.</p>';
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>bnn</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta charset="UTF-8">
<style type="text/css">
body {
font-family: monospace;
font-family: helvetica;
}
textarea {
height: 500px;
@ -37,6 +26,17 @@
<div><a accesskey="l" href="index.php">View list</a>&nbsp;<a accesskey="n" href="index.php?create=true">New note</a>&nbsp;|&nbsp;bbn</div>
<br>
<?php
$password = '';
$dir = '../../data/bbn';
if (!isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $password) {
header('WWW-Authenticate: Basic realm="bbn"');
header('HTTP/1.0 401 Unauthorized');
echo '<p>Access denied.</p>';
exit;
}
if (isset($_POST['savebutton']))
{
$title = $_POST['title'];
@ -79,7 +79,8 @@
while (($file = readdir($dh)) !== false) {
if (str_ends_with($file, '.md'))
{
echo '<div><a href=index.php?open=' . urlencode($file) . '>' . $file .'</a></div>';
$mod = date("F d Y H:i:s", filemtime($dir . '/' . $file));
echo '<div>' . $mod . '&nbsp;<a href=index.php?open=' . urlencode($file) . '>' . $file .'</a></div>';
}
}
closedir($dh);