185 lines
9.0 KiB
PHP
185 lines
9.0 KiB
PHP
<?php
|
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|
|
|
if(defined('G5_THEME_PATH')) {
|
|
require_once(G5_THEME_PATH.'/head.php');
|
|
return;
|
|
}
|
|
|
|
if (G5_IS_MOBILE) {
|
|
include_once(G5_MOBILE_PATH.'/head.php');
|
|
return;
|
|
}
|
|
|
|
include_once(G5_PATH.'/head.sub.php');
|
|
include_once(G5_LIB_PATH.'/latest.lib.php');
|
|
include_once(G5_LIB_PATH.'/outlogin.lib.php');
|
|
include_once(G5_LIB_PATH.'/poll.lib.php');
|
|
include_once(G5_LIB_PATH.'/visit.lib.php');
|
|
include_once(G5_LIB_PATH.'/connect.lib.php');
|
|
include_once(G5_LIB_PATH.'/popular.lib.php');
|
|
?>
|
|
|
|
<!-- 상단 시작 { -->
|
|
<div id="hd">
|
|
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
|
|
|
|
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
|
|
|
|
<?php
|
|
if(defined('_INDEX_')) { // index에서만 실행
|
|
include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어
|
|
}
|
|
?>
|
|
<div id="tnb">
|
|
<ul>
|
|
<?php if ($is_member) { ?>
|
|
<?php if ($is_admin) { ?>
|
|
<li class="tnb_right"><a href="<?php echo G5_ADMIN_URL ?>" class="tnb_admin"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
|
|
<?php } ?>
|
|
<li class="tnb_right"><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php"><i class="fa fa-cog" aria-hidden="true"></i> 정보수정</a></li>
|
|
<li class="tnb_right"><a href="<?php echo G5_BBS_URL ?>/logout.php"><i class="fa fa-sign-out" aria-hidden="true"></i> 로그아웃</a></li>
|
|
<?php } else { ?>
|
|
<li class="tnb_right"><a href="<?php echo G5_BBS_URL ?>/register.php"><i class="fa fa-user-plus" aria-hidden="true"></i> 회원가입</a></li>
|
|
<li class="tnb_right"><a href="<?php echo G5_BBS_URL ?>/login.php"><b><i class="fa fa-sign-in" aria-hidden="true"></i> 로그인</b></a></li>
|
|
<?php } ?>
|
|
<li><a href="<?php echo G5_BBS_URL ?>/faq.php"><i class="fa fa-question-circle" aria-hidden="true"></i> FAQ</a></li>
|
|
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php"><i class="fa fa-comments" aria-hidden="true"></i> 1:1문의</a></li>
|
|
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" class="visit"><i class="fa fa-users" aria-hidden="true"></i> 접속자 <span><?php echo connect(); // 현재 접속자수, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?></span></a></li>
|
|
<li><a href="<?php echo G5_BBS_URL ?>/new.php"><i class="fa fa-history" aria-hidden="true"></i> 새글</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div id="hd_wrapper">
|
|
|
|
<div id="logo">
|
|
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
|
|
</div>
|
|
|
|
<nav id="gnb">
|
|
<h2>메인메뉴</h2>
|
|
<ul id="gnb_1dul">
|
|
<?php
|
|
$sql = " select *
|
|
from {$g5['menu_table']}
|
|
where me_use = '1'
|
|
and length(me_code) = '2'
|
|
order by me_order, me_id ";
|
|
$result = sql_query($sql, false);
|
|
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
|
|
|
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
|
?>
|
|
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex--; ?>">
|
|
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_1da"><?php echo $row['me_name'] ?></a>
|
|
<?php
|
|
$sql2 = " select *
|
|
from {$g5['menu_table']}
|
|
where me_use = '1'
|
|
and length(me_code) = '4'
|
|
and substring(me_code, 1, 2) = '{$row['me_code']}'
|
|
order by me_order, me_id ";
|
|
$result2 = sql_query($sql2);
|
|
|
|
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
|
if($k == 0)
|
|
echo '<span class="bg">하위분류</span><ul class="gnb_2dul">'.PHP_EOL;
|
|
?>
|
|
<li class="gnb_2dli"><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="gnb_2da"><?php echo $row2['me_name'] ?></a></li>
|
|
<?php
|
|
}
|
|
|
|
if($k > 0)
|
|
echo '</ul>'.PHP_EOL;
|
|
?>
|
|
</li>
|
|
<?php
|
|
}
|
|
|
|
if ($i == 0) { ?>
|
|
<li id="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
|
|
<?php } ?>
|
|
</ul>
|
|
|
|
</nav>
|
|
<div class="hd_sch_wr">
|
|
<button type="button" id="sch_op_btn"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색 열기</span></button>
|
|
<fieldset id="hd_sch" >
|
|
<legend>사이트 내 전체검색</legend>
|
|
<form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
|
|
<input type="hidden" name="sfl" value="wr_subject||wr_content">
|
|
<input type="hidden" name="sop" value="and">
|
|
<label for="sch_stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
|
<input type="text" name="stx" id="sch_stx" maxlength="20">
|
|
<button type="submit" id="sch_submit" value="검색"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button>
|
|
<button type="button" id="sch_cl_btn">검색 닫기</button>
|
|
</form>
|
|
|
|
<script>
|
|
function fsearchbox_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;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
</script>
|
|
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- } 상단 끝 -->
|
|
<script>
|
|
jQuery(function($){
|
|
$("#sch_op_btn").on("click", function() {
|
|
$("#hd_sch").css("display","block");
|
|
});
|
|
$("#sch_cl_btn").on("click", function() {
|
|
$("#hd_sch").css("display","none");
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<hr>
|
|
|
|
<!-- 콘텐츠 시작 { -->
|
|
<div id="wrapper">
|
|
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span><?php echo $g5['title'] ?></span></h2><?php } ?>
|
|
<div id="container_wr">
|
|
<?php if(!defined('ASIDE_DISABLE')) { ?>
|
|
<div id="aside">
|
|
<?php echo outlogin(); // 외부 로그인, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
|
<?php echo poll(); // 설문조사, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
|
<?php echo popular(); // 인기검색어, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
|
<?php echo visit(); // 접속자집계, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
|
|
|
<div id="text_size">
|
|
<div>
|
|
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
|
|
<button id="size_down" onclick="font_resize('container', 'ts_up ts_up2', '');" class="select"><img src="<?php echo G5_URL; ?>/img/ts01.png" alt="기본" width="20"></button>
|
|
<button id="size_def" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');"><img src="<?php echo G5_URL; ?>/img/ts02.png" alt="크게" width="20"></button>
|
|
<button id="size_up" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');"><img src="<?php echo G5_URL; ?>/img/ts03.png" alt="더크게" width="20"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } //end if ?>
|
|
<div id="container" class="<?php echo defined('ASIDE_DISABLE') ? 'aside_disable' : ''; ?>">
|