사용자: 전체검색스킨
This commit is contained in:
@ -129,7 +129,7 @@ if ($stx) {
|
||||
|
||||
$sql2 = " select bo_subject from {$g4['board_table']} where bo_table = '{$g4_search['tables'][$i]}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$str_board_list .= '<li><a href="'.$_SERVER['PHP_SELF'].'?'.$search_query.'&gr_id='.$gr_id.'&onetable='.$g4_search['tables'][$i].'" id="'.$row2['bo_table'].'">'.$row2['bo_subject'].'</a> ('.$row['cnt'].')';
|
||||
$str_board_list .= '<li><a href="'.$_SERVER['PHP_SELF'].'?'.$search_query.'&gr_id='.$gr_id.'&onetable='.$g4_search['tables'][$i].'" id="'.$row2['bo_table'].'">'.$row2['bo_subject'].PHP_EOL.'<span class="sound_only">갯수</span><span class="cnt_cmt">'.$row['cnt'].'</span></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ input {margin:0;padding:0;font-family:"verdana","dotum"}
|
||||
p {margin:5px 0;padding:10px 0;line-height:1.5em}
|
||||
hr {display:none}
|
||||
|
||||
/* 웹접근성 스킬 */
|
||||
/* 웹접근성 스킬 --- 기본 block 속성에는 적용 안됨*/
|
||||
.sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;border:0;overflow:hidden}
|
||||
/* 본문 바로가기 */
|
||||
#to_content a {z-index:100000000;display:block;position:absolute;top:0;left:0;height:0;overflow:hidden}
|
||||
@ -210,6 +210,8 @@ a {color:#000;text-decoration:none}
|
||||
/* ##################################################################### 스킨 및 컨텐츠 */
|
||||
/* 공통 */
|
||||
.cnt_cmt {display:inline-block;margin-left:10px;color:#ff3061}
|
||||
.readonly {background:#ff3061}
|
||||
.highlight {font-weight:bold;color:#ff3061}
|
||||
|
||||
/* 버튼 */
|
||||
.btn01 {display:inline-block;padding:0 10px;height:24px;border:1px solid #ff5e1c;background:#ff3061;color:#fff;font-size:0.75em;text-decoration:none;line-height:2.2em}
|
||||
@ -244,8 +246,6 @@ a {color:#000;text-decoration:none}
|
||||
.frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent}
|
||||
.frm_tbl #captcha input {margin-left:5px}
|
||||
|
||||
.readonly {background:#ff3061}
|
||||
|
||||
/* 최신글 */
|
||||
.latest {clear:both;position:relative;margin-bottom:30px;padding:0 0 20px;border-bottom:1px solid #ccc;font-size:0.75em}
|
||||
.latest strong {display:block;margin-bottom:15px;padding:0 10px 10px;border-bottom:1px solid #eee;font-size:1.1em}
|
||||
@ -274,15 +274,30 @@ a {color:#000;text-decoration:none}
|
||||
#current_connect_tbl .td_name {text-align:center}
|
||||
|
||||
/* 전체검색 */
|
||||
#sch_result_hd {margin:0;border:1px solid #ddd;background:#fff}
|
||||
#sch_result_hd dt {padding:10px;background:#f5f5f2}
|
||||
#sch_result_detail {margin:0;padding:15px 0;border:0;border-top:1px solid #ddd;text-align:center}
|
||||
#sch_result_detail label {font-size:0.75em}
|
||||
#sch_result_hd {margin:0;border:0;background:#fff;font-size:0.75em}
|
||||
#sch_result_hd dt {padding:10px;background:#eee}
|
||||
#sch_result_hd dd {margin:0;padding:0}
|
||||
.sch_result {}
|
||||
.sch_result dt {font-weight:bold}
|
||||
.sch_result dd {margin-bottom:30px}
|
||||
.sch_result ul {padding:0}
|
||||
.sch_result li {padding:10px 0;border-bottom:1px solid #ddd}
|
||||
.sch_result p {margin:5px 0;padding:0;font-size:0.75em}
|
||||
#sch_result_hd ul {padding:0;list-style:none;zoom:1}
|
||||
#sch_result_hd ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#sch_result_hd li {float:left;padding:0 10px;border-right:1px solid #999}
|
||||
#sch_result {position:relative;padding:30px 0 0 200px;border-top:1px solid #ddd;border-bottom:1px solid #ddd;background:url('../img/sch_result_bg.jpg') repeat-y}
|
||||
#sch_result dl {margin:0;padding:0}
|
||||
#sch_result dt {font-weight:bold}
|
||||
#sch_result ul {margin:0;padding:0;list-style:none}
|
||||
#sch_result p {margin:5px 0;padding:0;font-size:0.75em}
|
||||
#sch_result_bo {position:absolute;top:0;left:0;width:170px;font-size:0.875em}
|
||||
#sch_result_bo dt {margin:0;padding:0;height:0;border:0;overflow:hidden}
|
||||
#sch_result_bo dd {margin:0}
|
||||
#sch_result_bo li {position:relative;margin-top:-1px}
|
||||
#sch_result_bo a {display:inline-block;padding:10px 0 10px 10px;width:160px;border:1px solid #ddd;background:#eee}
|
||||
#sch_result_bo .cnt_cmt {color:#000}
|
||||
#sch_result_atc li {padding:10px 0}
|
||||
#sch_result_atc dt a {display:inline-block;margin-bottom:15px;font-size:0.75em}
|
||||
#sch_result_atc dd {margin:0 0 30px;border-bottom:1px solid #ddd}
|
||||
#sch_result_atc p {color:#888}
|
||||
.sch_more {padding:10px 0 15px;font-size:0.75em;text-align:right}
|
||||
.sch_sideview {display:inline-block;font-size:0.75em}
|
||||
.sch_datetime {font-size:0.75em}
|
||||
|
||||
|
||||
BIN
img/sch_result_bg.jpg
Normal file
BIN
img/sch_result_bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@ -2,14 +2,70 @@
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<form name="fsearch" method="get" onsubmit="return fsearch_submit(this);">
|
||||
<input type="hidden" name="srows" value="<?=$srows?>">
|
||||
<fieldset id="sch_result_detail">
|
||||
<legend class="sound_only">상세검색</legend>
|
||||
<?=$group_select?>
|
||||
<script>document.getElementById("gr_id").value = "<?=$gr_id?>";</script>
|
||||
|
||||
<select name="sfl" title="검색조건">
|
||||
<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>
|
||||
|
||||
<input type="text" name="stx" class="fieldset_input" class="required" value="<?=$text_stx?>" maxlength="20" required title="검색어">
|
||||
|
||||
<input type="submit" class="fieldset_submit" value="검색">
|
||||
|
||||
<script>
|
||||
document.fsearch.sfl.value = "<?=$sfl?>";
|
||||
function fsearch_submit(f)
|
||||
{
|
||||
if (f.stx.value.length < 2) {
|
||||
alert("검색어는 두글자 이상 입력하십시오.");
|
||||
f.stx.select();
|
||||
f.stx.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
|
||||
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 false;
|
||||
}
|
||||
|
||||
f.action = "";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<input type="radio" id="sop_or" name="sop" value="or" <?=($sop == "or") ? "checked" : "";?>>
|
||||
<label for="sop_or">OR</label>
|
||||
<input type="radio" id="sop_and" name="sop" value="and" <?=($sop == "and") ? "checked" : "";?>>
|
||||
<label for="sop_and">AND</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
||||
<? if ($stx) { ?>
|
||||
<? if ($board_count) { ?>
|
||||
<dl id="sch_result_hd">
|
||||
<dt>검색어 <strong><?=$stx?></strong>에 대한 결과입니다.</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><span class="span_highlight"><?=$board_count?></span>개의 게시판</li>
|
||||
<li><span class="span_highlight"><?=number_format($total_count)?></span>개의 게시글</li>
|
||||
<li><span class="highlight"><?=$board_count?></span>개의 게시판</li>
|
||||
<li><span class="highlight"><?=number_format($total_count)?></span>개의 게시글</li>
|
||||
<li>현재 <?=number_format($page)?>/<?=number_format($total_page)?> 페이지 열람 중</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -17,112 +73,62 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
if ($stx) {
|
||||
if ($board_count) {
|
||||
?>
|
||||
<dl class="sch_result">
|
||||
<dt>검색결과가 있는 게시판 목록</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<? if ($onetable) { ?>
|
||||
<li><a href="?<?=$search_query?>&gr_id=<?=$gr_id?>">전체게시판 검색</a>
|
||||
<div id="sch_result">
|
||||
|
||||
<?
|
||||
if ($stx) {
|
||||
if ($board_count) {
|
||||
?>
|
||||
<dl id="sch_result_bo">
|
||||
<dt>검색결과가 있는 게시판 목록</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a href="?<?=$search_query?>&gr_id=<?=$gr_id?>">전체게시판</a>
|
||||
<?=$str_board_list;?>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<p>검색된 자료가 하나도 없습니다.</p>
|
||||
<? } } ?>
|
||||
|
||||
<hr>
|
||||
|
||||
<? if ($stx && $board_count) { ?><dl id="sch_result_atc"><? } ?>
|
||||
<?
|
||||
$k=0;
|
||||
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
|
||||
$comment_href = "";
|
||||
?>
|
||||
<dt><a href="./board.php?bo_table=<?=$search_table[$idx]?>&<?=$search_query?>"><?=$bo_subject[$idx]?>에서</a></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<?
|
||||
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
|
||||
if ($list[$idx][$i][wr_is_comment])
|
||||
{
|
||||
echo "댓글 ";
|
||||
$comment_href = "#c_".$list[$idx][$i][wr_id];
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>"><b><?=$list[$idx][$i][subject]?></b></a>
|
||||
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>" target="_blank">새창</a>
|
||||
<p><?=$list[$idx][$i][content]?></p>
|
||||
<div class="sch_sideview"><?=$list[$idx][$i][name]?></div>
|
||||
<span class="sch_datetime"><?=$list[$idx][$i][wr_datetime]?></span>
|
||||
</li>
|
||||
<? } ?>
|
||||
<?=$str_board_list;?>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<p>검색된 자료가 하나도 없습니다.</p>
|
||||
<? } } ?>
|
||||
</ul>
|
||||
<div class="sch_more"><a href="./board.php?bo_table=<?=$search_table[$idx]?>&<?=$search_query?>"><?=$bo_subject[$idx]?> 더보기</a></div>
|
||||
</dd>
|
||||
<? } ?>
|
||||
<? if ($stx && $board_count) { ?></dl><? } ?>
|
||||
|
||||
<hr>
|
||||
<div class="pg">
|
||||
<?=$write_pages?>
|
||||
</div>
|
||||
|
||||
<? if ($stx && $board_count) { ?><dl class="sch_result"><? } ?>
|
||||
<?
|
||||
$k=0;
|
||||
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
|
||||
$comment_href = "";
|
||||
?>
|
||||
<dt><a href="./board.php?bo_table=<?=$search_table[$idx]?>&<?=$search_query?>"><?=$bo_subject[$idx]?></a>에서의 검색결과</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<?
|
||||
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
|
||||
if ($list[$idx][$i][wr_is_comment])
|
||||
{
|
||||
echo "댓글 ";
|
||||
$comment_href = "#c_".$list[$idx][$i][wr_id];
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>"><?=$list[$idx][$i][subject]?></a>
|
||||
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>" target="_blank">새창</a>
|
||||
<p><?=$list[$idx][$i][content]?></p>
|
||||
<div class="sch_sideview"><?=$list[$idx][$i][name]?></div>
|
||||
<span class="sch_datetime"><?=$list[$idx][$i][wr_datetime]?></span>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</dd>
|
||||
<? } ?>
|
||||
<? if ($stx && $board_count) { ?></dl><? } ?>
|
||||
|
||||
<div class="pg">
|
||||
<?=$write_pages?>
|
||||
</div>
|
||||
|
||||
<form name="fsearch" method="get" onsubmit="return fsearch_submit(this);">
|
||||
<input type="hidden" name="srows" value="<?=$srows?>">
|
||||
<fieldset>
|
||||
<legend>상세검색</legend>
|
||||
<?=$group_select?>
|
||||
<script>document.getElementById("gr_id").value = "<?=$gr_id?>";</script>
|
||||
|
||||
<select name="sfl" title="검색조건">
|
||||
<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>
|
||||
|
||||
<input type="text" name="stx" class="fieldset_input" class="required" value="<?=$text_stx?>" maxlength="20" required title="검색어">
|
||||
|
||||
<input type="submit" class="fieldset_submit" value="검색">
|
||||
|
||||
<script>
|
||||
document.fsearch.sfl.value = "<?=$sfl?>";
|
||||
function fsearch_submit(f)
|
||||
{
|
||||
if (f.stx.value.length < 2) {
|
||||
alert("검색어는 두글자 이상 입력하십시오.");
|
||||
f.stx.select();
|
||||
f.stx.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
|
||||
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 false;
|
||||
}
|
||||
|
||||
f.action = "";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<input type="radio" id="sop_or" name="sop" value="or" <?=($sop == "or") ? "checked" : "";?>> <label for="sop_or">OR</label>
|
||||
<input type="radio" id="sop_and" name="sop" value="and" <?=($sop == "and") ? "checked" : "";?>> <label for="sop_and">AND</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user