<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
//이음 05.11.28 디자인 수정
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr height=5><td></td></tr></table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="dfdfdf">
  <tr>
    <td bgcolor="ffffff" style="padding-top:10px;padding-bottom:30px" class=search>


<table align=center width=90% cellpadding=2 cellspacing=0  align="center" bgcolor="ffffff" border=0>
<tr>
    <td style='word-break:break-all;' class=search>

        <? 
        if ($stx) 
        { 
            echo "<img src='$search_skin_path/img/icon_folder.gif' border='0' align='absmiddle'>&nbsp;<b>검색된 게시판 리스트</b> (<b>{$board_count}</b>개의 게시판, <b><?=number_format($total_count)?></b>개의 게시글, <?=number_format($page)?>/<b>".number_format($total_page)."</b> 페이지)";
            if ($board_count)
            {
                echo "<br><br><span style='line-height:130%;'>";
                if ($onetable)
                    echo "<img src='$search_skin_path/img/icon_folder2.gif' border='0' align='absmiddle'>&nbsp;<a href='?$search_query&gr_id=$gr_id'>전체게시판 검색</a><br>";
                //echo "<img src='$search_skin_path/img/icon_folder2.gif' border='0' align='absmiddle'>&nbsp;";
				echo $str_board_list;
                echo "</ul>";
            }
            else
            {	
				echo "<br><br>";
                $no_msg = "<ul style='line-height:130%;'><li><b>검색된 자료가 하나도 없습니다.</b></ul>";
            }
        }
        ?>
</td></tr>
<tr><td height="1" bgcolor="efefef"></td></tr>
<tr><td style="padding-top:15px">
		<?=$no_msg?>
        <? 
        $k=0;
        for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) 
        { 
            echo "<img src='$search_skin_path/img/icon_folder2.gif' border='0' align='absmiddle'>&nbsp;<b><a href='./board.php?bo_table={$search_table[$idx]}&{$search_query}'><u>{$bo_subject[$idx]}</u></a>에서의 검색결과</b>";
            $comment_href = "";
            for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) 
            {
				 $comment_href = "";
                echo "<ul style='line-height:130%;'> <img src='$search_skin_path/img/icon_list.gif' border='0' align='absmiddle'>&nbsp;";
                if ($list[$idx][$i][wr_is_comment]) 
                {
                    echo "<font color=999999>[코멘트]</font> ";
                    $comment_href = "#c_".$list[$idx][$i][wr_id];
                }
                echo "<a href='{$list[$idx][$i][href]}{$comment_href}' style='color:c05a0e;'>";
                echo $list[$idx][$i][subject];
                echo "</a> [<a href='{$list[$idx][$i][href]}{$comment_href}' target=_blank>새창</a>]<table height=5><tr><td></td></tr></table>";
                echo $list[$idx][$i][content];
                echo "<br><font color=#999999 face=tahoma size=1>{$list[$idx][$i][wr_datetime]}</font>&nbsp;&nbsp;&nbsp;";
                echo $list[$idx][$i][name];
                echo "</ul>";
            }
        }
        ?>
	</td>
<tr height="1"><td bgcolor=#efefef></td></tr>
<tr height="10"><td></td></tr>
<tr><td align=center>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
    <?
    // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
    //echo $write_pages;
    $write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
    $write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
    $write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
    $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
    $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
    $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
    ?>
    <?=$write_pages?>
    <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td></tr>  
</td></tr></table>


</td></tr></table>