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

This commit is contained in:
gnuboard
2013-02-20 17:35:56 +09:00
10 changed files with 146 additions and 38 deletions

View File

@ -567,6 +567,7 @@ $pg_anchor = "<ul class=\"anchor\">
<th scope="row"><label for="bo_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
<td>
<?=get_skin_select("board", "bo_skin", "bo_skin", $board['bo_skin'], 'required');?>
<a href="" class="goto_sirskin" target="_blank">스킨자료실</a>
</td>
<td class="group_setting">
<input type="checkbox" id="chk_skin" name="chk_skin" value="1">

View File

@ -127,6 +127,7 @@ $pg_anchor = "
}
?>
</select>
<a href="" class="goto_sirskin" target="_blank">스킨자료실</a>
</td>
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
<td>
@ -145,6 +146,7 @@ $pg_anchor = "
}
?>
</select>
<a href="" class="goto_sirskin" target="_blank">스킨자료실</a>
</td>
</tr>
<tr>
@ -158,6 +160,7 @@ $pg_anchor = "
}
?>
</select>
<a href="" class="goto_sirskin" target="_blank">스킨자료실</a>
</td>
</tr>
<tr>
@ -284,6 +287,7 @@ $pg_anchor = "
}
?>
</select>
<a href="" class="goto_sirskin" target="_blank">스킨자료실</a>
</td>
</tr>
<tr>

89
bbs/view_image.php Normal file
View File

@ -0,0 +1,89 @@
<?php
include_once('./_common.php');
$g4['title'] = '이미지 크게보기';
include_once(G4_PATH.'/head.sub.php');
$filename = $_GET['fn'];
$bo_table = $_GET['bo_table'];
$filepath = G4_DATA_PATH.'/file/'.$bo_table.'/'.$filename;
if(is_file($filepath)) {
$size = @getimagesize($filepath);
if(empty($size))
alert_close('이미지 파일이 아닙니다.');
$width = $size[0];
$height = $size[1];
$fileurl = G4_DATA_URL.'/file/'.$bo_table.'/'.$filename;
$img = '<img src="'.$fileurl.'" alt="" width="'.$width.'" height="'.$height.'" class="draggable" style="position:relative;top:0;left:0">';
} else {
alert_close('파일이 존재하지 않습니다.');
}
?>
<div><?=$img?></div>
<script>
var win_w = <?=$width?>;
var win_h = <?=$height?>;
var win_l = (screen.width - win_w) / 2;
var win_t = (screen.height - win_h) / 2;
if(win_w > screen.width) {
win_l = 0;
win_w = screen.width;
win_h = parseInt((win_w * screen.height) / screen.width);
}
if(win_h > screen.height) {
win_t = 0;
win_h = screen_heigth;
win_w = parseInt((win_h * screen.width) / screen.height);
}
window.moveTo(win_l, win_t);
window.resizeTo(win_w, win_h);
$(function() {
var is_draggable = false;
var x = y = 0;
var pos_x = pos_y = 0;
$(".draggable").mousemove(function(e) {
if(is_draggable) {
x = parseInt($(this).css("left")) - (pos_x - e.pageX);
y = parseInt($(this).css("top")) - (pos_y - e.pageY);
pos_x = e.pageX;
pos_y = e.pageY;
$(this).css({ "left" : x, "top" : y });
}
return false;
});
$(".draggable").mousedown(function(e) {
pos_x = e.pageX;
pos_y = e.pageY;
is_draggable = true;
return false;
});
$(".draggable").mouseup(function() {
is_draggable = false;
return false;
});
$(".draggable").dblclick(function() {
window.close();
});
});
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
?>

View File

@ -310,3 +310,6 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
.pg_end,
.pg_next {border-left:1px solid #ddd}
.pg_current {background:#444;color:#fff;font-weight:bold}
/* 스킨자료실 바로가기 */
.goto_sirskin {color:#ff5300}

View File

@ -47,7 +47,7 @@ a:active {color:#000;text-decoration:underline}
#snb {position:absolute;top:18px;right:0;zoom:1}
#snb:after {display:block;visibility:hidden;clear:both;content:""}
#snb li {float:left}
#snb a {display:block;padding:5px 10px;color:#4e5d60;letter-spacing:-0.1em}
#snb a {display:block;padding:5px 10px;color:#334356;letter-spacing:-0.1em}
#snb a:focus,
#snb a:hover,
#snb a:active {text-decoration:none}
@ -58,7 +58,7 @@ a:active {color:#000;text-decoration:underline}
#wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#wrapper_title {margin-bottom:20px;font-size:1.2em}
#lnb {float:right;width:208px;border:1px solid #e7f1ed;background:#fff}
#container {float:left;padding:25px 15px 15px;width:728px;min-height:500px;height:auto !important;height:500px;border:1px solid #e7f1ed;background:#fff;zoom:1}
#container {position:relative;float:left;padding:25px 15px 15px;width:728px;min-height:500px;height:auto !important;height:500px;border:1px solid #e7f1ed;background:#fff;zoom:1}
#container:after {display:block;visibility:hidden;clear:both;content:""}
/* 하단 레이아웃 */
@ -97,13 +97,13 @@ a:active {color:#000;text-decoration:underline}
.btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn01:focus,
.btn01:hover {text-decoration:none !important}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #4e5d60 !important;background:#4e5d60 !important;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #334356 !important;background:#334356 !important;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn02:focus,
.btn02:hover {text-decoration:none !important}
.btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {padding:0 10px;height:24px;border:0;background:#4e5d60;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
.btn_submit {padding:0 10px;height:24px;border:0;background:#334356;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
.btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em}
.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#4e5d60;color:#fff !important;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
.btn_frmline {display:inline-block;padding:0 7px 0 5px;height:22px;border:0;background:#334356;color:#fff !important;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:2em} /* 우편번호검색버튼 등 */
.btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */
.btn_win a {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;line-height:2em;cursor:pointer}
.btn_win a:focus,
@ -112,7 +112,7 @@ a:active {color:#000;text-decoration:underline}
/* 기본테이블 */
.basic_tbl {margin-bottom:10px;width:100%;border-collapse:collapse;border-spacing:0}
.basic_tbl caption {padding:0 0 10px;color:#777;text-align:left}
.basic_tbl thead th {padding:12px 0 8px;background:#334356;color:#fff}
.basic_tbl thead th {padding:12px 0 8px;background:#079dd2;color:#fff}
.basic_tbl thead a {color:#fff}
.basic_tbl thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.basic_tbl tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff}
@ -149,7 +149,7 @@ fieldset textarea {padding:3px 3px 4px;border:1px solid #b8c9c2;background:#f7f7
fieldset textarea:focus {padding:4px 4px 5px;border:0;background:#21272e;color:#fff}
.fs_submit,
fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#fff;line-height:1.7em;vertical-align:middle;cursor:pointer}
fieldset button {padding:0 15px;height:24px;border:0;background:#334356;color:#fff;line-height:1.7em;vertical-align:middle;cursor:pointer}
.frm_info {display:block;padding:5px 0 0;color:#666;line-height:1.3em}
@ -210,20 +210,21 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
#find_info #captcha input {margin-left:5px}
/* 아웃로그인 스킨 */
.ol {position:relative;padding:35px 14px 14px;border-bottom:1px solid #e7f1ed}
.ol h2 {position:absolute;top:0px;left:14px !important;left:0;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
.ol {position:relative;border-bottom:1px solid #e7f1ed}
.ol h2 {position:absolute;top:0px;right:14px;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
.ol ul {margin:0;padding:0;list-style:none}
#ol_before {padding:30px 14px 14px}
#ol_before fieldset {position:relative}
#ol_id {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:168px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;line-height:1.6em}
#ol_id:focus {border-color:#333;background:#21272e;color:#fff}
.ol_idlabel {position:absolute;top:6px;left:5px;color:#4e5d60;font-size:0.9em}
.ol_idlabel {position:absolute;top:6px;left:5px;color:#334356;font-size:0.9em}
#ol_pw {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:168px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;vertical-align:top;line-height:1.6em}
#ol_pw:focus {border-color:#333;background:#21272e;color:#fff}
.ol_pwlabel {position:absolute;top:35px;left:5px;color:#4e5d60;font-size:0.9em}
.ol_pwlabel {position:absolute;top:35px;left:5px;color:#334356;font-size:0.9em}
#auto_login {}
#auto_login_label {letter-spacing:-0.1em}
#ol_submit {display:inline-block;width:60px;height:24px;border:0;background:#4e5d60;color:#fff;font-size:0.9em;font-weight:bold;vertical-align:top}
#ol_submit {display:inline-block;width:60px;height:24px;border:0;background:#334356;color:#fff;font-size:0.9em;font-weight:bold;vertical-align:top}
#ol_before ul {float:right;margin:7px 0 13px;zoom:1}
#ol_before ul:after {display:block;visibility:hidden;clear:both;content:""}
#ol_before li {float:left;margin-left:5px;padding-top:2px}
@ -231,22 +232,23 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
#ol_before a {letter-spacing:-0.1em}
#ol_svc {padding-top:8px;text-align:right}
#ol_after_hd {margin:0 0 5px;padding:5px 0;border-bottom:1px solid #cfded8;text-align:center}
#ol_after_hd a {position:absolute;top:10px;right:14px;color:#e8180c}
#ol_after {padding:25px 14px 14px}
#ol_after_hd {margin:0 0 3px}
#ol_after_hd .btn_admin {margin-top:5px;width:158px;text-align:center}
#ol_after_private {margin:0 0 3px;zoom:1}
#ol_after_private:after {display:block;visibility:hidden;clear:both;content:""}
#ol_after_private li {float:left}
#ol_after_private a {display:block;padding-top:8px;height:37px;background:#fff;text-align:center}
#ol_after_private a {display:block;padding-top:8px;height:37px;background:#f7f7f7;text-align:center}
#ol_after_private a strong {display:block;padding-top:3px;color:#000;font-weight:normal}
#ol_after_private a:focus,
#ol_after_private a:hover {background:#4e5d60;color:#fff;text-decoration:none}
#ol_after_private a:hover {background:#334356;color:#fff;text-decoration:none}
#ol_after_private a:focus strong,
#ol_after_private a:hover strong {color:#fff;text-decoration:none}
#ol_after_memo {width:50px;margin-right:1px}
#ol_after_pt {width:80px;margin-right:1px}
#ol_after_scrap {width:48px;line-height:2.6em !important}
#ol_after_ft {text-align:justify}
#ol_after_ft a {display:inline-block;width:88px;height:22px;background:#4e5d60;color:#fff;text-align:center;line-height:1.8em}
#ol_after_ft a {display:inline-block;width:88px;height:22px;background:#334356;color:#fff;text-align:center;line-height:1.8em}
#ol_after_ft a:focus,
#ol_after_ft a:hover {text-decoration:none !important}
@ -300,14 +302,14 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
/* 설문조사 스킨 */
#poll {}
#poll header {position:relative;padding:30px 14px 0}
#poll h2 {position:absolute;top:0px;left:14px !important;left:0;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
#poll header a {position:absolute;top:10px;right:14px;color:#e8180c}
#poll header {position:relative;padding:25px 14px 0}
#poll h2 {position:absolute;top:0px;right:14px;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
#poll header .btn_admin {margin-top:5px;width:158px;text-align:center}
#poll header p {padding:5px 0 10px}
#poll ul {margin:0 0 10px;padding:5px 14px;list-style:none}
#poll li {padding:3px 0}
#poll footer {padding:0 14px 14px}
#poll footer input {width:88px;height:24px;border:0;background:#4e5d60;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
#poll footer input {width:88px;height:24px;border:0;background:#334356;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
#poll footer a {display:inline-block;width:86px;height:22px;border:1px solid #ccc;background:#fafafa;text-align:center;line-height:2em}
#poll footer a:focus,
#poll footer a:hover {text-decoration:none !important}
@ -427,7 +429,7 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
#bo_cate a:focus,
#bo_cate a:hover,
#bo_cate a:active {text-decoration:none}
#bo_cate #bo_cate_on {z-index:2;border:1px solid #555;background:#fff;color:#555;font-weight:bold}
#bo_cate #bo_cate_on {z-index:2;border:1px solid #079dd2;background:#fff;color:#079dd2;font-weight:bold}
.bo_fx {margin-bottom:5px;zoom:1}
.bo_fx:after {display:block;visibility:hidden;clear:both;content:""}
@ -450,9 +452,9 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
#bo_sch legend {width:0;height:0;overflow:hidden}
/* 게시판 읽기 */
#bo_v {position:relative;margin-bottom:20px;padding-bottom:20px}
#bo_v {margin-bottom:20px;padding-bottom:20px}
#bo_v_cate {position:absolute;top:-25px;right:0 !important;right:14px;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_cate {position:absolute;top:0;right:14px;margin:0;padding:0 5px;height:25px;background:#76a5a8;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_h1 {padding:0 0 10px;font-size:1.2em}
@ -583,4 +585,4 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#4e5d60;color:#f
.pg_prev {border-right:1px solid #cfded8}
.pg_end,
.pg_next {border-left:1px solid #cfded8}
.pg_current {background:#5b6964;color:#fff;font-weight:bold}
.pg_current {background:#334356;color:#fff;font-weight:bold}

View File

@ -1042,10 +1042,13 @@ function view_file_link($file, $width, $height, $content='')
else
$attr = '';
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<img src='".G4_DATA_URL."/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
$img = '<a href="'.G4_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&amp;fn='.urlencode($file).'" target="_blank" class="view_image">';
$img .= '<img src="'.G4_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'">';
$img .= '</a>';
return $img;
}
}

View File

@ -186,18 +186,25 @@ $(window).load(function() {
view_image_resize();
});
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
});
function view_image_resize()
{
var $img = $('#bo_v_atc img');
var img_wrap = $('#bo_v_atc').width();
var $img = $("#bo_v_atc img");
var img_wrap = $("#bo_v_atc").width();
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
$(this).addClass('img_fix');
$(this).addClass("img_fix");
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
$(this).removeClass('img_fix');
$(this).removeClass("img_fix");
}
});
}

View File

@ -8,7 +8,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<? for ($i=0; $i<count($list); $i++) { ?>
<li>
<?
echo $list[$i]['icon_reply']." ";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\" title=\"".$list[$i]['wr_subject']."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";

View File

@ -5,9 +5,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<!-- 로그인 후 외부로그인 시작 -->
<section id="ol_after" class="ol">
<header id="ol_after_hd">
<h2>내 회원정보</h2>
<strong><?=$nick?></strong>님
<? if ($is_admin == 'super' || $is_auth) { ?><a href="<?=G4_ADMIN_URL?>" id="ol_admin">관리자</a><? } ?>
<h2><?=$nick?>님</h2>
<? if ($is_admin == 'super' || $is_auth) { ?><a href="<?=G4_ADMIN_URL?>" class="btn_admin">관리자 모드</a><? } ?>
</header>
<ul id="ol_after_private">
<li>

View File

@ -19,7 +19,7 @@ $po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '$po_id' ");
<section id="poll">
<header>
<h2>설문조사</h2>
<? if ($is_admin == "super") { ?><a href="<?=G4_ADMIN_URL?>/poll_form.php?w=u&amp;po_id=<?=$po_id?>">설문조사 관리</a><? } ?>
<? if ($is_admin == "super") { ?><a href="<?=G4_ADMIN_URL?>/poll_form.php?w=u&amp;po_id=<?=$po_id?>" class="btn_admin">설문조사 관리</a><? } ?>
<p><?=$po['po_subject']?></p>
</header>
<ul>