This repository was archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathhead.sub.php
More file actions
executable file
·93 lines (75 loc) · 2.8 KB
/
head.sub.php
File metadata and controls
executable file
·93 lines (75 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
// 쇼핑몰 체크
(IS_YC && defined('_SHOP_')) ? define('IS_SHOP', true) : define('IS_SHOP', false);
// 쇼핑몰 타이틀
if(IS_SHOP && isset($nariya['seo_shop_title']) && $nariya['seo_shop_title'])
$config['cf_title'] = $nariya['seo_shop_title'];
// 인덱스
(defined('_INDEX_')) ? define('IS_INDEX', true) : define('IS_INDEX', false);
if (!isset($g5['title'])) {
$g5['title'] = $config['cf_title'];
$g5_head_title = $g5['title'];
}
else {
// 상태바에 표시될 제목
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
}
$g5['title'] = strip_tags($g5['title']);
$g5_head_title = strip_tags($g5_head_title);
// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
$g5['lo_location'] = addslashes($g5['title']);
if (!$g5['lo_location'])
$g5['lo_location'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
$g5['lo_url'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
if (strstr($g5['lo_url'], '/'.G5_ADMIN_DIR.'/') || $is_admin == 'super') $g5['lo_url'] = '';
/*
// 만료된 페이지로 사용하시는 경우
header("Cache-Control: no-cache"); // HTTP/1.1
header("Expires: 0"); // rfc2616 - Section 14.21
header("Pragma: no-cache"); // HTTP/1.0
*/
// 레이아웃 상수
$layout_skin = '';
if(IS_YC) {
if(IS_SHOP) {
$layout_skin = G5_IS_MOBILE ? $nariya['layout_shop_mo'] : $nariya['layout_shop_pc'];
} else {
$layout_skin = G5_IS_MOBILE ? $nariya['layout_mo'] : $nariya['layout_pc'];
}
} else {
$layout_skin = G5_IS_MOBILE ? $nariya['layout_mo'] : $nariya['layout_pc'];
}
// 미리보기
if (IS_DEMO) {
if (isset($_REQUEST['pv']) && $_REQUEST['pv'])
set_session('pv', na_fid($_REQUEST['pv']));
$pv_layout_ = na_fid(get_session('pv'));
if ($pv_layout) {
if ($pv_layout == '1' || !is_dir(G5_THEME_PATH.'/layout/'.$pv_layout)) {
set_session('pv', '');
} else {
$layout_skin = $pv_layout;
}
}
}
if (!$layout_skin)
$layout_skin = 'basic';
define('LAYOUT_SKIN', $layout_skin);
define('LAYOUT_URL', G5_THEME_URL.'/layout/'.$layout_skin);
define('LAYOUT_PATH', G5_THEME_PATH.'/layout/'.$layout_skin);
// 홈주소
(IS_SHOP) ? define('HOME_URL', G5_SHOP_URL) : define('HOME_URL', G5_URL);
// 페이지 타이틀
if(isset($board['bo_subject']) && $board['bo_subject']) {
$page_title = $board['bo_subject'];
} else if(isset($group['gr_subject']) && $group['gr_subject']) {
$page_title = $group['gr_subject'];
} else {
$page_title = $g5['title'];
}
$page_title = get_text($page_title);
include_once(LAYOUT_PATH.'/head.sub.php');