From 72b9aecb61fa8cd8a5876eface32f284ef0bc82c Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 11 Dec 2023 01:42:33 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E5=8C=96=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 39 +++++++++++++++++++++------------ broadcast/index.php | 9 ++++++++ broadcast/pagination.cmp.php | 42 ++++++++++++++++++++++++++++++++++++ broadcast/style.css | 21 ++++++++++++++++++ 4 files changed, 97 insertions(+), 14 deletions(-) create mode 100644 broadcast/pagination.cmp.php create mode 100644 broadcast/style.css diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 43e50db..dafb8fc 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -8,26 +8,37 @@ - -
-
- -
+
+
- - -
+ +
+
+ +
-
- > -
+
+ + +
-
- +
+ > +
+ +
+ +
+
+
+ +
- diff --git a/broadcast/index.php b/broadcast/index.php index deb15a0..966a9c7 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -4,6 +4,10 @@ const LOG_PATH = './log.txt'; $log_data = []; +$page = (int) ($_GET['p'] ?? 1); +$length = (int) ($_GET['max'] ?? 20); +$asc = ($_GET['asc'] ?? 0) != 0; + $f = fopen (LOG_PATH, 'r'); if ($f !== false) @@ -25,5 +29,10 @@ fclose ($f); unset ($f); +$pages_max = (int) (count ($log_data) / $length); + +if (!($asc)) + $log_data = array_reverse ($log_data); + require_once './index.frm.php'; diff --git a/broadcast/pagination.cmp.php b/broadcast/pagination.cmp.php new file mode 100644 index 0000000..7380e8d --- /dev/null +++ b/broadcast/pagination.cmp.php @@ -0,0 +1,42 @@ +
+ +
+ diff --git a/broadcast/style.css b/broadcast/style.css new file mode 100644 index 0000000..d793d3e --- /dev/null +++ b/broadcast/style.css @@ -0,0 +1,21 @@ +.container-max-width +{ + max-width: 1600px; +} + +.no-wrap +{ + display: inline-block; + float: none; +} + +.custom-width +{ + max-width: 1ex; +} + +.row-width +{ + max-width: 6px; +} +