From 0731b57c800ed590a9c009f542b29ce023ca24d1 Mon Sep 17 00:00:00 2001 From: kagla Date: Fri, 13 Aug 2021 02:02:21 +0000 Subject: [PATCH] =?UTF-8?q?1:1=EB=AC=B8=EC=9D=98=EC=97=90=20=EC=A0=9C?= =?UTF-8?q?=EB=AA=A9,=20=EB=82=B4=EC=9A=A9,=20=EA=B8=80=EC=93=B4=EC=9D=B4,?= =?UTF-8?q?=20=ED=9A=8C=EC=9B=90=EC=95=84=EC=9D=B4=EB=94=94=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=ED=9B=84=20=EA=B2=80=EC=83=89=EC=9D=B4=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20(?= =?UTF-8?q?=EB=B6=81=EB=A7=88=ED=81=AC=EC=8A=A4=EB=8B=98,210812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/qalist.php | 28 +++++++++++++++---- lib/get_data.lib.php | 14 ++++++++++ mobile/skin/qa/basic/list.skin.php | 2 +- skin/qa/basic/list.skin.php | 2 +- .../basic/mobile/skin/qa/basic/list.skin.php | 2 +- theme/basic/skin/qa/basic/list.skin.php | 2 +- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/bbs/qalist.php b/bbs/qalist.php index 08fd0b175..63401e029 100644 --- a/bbs/qalist.php +++ b/bbs/qalist.php @@ -58,15 +58,33 @@ if(is_file($skin_file)) { $stx = trim($stx); if($stx) { - if (preg_match("/[a-zA-Z]/", $stx)) - $sql_search .= " and ( INSTR(LOWER(qa_subject), LOWER('$stx')) > 0 or INSTR(LOWER(qa_content), LOWER('$stx')) > 0 )"; - else - $sql_search .= " and ( INSTR(qa_subject, '$stx') > 0 or INSTR(qa_content, '$stx') > 0 ) "; + $sfl = trim($sfl); + if ($sfl) { + switch ($sfl) { + case "qa_subject" : + case "qa_content" : + case "qa_name" : + case "mb_id" : + break; + default : + $sfl = "qa_subject"; + } + } else { + $sfl = "qa_subject"; + } + $sql_search .= " and (`{$sfl}` like '%{$stx}%') "; } + // $stx = trim($stx); + // if($stx) { + // if (preg_match("/[a-zA-Z]/", $stx)) + // $sql_search .= " and ( INSTR(LOWER(qa_subject), LOWER('$stx')) > 0 or INSTR(LOWER(qa_content), LOWER('$stx')) > 0 )"; + // else + // $sql_search .= " and ( INSTR(qa_subject, '$stx') > 0 or INSTR(qa_content, '$stx') > 0 ) "; + // } $sql_order = " order by qa_num "; - $sql = " select count(*) as cnt + $sql = " select count(*) as cnt $sql_common $sql_search "; $row = sql_fetch($sql); diff --git a/lib/get_data.lib.php b/lib/get_data.lib.php index 9b92ebcd2..253f63962 100644 --- a/lib/get_data.lib.php +++ b/lib/get_data.lib.php @@ -457,6 +457,20 @@ function get_board_sfl_select_options($sfl){ return run_replace('get_board_sfl_select_options', $str, $sfl); } +function get_qa_sfl_select_options($sfl) { + + global $is_admin; + + $str = ''; + $str .= ''; + $str .= ''; + $str .= ''; + if ($is_admin) + $str .= ''; + + return run_replace('get_qa_sfl_select_options', $str, $sfl); +} + // 읽지 않은 메모 갯수 반환 function get_memo_not_read($mb_id, $add_where='') { diff --git a/mobile/skin/qa/basic/list.skin.php b/mobile/skin/qa/basic/list.skin.php index e9befda58..2f102f5e2 100644 --- a/mobile/skin/qa/basic/list.skin.php +++ b/mobile/skin/qa/basic/list.skin.php @@ -118,7 +118,7 @@ add_stylesheet('', 0); diff --git a/skin/qa/basic/list.skin.php b/skin/qa/basic/list.skin.php index e8af39051..47fdfb615 100644 --- a/skin/qa/basic/list.skin.php +++ b/skin/qa/basic/list.skin.php @@ -44,7 +44,7 @@ add_stylesheet('', 0);
diff --git a/theme/basic/mobile/skin/qa/basic/list.skin.php b/theme/basic/mobile/skin/qa/basic/list.skin.php index e9befda58..2f102f5e2 100644 --- a/theme/basic/mobile/skin/qa/basic/list.skin.php +++ b/theme/basic/mobile/skin/qa/basic/list.skin.php @@ -118,7 +118,7 @@ add_stylesheet('', 0); diff --git a/theme/basic/skin/qa/basic/list.skin.php b/theme/basic/skin/qa/basic/list.skin.php index e8af39051..47fdfb615 100644 --- a/theme/basic/skin/qa/basic/list.skin.php +++ b/theme/basic/skin/qa/basic/list.skin.php @@ -44,7 +44,7 @@ add_stylesheet('', 0);