검색 스킨 불러오는 방법... 정보
검색 스킨 불러오는 방법...본문
검색 스킨을 불러오는 방법이 어떻게 되나요
유아원님의 통합검색을 사용하고 있는데
인클루드 방식으로 해보았는데 되긴 되는데 좀 이상하게 깨져 나오기도 하고 그래서..
다른 방법은 있나요?
댓글 전체
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "통합검색";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/headsearch.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
<table align="center" cellpadding="0" cellspacing="0" width="900">
<tr>
<td width="20" height="75"><img src="<?=$g4[path]?>/img/index/bar01.gif" width="20" height="75" border="0"></td>
<td width="860" height="75" background="<?=$g4[path]?>/img/index/bar02.gif">
<table cellpadding="0" cellspacing="0">
<tr>
<td width="850" height="5"></td>
</tr>
<tr>
<td width="850" height="29">
<table width="600" height="25" cellpadding="0" cellspacing="0" border="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td style='padding:0 5px;' height="34" width="0">
<?
$group_select = "<select style='width:83px; height:10px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>등록업체";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'house' and gr_id != 'banner' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
echo $group_select;
?>
</td>
<td width="87" height="34">
<select name=sfl class=select>
<option value="wr_subject||wr_content">제목+내용</option>
<option value="wr_subject">제목</option>
<option value="wr_content">내용</option>
<option value="mb_id">회원아이디</option>
<option value="wr_name">이름</option>
</select>
</td>
<td width="400" align="center" height="34">
<input type="text" name="stx" style="width:350px; height:19px; background:#ffffff;border:1px;" class=scinput tabindex=1></td>
<td width="70" height="34">
<input type="image" src="http://www.okpcas.co.kr/cart/skin/search/basic/img/search_btn.gif" border="0" align="absmiddle" onfocus="this.blur()"></td>
</form>
<script language="JavaScript">
document.onload = document.fsearchbox.stx.focus();
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("가까운 컴퓨터 전문점을 찾으세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
</tr>
</table>
</td>
</tr>
<tr>
<td width="850" height="30"></td>
</tr>
</table>
</td>
<td width="20" height="75"><img src="<?=$g4[path]?>/img/index/bar04.gif" width="20" height="75" border="0"></td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0" width="900">
<tr>
<td width="440" height="250" align="center" valign="top">
<table cellpadding="0" cellspacing="0" width="420">
<tr>
<td width="420"></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'notice', 5, 30); ?></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'free', 5, 30);?></td>
</tr>
</table>
</td>
<td width="10" height="250" align="center" valign="top"></td>
<td width="450" height="250" align="center" valign="top">
<table cellpadding="0" cellspacing="0" width="420">
<tr>
<td width="420"></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'qa', 5, 30);?></td>
</tr>
<tr>
<td width="420"><?=latest('stand_ticker2', 'util', 5, 30);?></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'market', 5, 30);?></td></td>
</tr>
</table>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
include_once("$g4[path]/tailsearch.php");
?>
한번 보셔요 ~ 사용중인 소스 입니다.
결과는 http://okpcas.co.kr/cart/search.php 입니다.
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "통합검색";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/headsearch.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
<table align="center" cellpadding="0" cellspacing="0" width="900">
<tr>
<td width="20" height="75"><img src="<?=$g4[path]?>/img/index/bar01.gif" width="20" height="75" border="0"></td>
<td width="860" height="75" background="<?=$g4[path]?>/img/index/bar02.gif">
<table cellpadding="0" cellspacing="0">
<tr>
<td width="850" height="5"></td>
</tr>
<tr>
<td width="850" height="29">
<table width="600" height="25" cellpadding="0" cellspacing="0" border="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td style='padding:0 5px;' height="34" width="0">
<?
$group_select = "<select style='width:83px; height:10px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>등록업체";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'house' and gr_id != 'banner' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
echo $group_select;
?>
</td>
<td width="87" height="34">
<select name=sfl class=select>
<option value="wr_subject||wr_content">제목+내용</option>
<option value="wr_subject">제목</option>
<option value="wr_content">내용</option>
<option value="mb_id">회원아이디</option>
<option value="wr_name">이름</option>
</select>
</td>
<td width="400" align="center" height="34">
<input type="text" name="stx" style="width:350px; height:19px; background:#ffffff;border:1px;" class=scinput tabindex=1></td>
<td width="70" height="34">
<input type="image" src="http://www.okpcas.co.kr/cart/skin/search/basic/img/search_btn.gif" border="0" align="absmiddle" onfocus="this.blur()"></td>
</form>
<script language="JavaScript">
document.onload = document.fsearchbox.stx.focus();
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("가까운 컴퓨터 전문점을 찾으세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
</tr>
</table>
</td>
</tr>
<tr>
<td width="850" height="30"></td>
</tr>
</table>
</td>
<td width="20" height="75"><img src="<?=$g4[path]?>/img/index/bar04.gif" width="20" height="75" border="0"></td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0" width="900">
<tr>
<td width="440" height="250" align="center" valign="top">
<table cellpadding="0" cellspacing="0" width="420">
<tr>
<td width="420"></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'notice', 5, 30); ?></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'free', 5, 30);?></td>
</tr>
</table>
</td>
<td width="10" height="250" align="center" valign="top"></td>
<td width="450" height="250" align="center" valign="top">
<table cellpadding="0" cellspacing="0" width="420">
<tr>
<td width="420"></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'qa', 5, 30);?></td>
</tr>
<tr>
<td width="420"><?=latest('stand_ticker2', 'util', 5, 30);?></td>
</tr>
<tr>
<td width="420"><?=latest('basic-1', 'market', 5, 30);?></td></td>
</tr>
</table>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
include_once("$g4[path]/tailsearch.php");
?>
한번 보셔요 ~ 사용중인 소스 입니다.
결과는 http://okpcas.co.kr/cart/search.php 입니다.