[제나플러스] 통합검색만들기
본문
<!--SEARCH-->
<div style="text-align:center;">
<form name="fsearchbox" method="get" style="margin:0px;" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<?
$group_select = "<select id='gr_id' name='gr_id' class=select><option value=''>통합검색";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id not in ('banner','html','z9') 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;
?>
<INPUT name=stx class ='text_box' itemname="검색어" style="BORDER : 2px solid; border-color:#E1E1E1; HEIGHT: 20px; BACKGROUND-COLOR: #FFFFFF" size="45" minlength="2" maxlength="20">
<!--<input type="image" src="<?=$g4[path]?>/include/mainmenu/img/<?=$color_layer?>/search<?=$color_layer?>.gif" border="0">-->
<input type=submit value=' 검 색 ' style="background-color:#<?=$color_layer?>;border:1 solid #FFFFFF;color:FFFFFF;font-weight:bold;">
</form>
</div>
<script language="JavaScript">
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>
<!--/SEARCH-->
<div style="text-align:center;">
<form name="fsearchbox" method="get" style="margin:0px;" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<?
$group_select = "<select id='gr_id' name='gr_id' class=select><option value=''>통합검색";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id not in ('banner','html','z9') 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;
?>
<INPUT name=stx class ='text_box' itemname="검색어" style="BORDER : 2px solid; border-color:#E1E1E1; HEIGHT: 20px; BACKGROUND-COLOR: #FFFFFF" size="45" minlength="2" maxlength="20">
<!--<input type="image" src="<?=$g4[path]?>/include/mainmenu/img/<?=$color_layer?>/search<?=$color_layer?>.gif" border="0">-->
<input type=submit value=' 검 색 ' style="background-color:#<?=$color_layer?>;border:1 solid #FFFFFF;color:FFFFFF;font-weight:bold;">
</form>
</div>
<script language="JavaScript">
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>
<!--/SEARCH-->
추천0
댓글목록 0
등록된 댓글이 없습니다.