테스트 사이트 - 개발 중인 베타 버전입니다

통합검색 결과 관련 질문입니다

· 12년 전 · 928 · 2
gamereporters_com_20130623_055618.jpg
현재 '리니지'라고 검색을하면 하나의 게시판이 검색 페이지를 모두 장식해

다른 게시판의 검색 결과를 보기 힘든 문제가 있습니다


$list[$idx][$i] 를 이용해

foreach ($list as $key = > $value) {
echo $bo_subject[$key];
for($i = 0; $i <= 원하는숫자; $i++) {
echo "- ".$value['subject']."<br>";
}
}

이런식으로 게시판별로 검색결과 출력갯수를 지정할 수 있다고 팁을 얻긴했는데

밤새 이것저것 대입해봤지만 계속 실패하고 있네요

조언부탁드립니다





<?
} // site arry bar end
} // site arry end
} // SITE END

} //그룹을 제어하기 위하여 다음 조건일 때 통과 END

// 내부검색 START (플러스, 블로그, 사이트 차단)
if ($gr_id != 'ucs_arry' && $gr_id != 'plus_arry' && $gr_id != 'blog_arry' && $gr_id != 'site_arry') {

// 검색어가 있을경우만 출력
if ($stx || $stx == '') {
?>
<div id="g_s_l">
<?
echo "<b>검색된 리스트</b> (<b>{$board_count}</b>개의 리스트, <b>".number_format($total_count)."</b>개의 게시글, <b>".number_format($page)."/".number_format($total_page)."</b> 페이지)<p>";
if ($board_count) {
if ($onetable)
echo "<a href='?$search_query&gr_id=$gr_id'>전체 검색</a><p>";
echo $str_board_list;
} else {
echo "<p>검색 결과가 없습니다.";
}
?>
</div>
<div id="t_bar"></div>
<?
}

$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++)
{
?>
<div id="g_l_t"><span class='sch_l_t'><?=$bo_subject[$idx]?></span></div>
<?
$comment_href = "";
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++)
//썸네일 코드 시작
{
//이미지 출력 시작
$img = $list[$idx][$i][wr_id];
$roo = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$search_table[$idx]' and wr_id = '$img' and bf_no = '0' ");
if (preg_match("/\.($config[cf_image_extension])$/i", $roo[bf_file])) {
$imgser = "<img src='$g4[path]/data/file/$search_table[$idx]/$roo[bf_file]' width=100 height=100 border=0>";
}

$data_path = $g4['path'] . "/data/file/{$search_table[$idx]}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumb_80_100';

$sch_w = 100; //썸네일 가로사이즈
$sch_h = 100; //썸네일 세로사이즈
$sch_q = 100; //썸네일 퀼리티

if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $roo[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $sch_w / $size[0];
$height = (int)($size[1] * $rate);

if ($height < $sch_h)
$dst = imagecreatetruecolor($sch_w, $height);
else
$dst = imagecreatetruecolor($sch_w, $sch_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $sch_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}

if (file_exists($thumb)) {
$img = "<img src='$thumb' align='absmiddle' border='0'>";
}
?>
<div id="g_l_l">
<table width="750" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<?
//이미지가 있을 때
if ($roo[bf_file] && file_exists($thumb)) {
?>
<td width="110" valign="middle">
<?
echo "<a href='{$list[$idx][$i][href]}{$comment_href}' target='_blank'>{$img}</a>";
?></td>
<? } ?>
<td valign="top" style="padding:0 10 0 0px;">
<?
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}' target='_blank'><span class='sch_l_s'>{$list[$idx][$i][subject]}</span></a>";
echo "&nbsp;&nbsp;&nbsp;<font color=#999999>".substr($list[$idx][$i][wr_datetime],0,16)."</font><br>";
//echo "&nbsp;&nbsp;&nbsp;{$list[$idx][$i][name]}";
echo "<span class='sch_l_c'>{$list[$idx][$i][content]}</span>";
?></td>
</tr>
</table>
</div>
<? } ?>
<? if (!$onetable) { ?>
<div id="g_l_a"><img src="<?=$search_skin_path?>/img/btn_more.gif" width="11" height="11" align="absmiddle">&nbsp;<a href="./search.php?sfl=wr_subject%7C%7Cwr_content&stx=<?=$urlencode?>&sop=<?=$sop?>&gr_id=<?=$gr_id?>&onetable=<?=$search_table[$idx]?>"><span class="sch_more"><?=$bo_subject[$idx]?> 더 보기</span></a></div>
<div id="t_bar"></div>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

12년 전
질문이,,,안니고,, 의뢰 인듯,
너무 무리한 질문이었군요 답변 감사합니다

게시글 목록

번호 제목
284348
284336
284333
284332
284320
284318
284316
284313
284307
284306
284303
284298
284296
284290
284286
284280
284277
284272
284261
284259