diff --git a/head.sub.php b/head.sub.php
index 14cdc85de..6a919310f 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -40,6 +40,20 @@ header("Pragma: no-cache"); // HTTP/1.0
} else { ?>
">
}?>
+ // 스킨의 style sheet 불러옴
+if(isset($board_skin_path))
+ echo get_skin_stylesheet($board_skin_path);
+if(isset($member_skin_path))
+ echo get_skin_stylesheet($member_skin_path);
+if(isset($new_skin_path))
+ echo get_skin_stylesheet($new_skin_path);
+if(isset($search_skin_path))
+ echo get_skin_stylesheet($search_skin_path);
+if(isset($connect_skin_path))
+ echo get_skin_stylesheet($connect_skin_path);
+if(isset($poll_skin_path))
+ echo get_skin_stylesheet($poll_skin_path);
+?>
@@ -68,4 +82,4 @@ var g4_cookie_domain = "=G4_COOKIE_DOMAIN?>";
if (!defined('G4_IS_ADMIN')) { echo $config['cf_add_script']; } ?>
- if ($is_member) { ?>=$member['mb_nick']?>님 로그인 중
} ?>
\ No newline at end of file
+ if ($is_member) { ?>=$member['mb_nick']?>님 로그인 중
} ?>
diff --git a/lib/common.lib.php b/lib/common.lib.php
index 7e3ff5dbf..b5bc48bfc 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -1785,4 +1785,37 @@ function delete_editor_thumbnail($contents)
}
}
}
+
+// 스킨 style sheet 파일 얻기
+function get_skin_stylesheet($skin_path)
+{
+ if(!$skin_path)
+ return "";
+
+ $str = "";
+
+ $p = parse_url(G4_URL);
+ $skin_url = $p['scheme'].'://'.$p['host'];
+ if(isset($p['port']))
+ $skin_url .= ':'.$p['port'];
+ $skin_url .= str_replace($_SERVER['DOCUMENT_ROOT'], "", $skin_path);
+
+ if(is_dir($skin_path)) {
+ if($dh = opendir($skin_path)) {
+ while(($file = readdir($dh)) !== false) {
+ if($file == "." || $file == "..")
+ continue;
+
+ if(is_dir($skin_path.'/'.$file))
+ continue;
+
+ if(preg_match("/\.(css)$/i", $file))
+ $str .= ''."\n";
+ }
+ closedir($dh);
+ }
+ }
+
+ return $str;
+}
?>
\ No newline at end of file