Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
gnuboard
2013-10-06 12:07:06 +09:00
16 changed files with 296 additions and 286 deletions

View File

@ -9,7 +9,7 @@ h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
header ul, nav ul, aside ul, footer ul {margin:0;padding:0;list-style:none} header ul, nav ul, aside ul, footer ul {margin:0;padding:0;list-style:none}
label, input, select, img {vertical-align:middle} label, input, select, img {vertical-align:middle}
select {font-size:1em} textarea, select {font-size:1em}
input {margin:0;padding:0;border-radius:0;font-family:dotum} input {margin:0;padding:0;border-radius:0;font-family:dotum}
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none} input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
button {border-radius:0;font-size:1em;-webkit-appearance:none} button {border-radius:0;font-size:1em;-webkit-appearance:none}

View File

@ -9,7 +9,7 @@ h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none} header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
label, input, select, img {vertical-align:middle} label, input, select, img {vertical-align:middle}
textarea,
select {font-size:1em} select {font-size:1em}
input {margin:0;padding:0;border-radius:0;font-family:dotum} input {margin:0;padding:0;border-radius:0;font-family:dotum}
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none} input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
@ -138,7 +138,7 @@ fieldset .btn_submit {height:22px;font-size:1em}
.btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em} .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em}
button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em} button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em}
.btn_cancel:focus, .btn_cancel:hover {text-decoration:none !important} .btn_cancel:focus, .btn_cancel:hover {text-decoration:none !important}
.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */ a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
button.btn_frmline {font-size:1em} button.btn_frmline {font-size:1em}
.btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */ .btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */
.btn_win button {display:inline-block;padding:0 10px;height:30px;border:0;background:#666;color:#fff;vertical-align:top;line-height:2em;cursor:pointer} .btn_win button {display:inline-block;padding:0 10px;height:30px;border:0;background:#666;color:#fff;vertical-align:top;line-height:2em;cursor:pointer}

View File

@ -11,8 +11,8 @@ header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
label, input, select, img {vertical-align:middle} label, input, select, img {vertical-align:middle}
input,button {margin:0;padding:0} input,button {margin:0;padding:0}
input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em} /* 모바일에서만 사용 */ input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em}
select, textarea {font-size:1em} textarea, select {font-size:1em}
textarea {border-radius:0;-webkit-appearance:none} textarea {border-radius:0;-webkit-appearance:none}
p {margin:0;padding:1em 0;line-height:1.7em;word-break:break-all} p {margin:0;padding:1em 0;line-height:1.7em;word-break:break-all}
hr {display:none} hr {display:none}

View File

@ -81,7 +81,6 @@ if ($is_admin) {
<script src="<?php echo G5_JS_URL ?>/wrest.js"></script> <script src="<?php echo G5_JS_URL ?>/wrest.js"></script>
<?php <?php
if(G5_IS_MOBILE) { if(G5_IS_MOBILE) {
echo '<script> set_cookie("device_width", $(window).width(), 6, g5_cookie_domain); </script>'.PHP_EOL;
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지 echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
} }
//if(!defined('G5_IS_ADMIN')) //if(!defined('G5_IS_ADMIN'))

View File

@ -1,6 +1,7 @@
<?php <?php
include_once ('../config.php'); include_once ('../config.php');
$title = G5_VERSION." 설치 3단계 중 1단계 라이센스 확인"; $title = G5_VERSION." 설치 3단계 중 1단계 라이센스 확인";
require_once('./library.check.php');
include_once ('./install.inc.php'); include_once ('./install.inc.php');
?> ?>

14
install/library.check.php Normal file
View File

@ -0,0 +1,14 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function die_utf8($msg)
{
if(!trim($msg))
return;
die('<meta charset="utf-8"><p>'.$msg.'</p>');
}
if(!extension_loaded('gd') || !function_exists('gd_info'))
die('GD 라이브러리를 설치하신 후 '.G5_VERSION.' 설치를 진행해 주십시오.');
?>

View File

@ -14,14 +14,17 @@
} }
var $img = this.find(cfg.selector); var $img = this.find(cfg.selector);
var width = this.width(); var $this = this;
function image_resize() function image_resize()
{ {
var width = $this.width();
$img.each(function() { $img.each(function() {
$(this).removeAttr("width") $(this).removeAttr("width")
.removeAttr("height") .removeAttr("height")
.css("width",""); .css("width","")
.css("height", "");
if($(this).data("width") == undefined) if($(this).data("width") == undefined)
$(this).data("width", $(this).width()); $(this).data("width", $(this).width());

View File

@ -1879,7 +1879,12 @@ function convert_charset($from_charset, $to_charset, $str)
function escape_trim($field) function escape_trim($field)
{ {
if ($field) { if ($field) {
return mysql_real_escape_string(@trim($field)); $str = mysql_real_escape_string(@trim($field));
if(PHP_VERSION < '5.3.0')
$str = stripslashes($str);
return $str;
} }
} }

View File

@ -80,27 +80,8 @@ function get_view_thumbnail($contents, $thumb_width=0)
{ {
global $board, $config; global $board, $config;
if (!$thumb_width) { if (!$thumb_width)
$dvc_width = intval($_COOKIE['device_width']);
if(G5_IS_MOBILE && $dvc_width) {
// 썸네일 width 설정
$thumb_width = 320;
if($dvc_width > $board['bo_image_width']) {
$thumb_width = $board['bo_image_width']; $thumb_width = $board['bo_image_width'];
} else {
if($dvc_width >= 1000) {
$thumb_width = 1000;
} else if($dvc_width >= 760 && $dvc_width < 1000) {
$thumb_width = 760;
} else if($dvc_width >= 480 && $dvc_width < 760) {
$thumb_width = 480;
}
}
} else {
$thumb_width = $board['bo_image_width'];
}
}
// $contents 중 img 태그 추출 // $contents 중 img 태그 추출
$matchs = get_editor_image($contents); $matchs = get_editor_image($contents);

View File

@ -107,7 +107,8 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div id="container"> <div id="container">
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><h1 id="wrapper_title"><?php echo $g5['title'] ?></h1><?php } ?> <?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><h1 id="wrapper_title"><?php echo $g5['title'] ?></h1><?php } ?>
<div id="text_size"> <div id="text_size">
<button class="no_text_resize" onclick="font_resize('container', 'decrease');">작게</button> <!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
<button class="no_text_resize" onclick="font_default('container');">기본</button> <button id="text_size_down" onclick="font_resize('container', 'ts_up ts_up2', '');">기본</button>
<button class="no_text_resize" onclick="font_resize('container', 'increase');">크게</button> <button id="text_size_def" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');">크게</button>
<button id="text_size_up" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');">더크게</button>
</div> </div>

View File

@ -0,0 +1 @@
# .htaccess

View File

@ -9,7 +9,7 @@ $msg_url = $sns_msg.' : '.$sns_url;
// 카카오톡 매뉴얼 : https://github.com/kakao/kakaolink-web // 카카오톡 매뉴얼 : https://github.com/kakao/kakaolink-web
$kakao_appid = $_SERVER['HTTP_HOST']; // Mobile Site Domain 정확히 입력하지 않을 경우 이용이 제한될 수 있습니다. $kakao_appid = $_SERVER['HTTP_HOST']; // Mobile Site Domain 정확히 입력하지 않을 경우 이용이 제한될 수 있습니다.
$kakao_appname = $g5['title']; $kakao_appname = urlencode(str_replace('\"', '"', $g5['title']));
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg; $facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
$twitter_url = 'http://twitter.com/home?status='.$msg_url; $twitter_url = 'http://twitter.com/home?status='.$msg_url;

View File

@ -26,7 +26,7 @@
#bo_w .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em} #bo_w .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em}
#bo_w button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em} #bo_w button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em}
#bo_w .btn_cancel:focus, #bo_w .btn_cancel:hover {text-decoration:none !important} #bo_w .btn_cancel:focus, #bo_w .btn_cancel:hover {text-decoration:none !important}
#bo_w .btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */ #bo_w a.btn_frmline, #bo_w button.btn_frmline, {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
#bo_w button.btn_frmline {font-size:1em} #bo_w button.btn_frmline {font-size:1em}
/* 기본 테이블 */ /* 기본 테이블 */
@ -66,7 +66,7 @@
#bo_w .frm_tbl th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left} #bo_w .frm_tbl th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left}
#bo_w .frm_tbl td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} #bo_w .frm_tbl td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent}
#bo_w .frm_tbl textarea, #bo_w .frm_input {padding:2px 2px 3px;border:1px solid #b8c9c2;background:#f7f7f7;color:#000;vertical-align:middle} #bo_w .frm_tbl textarea, #bo_w .frm_input {padding:2px 2px 3px;border:1px solid #b8c9c2;background:#f7f7f7;color:#000;vertical-align:middle}
#bo_w .frm_tbl textarea {width:98%;height:100px} #bo_w .frm_tbl textarea {width:98%;height:200px}
#bo_w .frm_address {display:block;margin-top:5px} #bo_w .frm_address {display:block;margin-top:5px}
#bo_w .frm_file {display:block;margin-bottom:5px} #bo_w .frm_file {display:block;margin-bottom:5px}
#bo_w .frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent} #bo_w .frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent}

View File

@ -26,7 +26,7 @@
#bo_w .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em} #bo_w .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em}
#bo_w button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em} #bo_w button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em}
#bo_w .btn_cancel:focus, #bo_w .btn_cancel:hover {text-decoration:none !important} #bo_w .btn_cancel:focus, #bo_w .btn_cancel:hover {text-decoration:none !important}
#bo_w .btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */ #bo_w a.btn_frmline, #bo_w button.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
#bo_w button.btn_frmline {font-size:1em} #bo_w button.btn_frmline {font-size:1em}
/* 기본 테이블 */ /* 기본 테이블 */
@ -50,7 +50,7 @@
#bo_w .frm_tbl th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left} #bo_w .frm_tbl th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left}
#bo_w .frm_tbl td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} #bo_w .frm_tbl td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent}
#bo_w .frm_tbl textarea, #bo_w .frm_input {padding:2px 2px 3px;border:1px solid #b8c9c2;background:#f7f7f7;color:#000;vertical-align:middle} #bo_w .frm_tbl textarea, #bo_w .frm_input {padding:2px 2px 3px;border:1px solid #b8c9c2;background:#f7f7f7;color:#000;vertical-align:middle}
#bo_w .frm_tbl textarea {width:98%;height:100px} #bo_w .frm_tbl textarea {width:98%;height:200px}
#bo_w .frm_address {display:block;margin-top:5px} #bo_w .frm_address {display:block;margin-top:5px}
#bo_w .frm_file {display:block;margin-bottom:5px} #bo_w .frm_file {display:block;margin-bottom:5px}
#bo_w .frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent} #bo_w .frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent}

View File

@ -4,10 +4,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css"> <link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css">
<section id="bo_w">
<h2 id="wrapper_title"><?php echo $g5['title'] ?></h2> <h2 id="wrapper_title"><?php echo $g5['title'] ?></h2>
<!-- 게시물 작성/수정 시작 { --> <!-- 게시물 작성/수정 시작 { -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="width:<?php echo $width; ?>"> <form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="width:<?php echo $width; ?>">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" value="<?php echo $w ?>"> <input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>"> <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>"> <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
@ -51,7 +53,7 @@ if ($is_notice || $is_html || $is_secret || $is_mail) {
echo $option_hidden; echo $option_hidden;
?> ?>
<table id="bo_w" class="frm_tbl"> <table class="frm_tbl">
<tbody> <tbody>
<?php if ($is_name) { ?> <?php if ($is_name) { ?>
<tr> <tr>
@ -103,6 +105,7 @@ echo $option_hidden;
<tr> <tr>
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
<td> <td>
<div id="autosave_wrapper">
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255"> <input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?> <?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script> <script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
@ -114,6 +117,7 @@ echo $option_hidden;
<div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div> <div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div>
</div> </div>
<?php } ?> <?php } ?>
</div>
</td> </td>
</tr> </tr>
@ -260,4 +264,5 @@ function fwrite_submit(f)
return true; return true;
} }
</script> </script>
</section>
<!-- } 게시물 작성/수정 끝 --> <!-- } 게시물 작성/수정 끝 -->

View File

@ -13,7 +13,7 @@
.mbskin .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em} .mbskin .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em}
.mbskin button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em} .mbskin button.btn_cancel {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;line-height:2em}
.mbskin .btn_cancel:focus, .mbskin .btn_cancel:hover {text-decoration:none !important} .mbskin .btn_cancel:focus, .mbskin .btn_cancel:hover {text-decoration:none !important}
.mbskin .btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */ .mbskin a.btn_frmline, .mbskin button.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
.mbskin button.btn_frmline {font-size:1em} .mbskin button.btn_frmline {font-size:1em}
.mbskin .btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */ .mbskin .btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */
.mbskin .btn_win button {display:inline-block;padding:0 10px;height:30px;border:0;background:#666;color:#fff;vertical-align:top;line-height:2em;cursor:pointer} .mbskin .btn_win button {display:inline-block;padding:0 10px;height:30px;border:0;background:#666;color:#fff;vertical-align:top;line-height:2em;cursor:pointer}