<? /* 다음 검색 결과  */ ?>
<style>
.non_search		{ text-align:center; padding:100px; }
.search_board_list		{ clear:both; line-height:130%; margin-bottom:15px; }
.search_board_list .subject a	{ color:#1122CC; font-size:13px; text-decoration:none; padding-bottom:2px; border-bottom:1px solid #1122CC; } /* 제목 */
.search_board_list .subject a:visited	{ color:#808000; }
.search_board_list .summary		{ margin-top:4px; }	/* 내용 */
.search_board_list .search_info	{ margin-top:3px; }
.search_board_list .search_info span.board_name	a { color:#A1BD86; padding-right:10px; }
.search_board_list .search_info span.date		{ color:#C7C7C7; font-family:Arial; font-size:11px; margin-right:20px; }

.search_key_css		{ font-weight:bold; }
</style>

<?
if($stx) $q = $stx;
else $q = $config[cf_title];
$url	= "http://apis.daum.net/search/web?q=".$q."&output=json&apikey=".$api_daum_web_search;
$data = zm_away_fopen($url);
$result = json_decode($data, true);
?>
<? if(count($result[channel][item])  <= 0) : ?>
	<div class="non_search"><span style="color:#808000;">"<?=$stx?>"</span>에 대한 검색 결과가 없습니다.</div>
<? else: //-- 검색 된 목록
        for ($i = 0; $i < count($result[channel][item]); $i++)  :
			$result[channel][item][$i][title] = str_replace(array("&lt;b&gt;", "&lt;/b&gt;"), "", $result[channel][item][$i][title]);
			$result[channel][item][$i][description] = str_replace(array("&lt;b&gt;", "&lt;/b&gt;"), "", $result[channel][item][$i][description]);
			$result[channel][item][$i][description] = keyword_css("$q", "search_key_css", $result[channel][item][$i][description]);
			$result[channel][item][$i][title] = keyword_css("$q", "search_key_css", $result[channel][item][$i][title]);
?>
			<div class="search_board_list">
				<div class="subject"><a href="<?=$result[channel][item][$i][link]?>" target="_blank"><?=$result[channel][item][$i][title]?></a></div>
				<div class="summary"><?=$result[channel][item][$i][description]?></div>
				<div class="search_info">
					<span class="board_name"><a href="<?=$result[channel][item][$i][link]?>" target="_blank"><?=$result[channel][item][$i][link]?></a></span>
					<span class="date"><?=$result[channel][item][$i][pubDate]?></span>
				</div>
			</div>	<!-- end search_board_list -->
<?		endfor; ?>
<? endif; ?>

<div style="margin:20px 0 20px 0;"><div class="line"></div></div>