From be87c5d0dce236277644c1634ce2de264949fcf0 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Tue, 5 Dec 2023 12:47:14 +0900 Subject: [PATCH 01/22] =?UTF-8?q?=E6=94=BE=E9=80=81=E5=B1=80=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E9=96=B2=E8=A6=A7=E3=83=9A=E3=83=BC=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 0 broadcast/index.php | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 broadcast/index.frm.php create mode 100644 broadcast/index.php diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php new file mode 100644 index 0000000..e69de29 diff --git a/broadcast/index.php b/broadcast/index.php new file mode 100644 index 0000000..c3ac955 --- /dev/null +++ b/broadcast/index.php @@ -0,0 +1,6 @@ + Date: Thu, 7 Dec 2023 00:15:09 +0900 Subject: [PATCH 02/22] =?UTF-8?q?ignoire=20=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index dabf315..dc97b1c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /nizika_nizika /nml /nizika_nml +/log.txt From 54e614abf857573672e5f3719f479e59e8cc3150 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 7 Dec 2023 01:38:24 +0900 Subject: [PATCH 03/22] =?UTF-8?q?=E3=83=AD=E3=82=B0=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=BE=E3=81=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/.gitignore | 2 ++ broadcast/index.frm.php | 30 ++++++++++++++++++++++++++++++ broadcast/index.php | 25 ++++++++++++++++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 broadcast/.gitignore diff --git a/broadcast/.gitignore b/broadcast/.gitignore new file mode 100644 index 0000000..045dbda --- /dev/null +++ b/broadcast/.gitignore @@ -0,0 +1,2 @@ +/log.txt + diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index e69de29..f5a3a9f 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -0,0 +1,30 @@ + + + + + + + + +
+
+ +
+ +
+ + +
+ +
+ > +
+ +
+ +
+
+ + + + diff --git a/broadcast/index.php b/broadcast/index.php index c3ac955..deb15a0 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -1,6 +1,29 @@ $dt[0], + 'chat_icon' => $chat_info -> author -> imageUrl, + 'chat_name' => $chat_info -> author -> name, + 'chat_message' => $chat_info -> message, + 'answer' => $dt[2]]; + } + + } + +fclose ($f); + +unset ($f); require_once './index.frm.php'; From 7cefd9c8256f133cb2345e8ef9aae675e7b7cd17 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 7 Dec 2023 12:51:41 +0900 Subject: [PATCH 04/22] =?UTF-8?q?Bootstrap=20=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index f5a3a9f..b9a87db 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -2,6 +2,7 @@ + @@ -25,6 +26,8 @@ + + From d45801d33c23e674d6e7ec23e83c16986ae28c65 Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 8 Dec 2023 08:29:50 +0900 Subject: [PATCH 05/22] =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index b9a87db..505c351 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -3,6 +3,7 @@ + 伊地知ニジカ放送局 - ニジカ返答ログ From b57f10fd897a0535ddddd927c1f8aef2ff8d2401 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 8 Dec 2023 12:52:04 +0900 Subject: [PATCH 06/22] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=92=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8=E3=81=A0=E3=81=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 505c351..43e50db 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -2,13 +2,14 @@ + 伊地知ニジカ放送局 - ニジカ返答ログ -
+
From 72b9aecb61fa8cd8a5876eface32f284ef0bc82c Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 11 Dec 2023 01:42:33 +0900 Subject: [PATCH 07/22] =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E5=8C=96?= =?UTF-8?q?=E5=AF=BE=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; +} + From 601780b8af5e445027e9d451c5834084f3536333 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 11 Dec 2023 08:33:15 +0900 Subject: [PATCH 08/22] =?UTF-8?q?=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 10 +++++++--- broadcast/index.php | 3 +++ broadcast/pagination.cmp.php | 6 ++---- broadcast/style.css | 3 +-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index dafb8fc..4faa7ba 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -8,8 +8,10 @@ -
- +
+
+ +
- +
+ +
diff --git a/broadcast/index.php b/broadcast/index.php index 966a9c7..1a1d59a 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -1,5 +1,8 @@ -
diff --git a/broadcast/style.css b/broadcast/style.css index d793d3e..02bda7d 100644 --- a/broadcast/style.css +++ b/broadcast/style.css @@ -5,8 +5,7 @@ .no-wrap { - display: inline-block; - float: none; + white-space: nowrap; } .custom-width From 648e93a078e74ff8f5ad09edd0ae7883471f2e45 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 11 Dec 2023 12:22:16 +0900 Subject: [PATCH 09/22] add style --- broadcast/index.frm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 4faa7ba..2901dcb 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -4,11 +4,12 @@ + 伊地知ニジカ放送局 - ニジカ返答ログ -
+
From 5c6f3367ed599e30c3eba413e5c0ca708003b911 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Tue, 12 Dec 2023 12:46:59 +0900 Subject: [PATCH 10/22] =?UTF-8?q?=E7=B5=9E=E3=82=8A=E8=BE=BC=E3=81=BF?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 2901dcb..92114f8 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -4,12 +4,27 @@ - + 伊地知ニジカ放送局 - ニジカ返答ログ
+
+
+

+ +

+ +
+
+
+
+
+
+
From b1c45a6c84afa566b6a8d0a18d06ec33626d6447 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 13 Dec 2023 01:38:13 +0900 Subject: [PATCH 11/22] =?UTF-8?q?=E7=B5=9E=E3=82=8A=E8=BE=BC=E3=81=BF?= =?UTF-8?q?=E5=8B=95=E4=BD=9C=E7=A2=BA=E8=AA=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 99 ++++++++++++++++++++++++++---------- broadcast/index.php | 12 ++++- broadcast/pagination.cmp.php | 14 ++--- broadcast/script.js | 52 +++++++++++++++++++ broadcast/style.css | 6 +++ 5 files changed, 146 insertions(+), 37 deletions(-) create mode 100644 broadcast/script.js diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 92114f8..e7b5b93 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -19,48 +19,91 @@
-
+
+
+
+
+ 順序 +
+ +
+ /> + + +
+ +
+ /> + + +
+
+ +
+
+ フリーワード +
+ +
+ +
+
+
+ +
+ +
-
- -
+ 0): ?> +
+ +
-
- -
-
- -
+
+ +
+
+ +
-
- - -
+
+ + +
-
- > -
+
+ > +
-
- +
+ +
-
- -
+ +
-
- -
+
+ +
+ + 何も見つかりませんでしたぬ゛ぅ゛ぅ゛ぅ゛ぅ゛ん゛ +
+ diff --git a/broadcast/index.php b/broadcast/index.php index 1a1d59a..12773e8 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -10,6 +10,7 @@ $log_data = []; $page = (int) ($_GET['p'] ?? 1); $length = (int) ($_GET['max'] ?? 20); $asc = ($_GET['asc'] ?? 0) != 0; +$keyword = trim ($_GET['q'] ?? ''); $f = fopen (LOG_PATH, 'r'); @@ -25,14 +26,21 @@ if ($f !== false) 'chat_message' => $chat_info -> message, 'answer' => $dt[2]]; } - } fclose ($f); unset ($f); -$pages_max = (int) (count ($log_data) / $length); +if ($keyword != '') + { + $log_data = array_filter ($log_data, fn ($row) => ( + strpos ($row['chat_name'] . "\n" . $row['chat_message'] . "\n" . $row['answer'], + $keyword) + !== false)); + } + +$pages_max = (int) ((count ($log_data) - 1) / $length) + 1; if (!($asc)) $log_data = array_reverse ($log_data); diff --git a/broadcast/pagination.cmp.php b/broadcast/pagination.cmp.php index 803e30b..0a7713e 100644 --- a/broadcast/pagination.cmp.php +++ b/broadcast/pagination.cmp.php @@ -2,7 +2,7 @@
    1): ?>
  • - |< + |<
  • @@ -10,9 +10,9 @@
  • - +
  • - +
  • @@ -20,15 +20,15 @@ - -
  • - + +
  • +
  • - >| + >|
  • diff --git a/broadcast/script.js b/broadcast/script.js new file mode 100644 index 0000000..a442aad --- /dev/null +++ b/broadcast/script.js @@ -0,0 +1,52 @@ +class +Script +{ + static + main () + { + const url = new URL (window.location.href); + + const orderAsc = document.getElementById ('order-asc'); + const filterKeyword = document.getElementById ('filter-keyword'); + + const btnFilter = document.getElementById ('btn-filter'); + + const filter = ( + function (e) + { + url.searchParams.delete ('p'); + + url.searchParams.delete ('asc'); + url.searchParams.append ('asc', orderAsc.checked ? '1' : '0'); + + url.searchParams.delete ('q'); + url.searchParams.append ('q', filterKeyword.value); + + window.location.href = url; + }); + + filterKeyword.addEventListener ('keydown', + function (e) + { + if (e.key === 'Enter') + filter (e); + }); + + btnFilter.addEventListener ('click', filter); + } + + static + jumpTo (page) + { + const url = new URL (window.location.href); + + url.searchParams.delete ('p'); + url.searchParams.append ('p', page); + + window.location.href = url; + } +} + + +Script.main (); + diff --git a/broadcast/style.css b/broadcast/style.css index 02bda7d..79b3a46 100644 --- a/broadcast/style.css +++ b/broadcast/style.css @@ -18,3 +18,9 @@ max-width: 6px; } +.page-item +{ + width: 3.5em; + text-align: center; +} + From de8a0aa429519bf31741de821a54cdaa070c66c6 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 13 Dec 2023 01:46:22 +0900 Subject: [PATCH 12/22] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=AA=BF=E6=95=B4=EF=BC=88=E3=82=B9=E3=83=9E=E3=83=9B?= =?UTF-8?q?=E3=81=A0=E3=81=A8=E5=B4=A9=E3=82=8C=E3=82=8B=EF=BC=9B=E3=83=AC?= =?UTF-8?q?=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B7=E3=83=96=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=81=95=E3=81=9B=E3=82=88=E3=81=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 8 ++++---- broadcast/pagination.cmp.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index e7b5b93..38e2e6b 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -22,11 +22,11 @@
    -
    +
    順序
    -
    +
    />
    -
    +
    />
    -
    +
    フリーワード
    diff --git a/broadcast/pagination.cmp.php b/broadcast/pagination.cmp.php index 0a7713e..f8df9a0 100644 --- a/broadcast/pagination.cmp.php +++ b/broadcast/pagination.cmp.php @@ -10,7 +10,7 @@
  • - +
  • @@ -20,7 +20,7 @@ - +
  • From 339e00347ec67fca528ea702456e34f3181512f6 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 15 Dec 2023 02:28:54 +0900 Subject: [PATCH 13/22] =?UTF-8?q?=E6=97=A5=E3=81=A5=E3=81=91=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=EF=BC=88=E5=81=B4=E3=81=A0=E3=81=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 16 ++++++++++++++++ broadcast/script.js | 3 +++ 2 files changed, 19 insertions(+) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 38e2e6b..bc0ebe3 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -3,7 +3,11 @@ + + + + 伊地知ニジカ放送局 - ニジカ返答ログ @@ -43,6 +47,18 @@
+
+
+ 日時ニジカ +
+ +
+ + + +
+
+
フリーワード diff --git a/broadcast/script.js b/broadcast/script.js index a442aad..447cf8e 100644 --- a/broadcast/script.js +++ b/broadcast/script.js @@ -4,6 +4,9 @@ Script static main () { + $ ('#filter-date-start').datepicker (); + $ ('#filter-date-end').datepicker (); + const url = new URL (window.location.href); const orderAsc = document.getElementById ('order-asc'); From b23e04af75397cc783a2b8c32d75060414afe67f Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 17 Dec 2023 08:22:26 +0900 Subject: [PATCH 14/22] =?UTF-8?q?=E6=97=A5=E3=81=A5=E3=81=91=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/favicon.ico | Bin 0 -> 22326 bytes broadcast/index.frm.php | 6 ++++-- broadcast/index.php | 15 +++++++++++++++ broadcast/script.js | 24 ++++++++++++++++++++++-- 4 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 broadcast/favicon.ico diff --git a/broadcast/favicon.ico b/broadcast/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..64f57c4a76a038a82b62f7e3d62a3a565ac083a1 GIT binary patch literal 22326 zcmeI3&ud%hn&%bgGV7Rx*$ud5-1IWG95c1M8T%Ssb30t@maJl+n_ITdNIlG^yImH< zfgY+P9oa=gcjsy>2kvHSnplRjYKUS9uWE<~%Zq`5EXIZ~)TU%G^ncKw@AIBta-^!J z*LjmjN76ap=Xt-+&-Xninan-@ynXwC*I#62HZz%jo5^JUh<|VS_ZRmv_C1GVNA?f? zIP(Yp?$0uRH2)tmtH1FwYo8xyKC3*>{ON!FZ<+t}cmE^vm%n?R`S!mbXL|qZedfFW zeUu6E|DXS#d4K&+hIf5+b#;Atb$L1H_3HIM?*zBwMsS;aZ%4!UEFC4E^mY8{ z0}?K;-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!AF4$;EDYY?$2f%@Y(hCLP5KSG5p?MzkiOGe?g&@k7xz5`9cDS5A?sN zepPI0?QbH+^M7@PBj#C8<0x|*8w-Tc+~)3{vamesf;w36SzlTXJ9}gNOM>$2fF7dk zN&w==;p548y0iyg3(_azp9qHDYpM)=0s`7fK5FH~q(Yv0gGN&lPPn@#Gk>JKmI&qHE#-p&AH^%s-IzVWl+Rq9M2 z|1C9MS|R|DceKi{PH1&7aD)Cr?TZ2cg5K0>#lyhG?*#p?-phA1p3Kb_4-ZRMDL!8P0llm)%f-Zgh zgf9AERDWY`&>#Zf$N7)Qp@C%9bN~%Dcib)5$^2`=;Pf$8(eJ8;SO;N}wG`{0H%k5i zN}l0An@Z4vSC6Wd8$n|p`jhy!USX9{_q*L4*;fYC5OK8c`C7PxWAW>L(r@$~1dY2N yCi{LGpBVVWz$XSiG4P3jPYirw;1dI%82H4%Ck8$-@QHy>418kX69fM`2L2gyh~}{X literal 0 HcmV?d00001 diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index bc0ebe3..3a6b53f 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -53,9 +53,11 @@
- + - +
diff --git a/broadcast/index.php b/broadcast/index.php index 12773e8..2e69fab 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -12,6 +12,9 @@ $length = (int) ($_GET['max'] ?? 20); $asc = ($_GET['asc'] ?? 0) != 0; $keyword = trim ($_GET['q'] ?? ''); +$date_start = $_GET['start'] ?: null; +$date_end = $_GET['end'] ?: null; + $f = fopen (LOG_PATH, 'r'); if ($f !== false) @@ -40,6 +43,18 @@ if ($keyword != '') !== false)); } +if ($date_start) + { + $log_data = array_filter ($log_data, fn ($row) => ( + substr ($row['date_time'], 0, 10) >= $date_start)); + } + +if ($date_end) + { + $log_data = array_filter ($log_data, fn ($row) => ( + substr ($row['date_time'], 0, 10) <= $date_end)); + } + $pages_max = (int) ((count ($log_data) - 1) / $length) + 1; if (!($asc)) diff --git a/broadcast/script.js b/broadcast/script.js index 447cf8e..101b14d 100644 --- a/broadcast/script.js +++ b/broadcast/script.js @@ -4,8 +4,11 @@ Script static main () { - $ ('#filter-date-start').datepicker (); - $ ('#filter-date-end').datepicker (); + const dateOptions = {dateFormat: 'yy-mm-dd', + firstDay: 6}; + + $ ('#filter-date-start').datepicker (dateOptions); + $ ('#filter-date-end').datepicker (dateOptions); const url = new URL (window.location.href); @@ -17,6 +20,14 @@ Script const filter = ( function (e) { + let dateStart = $ ('#filter-date-start').val (); + let dateEnd = $ ('#filter-date-end').val (); + + if ((dateStart !== '') + && (dateEnd !== '') + && (dateStart > dateEnd)) + [dateStart, dateEnd] = [dateEnd, dateStart]; + url.searchParams.delete ('p'); url.searchParams.delete ('asc'); @@ -25,6 +36,15 @@ Script url.searchParams.delete ('q'); url.searchParams.append ('q', filterKeyword.value); + url.searchParams.delete ('start'); + url.searchParams.delete ('end'); + + if (dateStart !== '') + url.searchParams.append ('start', dateStart); + + if (dateEnd !== '') + url.searchParams.append ('end', dateEnd); + window.location.href = url; }); From 71d0c12564414676c92854bec11016e025f26a1b Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 17 Dec 2023 08:32:25 +0900 Subject: [PATCH 15/22] =?UTF-8?q?=E8=AD=A6=E5=91=8A=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 12 ++++++------ broadcast/index.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 3a6b53f..2f38220 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -3,11 +3,11 @@ - - - - - + + + + + 伊地知ニジカ放送局 - ニジカ返答ログ @@ -120,7 +120,7 @@
- + diff --git a/broadcast/index.php b/broadcast/index.php index 2e69fab..7448458 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -12,8 +12,8 @@ $length = (int) ($_GET['max'] ?? 20); $asc = ($_GET['asc'] ?? 0) != 0; $keyword = trim ($_GET['q'] ?? ''); -$date_start = $_GET['start'] ?: null; -$date_end = $_GET['end'] ?: null; +$date_start = ($_GET['start'] ?? null) ?: null; +$date_end = ($_GET['end'] ?? null) ?: null; $f = fopen (LOG_PATH, 'r'); From 7852c03368731236611bd9e3f56393a351945fd8 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 18 Feb 2024 16:06:34 +0900 Subject: [PATCH 16/22] =?UTF-8?q?=E7=B5=9E=E8=BE=BC=E3=81=BF=E3=81=AE?= =?UTF-8?q?=E3=83=AA=E3=82=BB=E3=83=83=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 10 ++++++++-- broadcast/script.js | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 2f38220..08d1462 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -73,8 +73,14 @@
-
- +
+
+ +
+ +
+ +
diff --git a/broadcast/script.js b/broadcast/script.js index 101b14d..a8171ad 100644 --- a/broadcast/script.js +++ b/broadcast/script.js @@ -48,6 +48,12 @@ Script window.location.href = url; }); + const resetFilter = ( + function () + { + window.location.href = '/'; + }); + filterKeyword.addEventListener ('keydown', function (e) { @@ -56,6 +62,7 @@ Script }); btnFilter.addEventListener ('click', filter); + $ ('#btn-reset').on ('click', resetFilter); } static From e64d0eb790c1ae57bcd09e34f0a153da98b0f08a Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 23 Feb 2024 02:06:41 +0900 Subject: [PATCH 17/22] =?UTF-8?q?=E6=94=BB=E6=92=83=E3=81=AE=E5=9B=9E?= =?UTF-8?q?=E9=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/broadcast/index.php b/broadcast/index.php index 12773e8..b9a2795 100644 --- a/broadcast/index.php +++ b/broadcast/index.php @@ -11,6 +11,7 @@ $page = (int) ($_GET['p'] ?? 1); $length = (int) ($_GET['max'] ?? 20); $asc = ($_GET['asc'] ?? 0) != 0; $keyword = trim ($_GET['q'] ?? ''); +$escaped = ($_GET['escaped'] ?? 0) != 0; $f = fopen (LOG_PATH, 'r'); @@ -22,9 +23,9 @@ if ($f !== false) $log_data[] = ['date_time' => $dt[0], 'chat_icon' => $chat_info -> author -> imageUrl, - 'chat_name' => $chat_info -> author -> name, - 'chat_message' => $chat_info -> message, - 'answer' => $dt[2]]; + 'chat_name' => $escaped ? htmlspecialchars ($chat_info -> author -> name) : $chat_info -> author -> name, + 'chat_message' => $escaped ? htmlspecialchars ($chat_info -> message) : $chat_info -> message, + 'answer' => $escaped ? htmlspecialchars ($dt[2]) : $dt[2]]; } } From 396ad28cdfe9f621b6270e6dee1814a14ed27494 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Tue, 27 Feb 2024 02:26:24 +0900 Subject: [PATCH 18/22] =?UTF-8?q?=E3=81=A1=E3=82=87=E3=81=A3=E3=81=B4?= =?UTF-8?q?=E3=82=8A=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B7=E3=83=96?= =?UTF-8?q?=E3=83=AB=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index 08d1462..a5c15b5 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -26,33 +26,37 @@
-
+
順序
-
- /> +
+
+
+ /> - -
+ +
-
- /> +
+ /> - + +
+
-
+
日時ニジカ
-
+
@@ -62,11 +66,11 @@
-
+
フリーワード
-
+
@@ -74,11 +78,11 @@
-
+
-
+
From 7de05c2af502463472b8fa3ed18b7660201921ec Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 28 Feb 2024 02:44:25 +0900 Subject: [PATCH 19/22] =?UTF-8?q?=E3=83=9A=E3=82=A3=E3=82=B8=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=81=AE=E5=80=8B=E6=95=B0=E3=82=92=E5=B9=85=E3=81=AB?= =?UTF-8?q?=E3=82=88=E3=81=A3=E3=81=A6=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/pagination.cmp.php | 70 ++++++++++++++++++------------------ broadcast/script.js | 18 ++++++++++ 2 files changed, 53 insertions(+), 35 deletions(-) diff --git a/broadcast/pagination.cmp.php b/broadcast/pagination.cmp.php index f8df9a0..929dfd2 100644 --- a/broadcast/pagination.cmp.php +++ b/broadcast/pagination.cmp.php @@ -1,40 +1,40 @@ - diff --git a/broadcast/script.js b/broadcast/script.js index a8171ad..d63a52b 100644 --- a/broadcast/script.js +++ b/broadcast/script.js @@ -63,6 +63,9 @@ Script btnFilter.addEventListener ('click', filter); $ ('#btn-reset').on ('click', resetFilter); + + $ (window).resize (this.setPagination); + this.setPagination (); } static @@ -75,6 +78,21 @@ Script window.location.href = url; } + + static + setPagination () + { + for (let i = 0; i < 10; ++i) + $ (`.page-${i}`).removeClass ('d-none'); + + for (let i = 9; i > 0; --i) + { + if ($ ('.pagination').width () >= $ ('body').width () * .8) + $ (`.page-${i}`).addClass ('d-none'); + else + break; + } + } } From 1cc8ffe594e9f82bb5c70b1d9bea11500afb57ca Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 28 Feb 2024 02:58:10 +0900 Subject: [PATCH 20/22] =?UTF-8?q?=E7=B4=B0=E9=83=A8=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/.gitignore | 1 + broadcast/pagination.cmp.php | 10 +++++----- broadcast/script.js | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/broadcast/.gitignore b/broadcast/.gitignore index 045dbda..686adb2 100644 --- a/broadcast/.gitignore +++ b/broadcast/.gitignore @@ -1,2 +1,3 @@ /log.txt +/log2.txt diff --git a/broadcast/pagination.cmp.php b/broadcast/pagination.cmp.php index 929dfd2..4c88f00 100644 --- a/broadcast/pagination.cmp.php +++ b/broadcast/pagination.cmp.php @@ -1,5 +1,5 @@