From 294c3b9db21b32e157ad679689c89b342cc1b9af Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 12 Mar 2024 14:09:49 +0100 Subject: [PATCH] add stat action drop link labels --- index.php | 4 +--- note.php | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 916ea05..19b5f73 100644 --- a/index.php +++ b/index.php @@ -45,7 +45,6 @@ $links = array(); if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER)) { - $divcontent .= '
Internal links:
'; foreach($links as $link) { $divcontent .= '
@@ -56,7 +55,6 @@ $links = array(); if (preg_match_all('/https:(.*)\b/', $content, $links, PREG_SET_ORDER)) { - $divcontent .= '
External links:
'; foreach($links as $link) { $divcontent .= '
@@ -76,7 +74,7 @@ savenote('todo', $content); $_GET['param'] = ''; } - else if (isset($_POST['save']) || isset($_POST['home']) || isset($_POST['links'])) + else if (isset($_POST['save']) || isset($_POST['home']) || isset($_POST['links']) || isset($_POST['stats'])) { $title = $_POST['title']; $content = $_POST['content']; diff --git a/note.php b/note.php index 1d8264d..1ce746c 100644 --- a/note.php +++ b/note.php @@ -2,13 +2,20 @@
- - lines - words - chars - + + + ' . $lines . ' lines + '. $words . ' words + ' . $chars . ' chars +
'; + } + else if (isset($_POST['links'])) { echo linksdiv($content); }?>