From a2222605ca7b14dac62e816bece777b9c6b55376 Mon Sep 17 00:00:00 2001 From: satopian Date: Sun, 15 Dec 2024 20:41:46 +0900 Subject: [PATCH] =?UTF-8?q?=E5=89=8A=E9=99=A4=E5=87=A6=E7=90=86=E3=81=AE?= =?UTF-8?q?=E3=81=82=E3=81=A8=E3=81=AELocation=E3=81=AE=E5=88=86=E5=B2=90?= =?UTF-8?q?=E3=82=92=E6=97=A2=E5=AD=98=E3=81=AE=E9=96=A2=E6=95=B0=E3=81=A7?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=97=E3=81=A6=E8=A1=8C=E6=95=B0=E3=82=92?= =?UTF-8?q?=E6=B8=9B=E3=82=89=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- petitnote/functions.php | 4 ++++ petitnote/index.php | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/petitnote/functions.php b/petitnote/functions.php index 2d71b08..19cf0b0 100644 --- a/petitnote/functions.php +++ b/petitnote/functions.php @@ -229,6 +229,7 @@ function set_darkmode(){ function branch_destination_of_location(){ $page=(int)filter_input(INPUT_POST,'postpage',FILTER_VALIDATE_INT); $resno=(int)filter_input(INPUT_POST,'resno',FILTER_VALIDATE_INT); + $resno= $resno ? $resno : (int)filter_input(INPUT_POST,'postresno',FILTER_VALIDATE_INT); $catalog=(bool)filter_input(INPUT_POST,'catalog',FILTER_VALIDATE_BOOLEAN); $search=(bool)filter_input(INPUT_POST,'search',FILTER_VALIDATE_BOOLEAN); $paintcom=(bool)filter_input(INPUT_POST,'paintcom',FILTER_VALIDATE_BOOLEAN); @@ -238,6 +239,9 @@ function branch_destination_of_location(){ return header('Location: ./?mode=paintcom'); } if($resno){ + if(!is_file(LOG_DIR.$resno.'.log')){ + return header('Location: ./'); + } $res_catalog = $res_catalog ? '&res_catalog=on' : ''; return header('Location: ./?resno='.h($resno).$res_catalog); } diff --git a/petitnote/index.php b/petitnote/index.php index 915b4fd..d296505 100644 --- a/petitnote/index.php +++ b/petitnote/index.php @@ -2064,15 +2064,8 @@ function del(){ closeFile($fp); unset($_SESSION['userdel']); - $resno=(string)filter_input(INPUT_POST,'postresno',FILTER_VALIDATE_INT); //多重送信防止 - if((bool)filter_input(INPUT_POST,'resmode',FILTER_VALIDATE_BOOLEAN)){ - if(!is_file(LOG_DIR.$resno.'.log')){ - return header('Location: ./'); - } - return header('Location: ./?resno='.$resno); - } - return header('Location: ./?page='.(int)filter_input(INPUT_POST,'postpage',FILTER_VALIDATE_INT)); + branch_destination_of_location(); } //シェアするserverの選択画面