diff --git a/.gitignore b/.gitignore
index 2e1973cf7..507c8849d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
data
config.php
-test.php
+test*
+sirgle
diff --git a/adm/_common.php b/adm/_common.php
index c5866b786..a10ebb275 100644
--- a/adm/_common.php
+++ b/adm/_common.php
@@ -1,5 +1,5 @@
+define('G4_IS_ADMIN', true);
include_once ('../common.php');
include_once(G4_ADMIN_PATH.'/admin.lib.php');
-$admin_index = false;
?>
\ No newline at end of file
diff --git a/adm/admin.head.php b/adm/admin.head.php
index e46105f08..6bee6b86a 100644
--- a/adm/admin.head.php
+++ b/adm/admin.head.php
@@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) exit;
$begin_time = get_microtime();
-$administrator = 1;
+
include_once(G4_PATH.'/head.sub.php');
function print_menu1($key, $no)
diff --git a/adm/config_form.php b/adm/config_form.php
index 349ccc563..3ac9f12e4 100644
--- a/adm/config_form.php
+++ b/adm/config_form.php
@@ -14,6 +14,15 @@ if (!isset($config['cf_email_admin'])) {
sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_email_admin VARCHAR(255) NOT NULL DEFAULT '' AFTER cf_email_use ", TRUE);
}
+if (!isset($config['cf_include_index'])) {
+ sql_query(" ALTER TABLE `{$g4['config_table']}`
+ ADD `cf_include_index` VARCHAR(255) NOT NULL AFTER `cf_admin`,
+ ADD `cf_include_head` VARCHAR(255) NOT NULL AFTER `cf_include_index`,
+ ADD `cf_include_tail` VARCHAR(255) NOT NULL AFTER `cf_include_head`,
+ ADD `cf_add_script` TEXT NOT NULL AFTER `cf_include_tail`
+ ", TRUE);
+}
+
$g4['title'] = '환경설정';
include_once ('./admin.head.php');
@@ -51,6 +60,34 @@ $pg_anchor = "
|
=get_member_id_select('cf_admin', 10, $config['cf_admin'], 'required')?> |
+
+ |
+
+ =help('입력이 없으면 index.php가 초기화면 파일의 기본 경로로 설정됩니다.')?>
+
+ |
+
+
+ |
+
+ =help('입력이 없으면 head.php가 상단 파일의 기본 경로로 설정됩니다.')?>
+
+ |
+
+
+ |
+
+ =help('입력이 없으면 tail.php가 상단 파일의 기본 경로로 설정됩니다.')?>
+
+ |
+
+
+ |
+
+ =help('HTML의 태그위로 추가될 JavaScript와 css 코드를 설정합니다.')?>
+
+ |
+
|
> 사용 |
diff --git a/adm/config_form_update.php b/adm/config_form_update.php
index da927fb14..66efdb5aa 100644
--- a/adm/config_form_update.php
+++ b/adm/config_form_update.php
@@ -22,6 +22,10 @@ check_token();
$sql = " update {$g4['config_table']}
set cf_title = '{$_POST['cf_title']}',
cf_admin = '{$_POST['cf_admin']}',
+ cf_include_index = '{$_POST['cf_include_index']}',
+ cf_include_head = '{$_POST['cf_include_head']}',
+ cf_include_tail = '{$_POST['cf_include_tail']}',
+ cf_add_script = '{$_POST['cf_add_script']}',
cf_use_point = '{$_POST['cf_use_point']}',
cf_use_norobot = '{$_POST['cf_use_norobot']}',
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
diff --git a/adm/index.php b/adm/index.php
index c4c3c29cd..84dd1f79b 100644
--- a/adm/index.php
+++ b/adm/index.php
@@ -2,7 +2,6 @@
include_once('./_common.php');
$g4['title'] = '관리자메인';
-$admin_index = true;
include_once ('./admin.head.php');
$new_member_rows = 5;
diff --git a/head.php b/head.php
index 0203cc0de..d0f8e9afc 100644
--- a/head.php
+++ b/head.php
@@ -9,6 +9,14 @@ include_once(G4_LIB_PATH.'/visit.lib.php');
include_once(G4_LIB_PATH.'/connect.lib.php');
include_once(G4_LIB_PATH.'/popular.lib.php');
+// 상단 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
+if ($config['cf_include_head']) {
+ if (!@include_once($config['cf_include_head'])) {
+ die('기본환경 설정에서 상단 파일 경로가 잘못 설정되어 있습니다.');
+ }
+ return; // 이 코드의 아래는 실행을 하지 않습니다.
+}
+
//print_r2(get_defined_constants());
?>
@@ -108,25 +116,6 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
} ?>
- // 색상대비 on/off
- $cr_path = g4_path();
- if($contrast_use == 'on') {
- $cr_uri = $cr_path['curr_url'].'?contrast=off';
- $cr = "ON";
- } else {
- $cr_uri = $cr_path['curr_url'].'?contrast=on';
- $cr = "OFF";
- }
- if($_SERVER['QUERY_STRING']) {
- $query_string = preg_replace("/contrast=(on|off)&?/", "", $_SERVER['QUERY_STRING']);
- if($query_string)
- $cr_uri .= '&'.$query_string;
- }
- unset($cr_path);
- ?>
-
- 색상대비=$cr?>
-
@@ -147,105 +136,6 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
써글톡
-
- 넋두리
-
-
-
- 써글유머
-
-
-
- 써글토론
-
-
-
- 써글놈들
-
-
-
- 자작써글
-
-
-
- 써글현장
-
-
-
- 써글게임
-
-
-
- 써글IT
-
-
-
- 짤방대결
-
-
-
- 여신대결
-
-
-
- 스포츠
-
-
diff --git a/head.sub.php b/head.sub.php
index 9e941949a..86626f0e5 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -27,18 +27,6 @@ header("Cache-Control: no-cache"); // HTTP/1.1
header("Expires: 0"); // rfc2616 - Section 14.21
header("Pragma: no-cache"); // HTTP/1.0
*/
-
-// 색상대비
-if($_GET['contrast'] == 'on') {
- set_session('ss_contrast_use', 'on');
-} else if($_GET['contrast'] == 'off') {
- set_session('ss_contrast_use', 'off');
-}
-$contrast_use = get_session('ss_contrast_use');
-
-$g4_css = "";
-if (G4_IS_MOBILE) $g4_css = "mobile";
-else $g4_css = "default";
?>
@@ -47,16 +35,10 @@ else $g4_css = "default";
if (G4_IS_MOBILE) {?> } ?>
=$g4_head_title?>
- if (isset($administrator)) { ?>
+ if (defined('G4_IS_ADMIN')) { ?>
">
- if($contrast_use == 'on') { ?>
-">
- } ?>
} else { ?>
-">
- if($contrast_use == 'on') { ?>
-">
- } ?>
+">
}?>