<?
require_once('include/global.php');
require_once("include/board_lib.php");
require_once('./conf.inc.php');


$CFG['TITLE'] = '<b>'.get_bm_name($_GET['bm_no']).'</b>';


// [2020-02] KVE SQL Injection 개선
$q_where = '';
$s_kind = htmlspecialchars_fix(stripslashes($s_kind));

	// search
		if ($s_word == true)		// search mode
		{
			set_q_search($s_word);
			switch($s_kind)
			{
				case "ALL":
					$q_where .= " AND (b_subject like '%" . del_injection_str($s_word) . "%' ";
					$q_where .= " OR b_memo like '%" . del_injection_str($s_word) . "%' ";
					$q_where .= " OR b_name like '%" . del_injection_str($s_word) . "%') ";
					break;

				default:
					$q_where .= " AND " . del_injection_str($s_kind, "b_subject") . " like '%" . del_injection_str($s_word) . "%' ";
					break;
			}	// switch()

			$null_msg = "검색된 글이 없습니다.";
		}else		// normail mode
		{
			$null_msg = "등록된 글이 없습니다.";
		}	// if()

		$s_kind = select_list_value($s_kind, array_values($G_BOARD[S_KIND]), array_keys($G_BOARD[S_KIND]), NULL, 0, 1);
		$v_s_word = input_value($s_word,1);



// view
	nskinset('board', 'new.html');
	include($NSKIN['view_layout']);


?>