Skip to content

Commit

Permalink
fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
satopian committed Apr 1, 2022
1 parent 0a025d7 commit d9ad471
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions potiboard5/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,25 +213,25 @@
//クエリを検索窓に入ったままにする
$dat['query']=h($query);
//ラジオボタンのチェック
$dat['radio_chk1']='';//作者名
$dat['radio_chk2']='';//完全一致
$dat['radio_chk3']='';//本文題名
$dat['radio_chk1']=false;//作者名
$dat['radio_chk2']=false;//完全一致
$dat['radio_chk3']=false;//本文題名
$query_l='&query='.urlencode(h($query));//クエリを次ページにgetで渡す
if($query!==''&&$radio===3){//本文題名
$query_l.='&radio=3';
$dat['radio_chk3']='checked="checked"';
$dat['radio_chk3']=true;
}
elseif($query!==''&&$radio===2){//完全一致
$query_l.='&radio=2';
$dat['radio_chk2']='checked="checked"';
$dat['radio_chk2']=true;
}
elseif($query!==''&&($radio===null||$radio===1)){//作者名
$query_l.='&radio=1';
$dat['radio_chk1']='checked="checked"';
$dat['radio_chk1']=true;
}
else{//作者名
$query_l='';
$dat['radio_chk1']='checked="checked"';
$dat['radio_chk1']=true;
}
$dat['query_l']=$query_l;

Expand Down
8 changes: 4 additions & 4 deletions potiboard5/templates/basic/search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
@if ($comments)
@if ($imgsearch)
<div class="newimg">
<ul>@foreach ($comments as $comment)<li class="catalog"><a href={{$comment['link']}}" target="_blank"><img
<ul>@foreach ($comments as $comment)<li class="catalog"><a href="{{$comment['link']}}" target="_blank"><img
src="{{$comment['img']}}"
alt="{{$comment['sub']}}」イラスト/{{$comment['name']}}{{$comment['postedtime']}}"
title="{{$comment['sub']}}」by {{$comment['name']}} {{$comment['postedtime']}}"
Expand Down Expand Up @@ -89,11 +89,11 @@ class="res_button"></form><span class="page_top"><a href="#top">△</a></span>
<p></p>
<form method="get" action="./search.php">
<span class="radio">
<input type="radio" name="radio" id="author" value="1" {{$radio_chk1}}><label for="author"
<input type="radio" name="radio" id="author" value="1" @if($radio_chk1)checked="checked"@endif><label for="author"
class="label">名前</label>
<input type="radio" name="radio" id="exact" value="2" {{$radio_chk2}}><label for="exact"
<input type="radio" name="radio" id="exact" value="2" @if($radio_chk2)checked="checked"@endif><label for="exact"
class="label">完全一致</label>
<input type="radio" name="radio" id="fulltext" value="3" {{$radio_chk3}}><label for="fulltext"
<input type="radio" name="radio" id="fulltext" value="3" @if($radio_chk3)checked="checked"@endif><label for="fulltext"
class="label">本文題名</label>
</span>
<br>
Expand Down
6 changes: 3 additions & 3 deletions potiboard5/templates/mono/search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ function SetCookie(key, val) {
<p></p>
<form method="get" action="./search.php">
<span class="radio">
<input type="radio" name="radio" id="author" value="1" {{$radio_chk1}}><label for="author"
<input type="radio" name="radio" id="author" value="1" @if($radio_chk1)checked="checked"@endif><label for="author"
class="label">名前</label>
<input type="radio" name="radio" id="exact" value="2" {{$radio_chk2}}><label for="exact"
<input type="radio" name="radio" id="exact" value="2" @if($radio_chk2)checked="checked"@endif><label for="exact"
class="label">完全一致</label>
<input type="radio" name="radio" id="fulltext" value="3" {{$radio_chk3}}><label for="fulltext"
<input type="radio" name="radio" id="fulltext" value="3" @if($radio_chk3)checked="checked"@endif><label for="fulltext"
class="label">本文題名</label>
</span>
<br>
Expand Down

0 comments on commit d9ad471

Please sign in to comment.