리빌더 부분 추가
BIN
theme/rb.basic/mobile/skin/board/basic/img/btn_next2.gif
Normal file
|
After Width: | Height: | Size: 55 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/btn_prev2.gif
Normal file
|
After Width: | Height: | Size: 56 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/chk.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/cmt_btn.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_bad.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_comment.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_file.gif
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_good.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_hot.gif
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_img.gif
Normal file
|
After Width: | Height: | Size: 145 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_link.gif
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_lock.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_mobile.gif
Normal file
|
After Width: | Height: | Size: 62 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_movie.gif
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_new.gif
Normal file
|
After Width: | Height: | Size: 71 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_reply.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_secret.gif
Normal file
|
After Width: | Height: | Size: 318 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_sound.gif
Normal file
|
After Width: | Height: | Size: 113 B |
BIN
theme/rb.basic/mobile/skin/board/basic/img/icon_view.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/require.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
theme/rb.basic/mobile/skin/board/basic/img/sch_btn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
229
theme/rb.basic/mobile/skin/board/basic/list.skin.php
Normal file
@ -0,0 +1,229 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 2;
|
||||
|
||||
if ($is_checkbox) $colspan++;
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<form name="fboardlist" id="fboardlist" action="<?php echo G5_BBS_URL; ?>/board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="sw" value="">
|
||||
|
||||
<?php if ($rss_href || $write_href) { ?>
|
||||
<ul class="<?php echo isset($view) ? 'view_is_list btn_top' : 'btn_top top btn_bo_user';?>">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn" title="관리자"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b03 btn" title="RSS"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?>
|
||||
<li>
|
||||
<button type="button" class="btn_more_opt btn_b03 btn is_list_btn" title="게시판 리스트 옵션"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<ul class="more_opt is_list_btn">
|
||||
<li><button type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"><i class="fa fa-trash-o" aria-hidden="true"></i> 선택삭제</button></li>
|
||||
<li><button type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value"><i class="fa fa-files-o" aria-hidden="true"></i> 선택복사</button></li>
|
||||
<li><button type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value"><i class="fa fa-arrows" aria-hidden="true"></i> 선택이동</button></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="fix_btn write_btn" title="글쓰기"><i class="fa fa-pencil" aria-hidden="true"></i><span class="sound_only">글쓰기</span></a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<!-- 게시판 목록 시작 -->
|
||||
<div id="bo_list">
|
||||
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="bo_cate">
|
||||
<h2><?php echo ($board['bo_mobile_subject'] ? $board['bo_mobile_subject'] : $board['bo_subject']) ?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
|
||||
<div class="list_01">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<div class="all_chk chk_box">
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
|
||||
<label for="chkall">
|
||||
<span></span>
|
||||
<b class="sound_only">현재 페이지 게시물 </b> 전체선택
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li class="<?php if ($list[$i]['is_notice']) echo "bo_notice"; ?>">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<div class="bo_chk chk_box">
|
||||
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>" class="selec_chk">
|
||||
<label for="chk_wr_id_<?php echo $i ?>">
|
||||
<span></span>
|
||||
<b class="sound_only"><?php echo $list[$i]['subject'] ?></b>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="bo_cnt">
|
||||
<?php if ($list[$i]['is_notice'] || ($is_category && $list[$i]['ca_name'])) { ?>
|
||||
<div class="bo_cate_ico">
|
||||
<?php if ($list[$i]['is_notice']) { ?><strong class="notice_icon">공지</strong><?php } ?>
|
||||
<?php if ($is_category && $list[$i]['ca_name']) { ?>
|
||||
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name']; ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<a href="<?php echo $list[$i]['href'] ?>" class="bo_subject">
|
||||
<?php echo $list[$i]['icon_reply']; ?>
|
||||
<?php if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret']; ?>
|
||||
<?php echo $list[$i]['subject'] ?>
|
||||
<?php
|
||||
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
|
||||
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
|
||||
if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
|
||||
if (isset($list[$i]['icon_file'])) echo $list[$i]['icon_file'];
|
||||
if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];
|
||||
?>
|
||||
|
||||
<?php if ($list[$i]['comment_cnt']) { ?>
|
||||
<span class="bo_cmt">
|
||||
<span class="sound_only">댓글</span>
|
||||
<?php echo $list[$i]['comment_cnt']; ?>
|
||||
<span class="sound_only">개</span>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bo_info">
|
||||
<span class="sound_only">작성자</span><?php echo $list[$i]['name'] ?>
|
||||
<span class="bo_date"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $list[$i]['datetime2'] ?></span>
|
||||
<span class="bo_view"><i class="fa fa-eye" aria-hidden="true"></i> <?php echo number_format($list[$i]['wr_hit']) ?><span class="sound_only">회</span></span>
|
||||
<?php if ($is_good) { ?><span class="sound_only">추천</span><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> <?php echo $list[$i]['wr_good'] ?><?php } ?>
|
||||
<?php if ($is_nogood) { ?><span class="sound_only">비추천</span><i class="fa fa-thumbs-o-down" aria-hidden="true"></i> <?php echo $list[$i]['wr_nogood'] ?><?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { echo '<li class="empty_table">게시물이 없습니다.</li>'; } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 페이지 -->
|
||||
<?php echo $write_pages; ?>
|
||||
|
||||
<div id="bo_list_total">
|
||||
<span>전체 <?php echo number_format($total_count) ?>건</span>
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<?php echo get_board_sfl_select_options($sfl); ?>
|
||||
</select>
|
||||
<input name="stx" value="<?php echo stripslashes($stx) ?>" placeholder="검색어를 입력하세요" required id="stx" class="sch_input" size="15" maxlength="20">
|
||||
<button type="submit" value="검색" class="sch_btn"><i class="fa fa-search" aria-hidden="true"></i> <span class="sound_only">검색</span></button>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
function fboardlist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택복사") {
|
||||
select_copy("copy");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택이동") {
|
||||
select_copy("move");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
|
||||
return false;
|
||||
|
||||
f.removeAttribute("target");
|
||||
f.action = g5_bbs_url+"/board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 선택한 게시물 복사 및 이동
|
||||
function select_copy(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
if (sw == 'copy')
|
||||
str = "복사";
|
||||
else
|
||||
str = "이동";
|
||||
|
||||
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
|
||||
f.sw.value = sw;
|
||||
f.target = "move";
|
||||
f.action = g5_bbs_url+"/move.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 게시판 리스트 관리자 옵션
|
||||
jQuery(function($){
|
||||
$(".btn_more_opt.is_list_btn").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
$(".more_opt.is_list_btn").toggle();
|
||||
});
|
||||
$(document).on("click", function (e) {
|
||||
if(!$(e.target).closest('.is_list_btn').length) {
|
||||
$(".more_opt.is_list_btn").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- 게시판 목록 끝 -->
|
||||
311
theme/rb.basic/mobile/skin/board/basic/style.css
Normal file
@ -0,0 +1,311 @@
|
||||
@charset "utf-8";
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 시작 ### */
|
||||
|
||||
/* 게시판 버튼 */
|
||||
/* 목록 버튼 */
|
||||
.chk_all {margin:10px 0}
|
||||
|
||||
/* 게시판 목록 */
|
||||
#bo_list .td_chk {width:30px;text-align:center}
|
||||
#bo_list .td_group {width:100px;text-align:center}
|
||||
#bo_list .td_board {width:120px;text-align:center}
|
||||
#bo_list .td_num {width:50px;text-align:center}
|
||||
#bo_list .td_numbig {width:80px;text-align:center}
|
||||
#bo_list .td_mb_id {width:100px;text-align:center}
|
||||
#bo_list .td_nick {width:100px;text-align:center}
|
||||
#bo_list .td_name {width:100px;text-align:left}
|
||||
#bo_list .td_date {width:60px;text-align:center}
|
||||
#bo_list .td_datetime {width:150px;text-align:center}
|
||||
#bo_list .td_mng {width:80px;text-align:center}
|
||||
#bo_list .notice_icon {display:inline-block;background:#fbe2e6;padding:0 5px;line-height:20px;border-radius:5px;font-weight:bold;font-size:11px;color:#f1364c}
|
||||
#bo_list .bo_subject .fa-download {width:16px;line-height:16px;background:#ffefb9;color:#daae37;text-align:center;font-size:10px;border-radius:2px;vertical-align:baseline}
|
||||
#bo_list .bo_subject .fa-link {width:16px;line-height:16px;background:#edd3fd;color:#b451fd;text-align:center;font-size:10px;border-radius:2px;vertical-align:baseline}
|
||||
#bo_list .bo_subject .fa-heart {color:#ff0000;text-align:center;font-size:10px;border-radius:2px}
|
||||
#bo_list .bo_subject .new_icon {display:inline-block;width:16px;line-height:16px;font-size:0.833em;color:#23db79;background:#b9ffda;text-align:center;border-radius:2px;margin:0 4px;font-weight:bold;vertical-align:middle}
|
||||
#bo_list .bo_subject .fa-lock {display:inline-block;line-height:16px;width:16px;font-size:0.833em;color:#4f818c;background:#cbe3e8;text-align:center;border-radius:2px;font-size:12px;border:1px solid #cbe3e8;vertical-align:baseline}
|
||||
|
||||
|
||||
#bo_cate h2 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_cate ul {background:#fff;padding-left:1px;border-bottom:1px solid #d9dce3;zoom:1}
|
||||
#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_cate li {display:inline-block;float:left}
|
||||
#bo_cate a {display:block;line-height:24px;padding:15px}
|
||||
#bo_cate #bo_cate_on {display:inline-block;position:relative;color:#3a8afd}
|
||||
#bo_cate #bo_cate_on:after {content:"";position:absolute;left:0;bottom:0;width:100%;height:4px;display:inline-block;background:#3a8afd}
|
||||
|
||||
|
||||
/* 관리자일 때 */
|
||||
#bo_list_admin th label {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#bo_list_admin th:nth-of-type(1) {width:40px}
|
||||
#bo_list_admin th:nth-of-type(3) {width:100px}
|
||||
|
||||
#bo_list_admin td:nth-of-type(1) {text-align:center}
|
||||
#bo_list_admin td:nth-of-type(3) {text-align:center}
|
||||
|
||||
/* 관리자가 아닐 때 */
|
||||
#bo_list th:nth-of-type(2) {width:100px}
|
||||
#bo_list td:nth-of-type(2) {text-align:center}
|
||||
|
||||
/* 게시판 목록 공통 */
|
||||
#bo_list {}
|
||||
#bo_list li {background:#fff}
|
||||
#bo_list li.bo_notice {background:#fff6fa}
|
||||
|
||||
.bo_fx {margin-bottom:5px;padding:0 10px}
|
||||
.bo_fx:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_fx ul {margin:0;padding:0;list-style:none}
|
||||
#bo_list_total {margin:10px;text-align:center;padding:10px;text-align:center;background:#e3e7ec;color:#8b8b8b;border-radius:3px}
|
||||
|
||||
.btn_bo_user > li {float:left;text-align:center;margin-left:5px}
|
||||
.btn_bo_adm button {border:0;padding:0 10px;background:#d13f4a;color:#fff;text-decoration:none;vertical-align:middle}
|
||||
.btn_more_opt {width:30px}
|
||||
.more_opt {display:none;position:absolute;top:50px;right:7px;background:#fff;border:1px solid #b8bfc4;z-index:999}
|
||||
.more_opt:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.more_opt:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.more_opt.is_list_btn{width:90px}
|
||||
.more_opt li {display:block;border-bottom:1px solid #f1f1f1;padding:10px;margin:0;color:#6b757c;text-align:left}
|
||||
.more_opt li:last-child {border-bottom:0}
|
||||
.more_opt li button, .more_opt li a {width:100%;border:0;background:#fff;color:#6b757c}
|
||||
.more_opt li:hover a,
|
||||
.more_opt li:hover button {color:#000}
|
||||
.more_opt li i {line-height:20px}
|
||||
|
||||
.bo_share {position:relative}
|
||||
#bo_v_share {display:none;position:absolute;top:42px;right:0;padding:10px;text-align:right;background:#fff;border:1px solid #b8bfc4}
|
||||
#bo_v_share:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
#bo_v_share:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
#bo_v_share .btn_scrap {display:inline-block;background:#d4d4d4;color:#444;line-height:40px;width:40px;font-weight:bold;text-align:center;border-radius:3px}
|
||||
|
||||
#bo_v_sns {padding:0;list-style:none;zoom:1}
|
||||
#bo_v_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_sns li {text-align:center;margin:5px 0 0}
|
||||
#bo_v_sns li a {display:block;width:40px;height:40px;padding:10px 0}
|
||||
#bo_v_sns li .sns_f {background:#415b92;border-radius:3px}
|
||||
#bo_v_sns li .sns_t {background:#35b3dc;border-radius:3px}
|
||||
#bo_v_sns li .sns_g {background:#d5503a;border-radius:3px}
|
||||
#bo_v_sns li .sns_k {background:#fbe300;border-radius:3px}
|
||||
#bo_v_sns li img {vertical-align:top}
|
||||
#bo_v_sns li span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
|
||||
.bo_cate_link {display:inline-block;background:#e2eaf6;padding:0 5px;line-height:20px;border-radius:5px;font-weight:bold;font-size:11px;color:#3ca1ff !important;text-decoration:none;/*font-size:0.92em*/} /* 글제목줄 분류스타일 */
|
||||
.bo_cate_ico {margin-bottom:5px}
|
||||
.bo_cnt {display:block;width:100%;font-size:1.083em;font-weight:bold;line-height:1.4em}
|
||||
.bo_cnt i {color:#8d96c2;font-size:12px}
|
||||
.bo_cnt .fa-heart {color:#ff0000}
|
||||
.bo_chk {display:inline-block;float:left;margin-right:5px}
|
||||
|
||||
.selec_chk {position:absolute;top:0;left:0;width:0;height:0;opacity:0;outline:0;z-index:-1;overflow:hidden}
|
||||
.chk_box {position:relative}
|
||||
.chk_box input[type="checkbox"] + label {padding-left:20px;color:#676e70}
|
||||
.chk_box input[type="checkbox"] + label:hover{color:#2172f8}
|
||||
.chk_box input[type="checkbox"] + label span {position:absolute;top:0;left:0;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px}
|
||||
.chk_box input[type="checkbox"]:checked + label {color:#000}
|
||||
.chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px}
|
||||
.all_chk.chk_box input[type="checkbox"] + label span {top:18px;left:15px}
|
||||
|
||||
.bo_cmt {background:#e9eff5;color:#3a8afd;font-size:0.925em;height:16px;padding:0 5px;border-radius:2px;vertical-align:top;min-width:16px}
|
||||
|
||||
.bo_subject {display:block;width:100%;padding-bottom:5px}
|
||||
.bo_current {color:#e8180c}
|
||||
.bo_info:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_info {position:relative;padding-top:5px;line-height:20px;color:#646464;vertical-align:top}
|
||||
.bo_info i {margin-left:10px}
|
||||
.bo_info .comment_icon {background:url(./img/icon_comment.png) no-repeat 50% 50%;display:inline-block;width:20px;height:28px;text-indent:-999px;overflow:hidden;vertical-align:top;background-size:70%;margin:0 0px 0 5px}
|
||||
.bo_info .bo_date {}
|
||||
.bo_info .cnt_cmt {display:inline-block;margin: 0 5px 0 3px}
|
||||
.bo_info .profile_img img {border-radius:50%;vertical-align:top}
|
||||
|
||||
#bo_sch {background:#fff;border:1px solid #d0d3db;position:relative;margin:10px}
|
||||
#bo_sch:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_sch legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
|
||||
#bo_sch select {border:0;height:38px;border-right:1px solid #f8f8f8;float:left;width:30%}
|
||||
#bo_sch .sch_input {height:38px;border:0;padding:0;background-color:transparent;float:left;width:70%;padding:0 40px 0 10px}
|
||||
#bo_sch .sch_btn {height:38px;position:absolute;top:0;right:0;border:0;width:40px;background:none;font-size:15px}
|
||||
|
||||
.view_is_list.btn_top {position:relative;z-index:auto;top:0;left:0}
|
||||
.view_is_list {margin:8px 10px 0;height:50px;padding:10px;line-height:30px;border-radius:3px;border-bottom:1px solid #ccc;background:#fff;color:#333;text-align:right}
|
||||
.view_is_list li {display:inline-block}
|
||||
|
||||
/* 게시판 쓰기 */
|
||||
#bo_w #wr_email, #bo_w #wr_homepage, #bo_w #wr_subject {width:100%}
|
||||
|
||||
#char_count_desc {display:block;margin:0 0 5px;padding:0}
|
||||
#char_count_wrap {margin:5px 0 0;text-align:right}
|
||||
#char_count {font-weight:bold}
|
||||
|
||||
#wr_email, #wr_homepage, #wr_subject, .wr_link {width:100%}
|
||||
.fix_btn.write_btn{z-index:99}
|
||||
|
||||
/* 게시판 읽기 */
|
||||
#bo_v {padding:20px 0 0;background:#fff}
|
||||
#bo_v>header {padding:0 15px;border-bottom:1px solid #eee}
|
||||
#bo_v_table {padding:10px;color:#999;font-size:0.9em;font-weight:bold}
|
||||
|
||||
#bo_v_title {}
|
||||
.bo_v_cate {display:inline-block;background:#e2eaf6;color:#3a8afd;border-radius:13px;line-height:20px;border-radius:5px;padding:0 5px;font-weight:bold}
|
||||
.bo_v_tit {display:block;font-size:1.5em;margin:10px 0 0}
|
||||
|
||||
#bo_v_info {padding:15px 0;color:#8e8e8e;line-height:20px}
|
||||
#bo_v_info h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
#bo_v_info strong {display:inline-block;font-weight:normal;margin:0 5px}
|
||||
#bo_v_info .profile_img img {border-radius:50%;vertical-align:top}
|
||||
#bo_v_info .icon_view {display:inline-block;background:url('./img/icon_view.png') no-repeat 50% 50%;background-size:80%;height:15px;width:20px;overflow:hidden;text-indent:-999px;vertical-align:middle;margin:0 3px 0 5px}
|
||||
#bo_v_info .icon_comment {display:inline-block;background:url('./img/icon_comment.png') no-repeat 50% 50%;background-size:70%;height:15px;width:20px;overflow:hidden;text-indent:-999px;vertical-align:middle;margin:0 3px 0 5px}
|
||||
|
||||
#bo_v_file {padding:0 15px;margin-bottom:20px}
|
||||
#bo_v_file h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_v_file ul {margin:0;list-style:none}
|
||||
#bo_v_file li {padding:15px;position:relative;margin:10px 0;border:1px solid #dfdfdf}
|
||||
#bo_v_file li i {float:left;color:#b2b2b2;font-size:1.6em;margin-right:20px}
|
||||
#bo_v_file a {float:left;display:block;margin-right:10px;text-decoration:none;word-wrap:break-word;color:#000}
|
||||
|
||||
@media (max-width:450px){
|
||||
#bo_v_file a {float:inherit}
|
||||
}
|
||||
|
||||
#bo_v_file a:focus, #bo_v_file li:hover a, #bo_v_file a:active {text-decoration:underline;color:#3a8afd}
|
||||
#bo_v_file img {float:left;margin:0 10px 0 0}
|
||||
#bo_v_file .bo_v_file_cnt {color:#b2b2b2;font-size:0.92em}
|
||||
#bo_v_file li:hover {border-color:#bed4f4;color:#bed4f4}
|
||||
#bo_v_file li:hover i {color:#3a8afd}
|
||||
#bo_v_file li:hover .bo_v_file_cnt {color:#99c2fc}
|
||||
|
||||
#bo_v_link {padding:0 15px;margin-bottom:20px}
|
||||
#bo_v_link h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_v_file ul {margin:0;list-style:none}
|
||||
#bo_v_link li {padding:15px;position:relative;margin:10px 0;border:1px solid #dfdfdf}
|
||||
#bo_v_link li i {float:left;color:#b2b2b2;font-size:1.6em;margin-right:20px}
|
||||
#bo_v_link a {float:left;display:block;margin-right:10px;text-decoration:none;word-wrap:break-word;color:#000}
|
||||
#bo_v_link a:focus, #bo_v_link li:hover a, #bo_v_link a:active {text-decoration:underline;color:#3a8afd}
|
||||
#bo_v_link .bo_v_link_cnt {color:#b2b2b2;font-size:0.92em}
|
||||
#bo_v_link li:hover {border-color:#bed4f4;color:#bed4f4}
|
||||
#bo_v_link li:hover i {color:#3a8afd}
|
||||
#bo_v_link li:hover .bo_v_link_cnt {color:#99c2fc}
|
||||
|
||||
#bo_v_top {margin:10px 15px}
|
||||
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_top h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
#bo_v_top ul {margin:0;padding:0;list-style:none}
|
||||
#bo_v_top ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_top ul li {display:inline-block}
|
||||
.bo_v_left {float:left}
|
||||
.bo_v_right {float:right}
|
||||
|
||||
#bo_v_bot {padding:0 10px}
|
||||
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_bot h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
#bo_v_bot ul {margin:0;padding:0;list-style:none}
|
||||
|
||||
.bo_v_nb {position:relative;margin:10px 0 0;border-top:1px solid #e4e4ec;border-bottom:1px solid #e4e4ec;text-align:left}
|
||||
.bo_v_nb:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_v_nb li {}
|
||||
.bo_v_nb li a {display:block;padding:15px;color:#777}
|
||||
.bo_v_nb li a i {color:#c5cfdd}
|
||||
.bo_v_nb li.bo_v_prev {border-bottom:1px solid #f8f8f8}
|
||||
.bo_v_nb li.bo_v_next {}
|
||||
|
||||
|
||||
#bo_v_atc {min-height:200px;padding:15px}
|
||||
#bo_v_atc_title {margin:0;padding:0;height:0;overflow:hidden}
|
||||
|
||||
#bo_v_img {width:100%;overflow:hidden;zoom:1}
|
||||
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_img a.view_image {display:block}
|
||||
#bo_v_img img {margin-bottom:15px;max-width:100%;height:auto}
|
||||
|
||||
#bo_v_con {min-height:200px;margin-bottom:20px;width:100%;font-size:1.250em;line-height:1.7em;word-break:break-all;overflow:hidden}
|
||||
#bo_v_con a {color:#000;text-decoration:underline}
|
||||
#bo_v_con img {max-width:100%;height:auto}
|
||||
|
||||
#bo_v_act {margin-bottom:30px;text-align:center}
|
||||
#bo_v_act .bo_v_act_gng {position:relative}
|
||||
#bo_v_act a {margin-right:5px;vertical-align:middle;color:#4a5158}
|
||||
#bo_v_act a:hover {background-color:#fff;color:#ff484f;border-color:#ff484f}
|
||||
#bo_v_act i {font-size:1.4em;margin-right:5px}
|
||||
#bo_v_act_good, #bo_v_act_nogood {display:none;position:absolute;top:30px;left:0;z-index:9999;padding:10px 0;width:165px;background:#ff3061;color:#fff;text-align:center}
|
||||
#bo_v_act .bo_v_good {display:inline-block;border:1px solid #dedede;width:70px;line-height:46px;border-radius:30px}
|
||||
#bo_v_act .bo_v_nogood {display:inline-block;border:1px solid #dedede;width:70px;line-height:46px;border-radius:30px}
|
||||
|
||||
/* 게시판 댓글 */
|
||||
#bo_vc {background:#f8f8f8;padding:15px}
|
||||
#bo_vc h2.bo_vc_tit {}
|
||||
#bo_vc h2 span {color:#3a8afd}
|
||||
#bo_vc article {}
|
||||
#bo_vc article .comment_inner{margin:15px 0 0;padding:15px;background:#fff;border-bottom:1px solid #e4e4ec}
|
||||
#bo_vc article h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
#bo_vc header {position:relative;padding:0;line-height:20px;padding-right:18px}
|
||||
#bo_vc .profile_img {vertical-align:text-bottom}
|
||||
#bo_vc .profile_img img {width:23px;height:23px;border-radius:50%}
|
||||
#bo_vc header .bo_vl_opt {position:absolute;top:-5px;right:-8px}
|
||||
.comment_inner .bo_vc_w{margin-top:10px;padding-top:15px}
|
||||
|
||||
#bo_vc .sv_member, #bo_vc .sv_guest {font-weight:bold}
|
||||
.bo_vc_hdinfo {display:inline-block;color:#777}
|
||||
#bo_vc h1 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_vc .cmt_contents {margin:10px 0 0;border-radius:5px;line-height:1.8em}
|
||||
#bo_vc .cmt_contents p {font-size:1.083em}
|
||||
#bo_vc p a {text-decoration:underline}
|
||||
#bo_vc p a.s_cmt {text-decoration:underline;color:#ed6479}
|
||||
#bo_vc_empty {margin:0;padding:15px !important;text-align:center}
|
||||
#bo_vc #bo_vc_winfo {float:left}
|
||||
#bo_vc footer {zoom:1}
|
||||
#bo_vc footer:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
.bo_vc_act {display:none;position:absolute;right:0;top:40px;width:58px;text-align:center;border:1px solid #b8bfc4;margin:0;list-style:none;background:#fff;zoom:1;z-index:9999}
|
||||
.bo_vc_act:before {content:"";position:absolute;top:-8px;right:5px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.bo_vc_act:after {content:"";position:absolute;top:-6px;right:5px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.bo_vc_act li {border-bottom:1px solid #f0f0f0}
|
||||
.bo_vc_act li:last-child {border-bottom:0}
|
||||
.bo_vc_act li a {display:inline-block;padding:10px 15px}
|
||||
.bo_vc_act li a:hover {color:#3a8afd}
|
||||
|
||||
#bo_vc_w h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
.bo_vc_w {display:block;position:relative;padding:0 15px 15px;background:#f8f8f8}
|
||||
.bo_vc_w:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_vc_w #char_cnt {display:block;margin:0 0 5px}
|
||||
.bo_vc_w textarea {width:100%;height:120px;padding:5px;border:1px solid #d0d3db;background:#fff;color:#000;vertical-align:middle}
|
||||
#wr_secret {}
|
||||
|
||||
.bo_vc_w_info {margin:10px 0}
|
||||
.bo_vc_w_info:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_vc_w_info .frm_input {float:left;width:49.5%;margin:0 0 5px 0}
|
||||
.bo_vc_w_info #wr_password {float:right}
|
||||
.bo_vc_w_info #captcha {display:block;clear:both}
|
||||
.bo_vc_w .btn_confirm {margin-top:5px;clear:both}
|
||||
.bo_vc_w .icon_lock {display:inline-block;font-size:1em;vertical-align:baseline}
|
||||
.bo_vc_w .btn_submit {height:50px;width:100%;padding:0 20px;border-radius:3px;font-weight:bold;font-size:1.083em}
|
||||
.bo_vc_w_wr:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_vc_w .bo_vc_secret {display:block}
|
||||
|
||||
#bo_vc_send_sns {display:block;margin-bottom:10px}
|
||||
#bo_vc_sns {display:block;margin:0;padding:0;list-style:none;zoom:1}
|
||||
#bo_vc_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_vc_sns li {float:left;margin:0 5px 0 0}
|
||||
#bo_vc_sns .sns_li_f {border-radius:3px;background:#3a589b;height:40px;padding: 10px 0 10px 10px}
|
||||
#bo_vc_sns .sns_li_t {border-radius:3px;background:#00aced;height:40px;padding: 10px 0 10px 10px}
|
||||
#bo_vc_sns .sns_li_off {background:#bbb}
|
||||
#bo_vc_sns a {display:inline-block;padding:0 15px 0 5px}
|
||||
#bo_vc_sns input {margin:0 5px 0 0}
|
||||
|
||||
/* 게시판 쓰기 */
|
||||
#bo_w {padding:15px}
|
||||
#bo_w .bo_v_option li {display:inline-block;float:left;margin:0 5px 0 0}
|
||||
#bo_w .bo_v_option li label {vertical-align:baseline}
|
||||
#bo_w .bo_v_option:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_w .bo_w_select select {border:1px solid #d0d3db;background:#fff;width:100%}
|
||||
#bo_w .bo_w_link label {position:absolute;top:1px;left:1px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2}
|
||||
#bo_w .bo_w_link .frm_input {padding-left:50px}
|
||||
#bo_w .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2}
|
||||
#bo_w .bo_w_flie .frm_file {padding-left:50px}
|
||||
#bo_w .bo_w_flie .file_wr {position:relative;color:#000;vertical-align:middle;margin:0}
|
||||
#bo_w .bo_w_flie .frm_input {margin:5px 0 0}
|
||||
|
||||
.filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:60px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;background:#fff;text-align:center;vertical-align:middle;cursor:pointer}
|
||||
.filebox .fileName {display:inline-block;position:relative;width:100%;height:45px;padding-left:45px;line-height:30px;border:1px solid #d0d3db;background-color:#fff;color:red;vertical-align:middle;border-radius:0}
|
||||
.filebox input[type="file"] {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
|
||||
|
||||
#bo_w .btn_confirm {text-align:center;margin:20px 0}
|
||||
#bo_w .btn_submit {width:49%;height:45px;padding:0 30px;font-weight:bold;font-size:1.083em}
|
||||
#bo_w .btn_cancel {width:49%;line-height:45px;height:45px;padding:0 30px;font-weight:bold;font-size:1.083em;background:#fff;border-radius:3px;border:1px solid #dcdcdc}
|
||||
283
theme/rb.basic/mobile/skin/board/basic/view.skin.php
Normal file
@ -0,0 +1,283 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
|
||||
|
||||
<!-- 게시판 이름 표시 <div id="bo_v_table"><?php echo ($board['bo_mobile_subject'] ? $board['bo_mobile_subject'] : $board['bo_subject']); ?></div> -->
|
||||
<ul class="btn_top top btn_bo_user">
|
||||
<li><a href="#bo_vc" class="btn_b03 btn" title="댓글"><i class="fa fa-commenting" aria-hidden="true"></i><span class="sound_only">댓글</span></a></li>
|
||||
<?php if ($board['bo_use_sns'] || $scrap_href){ ?>
|
||||
<li class="bo_share">
|
||||
<button type="button" class="btn_share_opt btn_b03 btn is_view_btn" title="공유"><i class="fa fa-share-alt" aria-hidden="true"></i><span class="sound_only">공유</span></button>
|
||||
<div id="bo_v_share" class="is_view_btn">
|
||||
<?php if ($scrap_href) { ?><a href="<?php echo $scrap_href; ?>" target="_blank" class=" btn_scrap" onclick="win_scrap(this.href); return false;" title="스크랩"><i class="fa fa-thumb-tack" aria-hidden="true"></i><span class="sound_only">스크랩</span></a><?php } ?>
|
||||
<?php include_once(G5_SNS_PATH."/view.sns.skin.php"); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b03 btn" title="글쓰기"><i class="fa fa-pencil" aria-hidden="true"></i><span class="sound_only">글쓰기</a></li><?php } ?>
|
||||
|
||||
<li>
|
||||
<button type="button" class="btn_more_opt btn_b03 btn is_view_btn" title="게시판 리스트 옵션"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
|
||||
<?php ob_start(); ?>
|
||||
<ul class="more_opt is_view_btn">
|
||||
<?php if ($reply_href) { ?><li><a href="<?php echo $reply_href ?>"><i class="fa fa-reply" aria-hidden="true"></i> 답변</a></li><?php } ?>
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
|
||||
<?php if ($copy_href) { ?><li><a href="<?php echo $copy_href ?>" onclick="board_move(this.href); return false;"><i class="fa fa-files-o" aria-hidden="true"></i> 복사</a></li><?php } ?>
|
||||
<?php if ($move_href) { ?><li><a href="<?php echo $move_href ?>" onclick="board_move(this.href); return false;"><i class="fa fa-arrows" aria-hidden="true"></i> 이동</a></li><?php } ?>
|
||||
<?php if ($search_href) { ?><li><a href="<?php echo $search_href ?>">검색</a></li><?php } ?>
|
||||
<li><a href="<?php echo $list_href ?>" class="btn_list"><i class="fa fa-list" aria-hidden="true"></i> 목록</a></li>
|
||||
</ul>
|
||||
<?php $link_buttons = ob_get_contents(); ob_end_flush(); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
// 게시판 보기 버튼 옵션
|
||||
$(".btn_more_opt.is_view_btn").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
$(".more_opt.is_view_btn").toggle();
|
||||
});
|
||||
// 게시글 공유
|
||||
$(".btn_share_opt").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
$("#bo_v_share").toggle();
|
||||
});
|
||||
$(document).on("click", function (e) {
|
||||
if(!$(e.target).closest('.is_view_btn').length) {
|
||||
$(".more_opt.is_view_btn").hide();
|
||||
$("#bo_v_share").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<article id="bo_v" style="width:<?php echo $width; ?>">
|
||||
<header>
|
||||
<h2 id="bo_v_title">
|
||||
<?php if ($category_name) { ?>
|
||||
<span class="bo_v_cate"><?php echo $view['ca_name']; // 분류 출력 끝 ?></span>
|
||||
<?php } ?>
|
||||
<span class="bo_v_tit"><?php echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력 ?></span>
|
||||
</h2>
|
||||
<div id="bo_v_info">
|
||||
<h2>페이지 정보</h2>
|
||||
<span class="sound_only">작성자 </span><?php echo $view['name'] ?><span class="ip"><?php if ($is_ip_view) { echo " ($ip)"; } ?></span>
|
||||
<span class="sound_only">작성일</span><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?>
|
||||
<span class="sound_only">조회</span><strong><i class="fa fa-eye" aria-hidden="true"></i> <?php echo number_format($view['wr_hit']) ?></strong>
|
||||
<span class="sound_only">댓글</span><strong><i class="fa fa-commenting-o" aria-hidden="true"></i> <?php echo number_format($view['wr_comment']) ?></strong>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section id="bo_v_atc">
|
||||
<h2 id="bo_v_atc_title">본문</h2>
|
||||
|
||||
<?php
|
||||
// 파일 출력
|
||||
$v_img_count = count($view['file']);
|
||||
if($v_img_count) {
|
||||
echo "<div id=\"bo_v_img\">\n";
|
||||
|
||||
foreach($view['file'] as $view_file) {
|
||||
echo get_file_thumbnail($view_file);
|
||||
}
|
||||
echo "</div>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
|
||||
<?php //echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
|
||||
|
||||
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
|
||||
|
||||
<?php if ( $good_href || $nogood_href) { ?>
|
||||
<div id="bo_v_act">
|
||||
<?php if ($good_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $good_href.'&'.$qstr ?>" id="good_button" class="bo_v_good"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> <span class="sound_only">추천</span><strong><?php echo number_format($view['wr_good']) ?></strong></a>
|
||||
<b id="bo_v_act_good">이 글을 추천하셨습니다</b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i> <span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } else {
|
||||
if($board['bo_use_good'] || $board['bo_use_nogood']) {
|
||||
?>
|
||||
<div id="bo_v_act">
|
||||
<?php if($board['bo_use_good']) { ?><span class="bo_v_good"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">추천</span><strong><?php echo number_format($view['wr_good']) ?></strong></span><?php } ?>
|
||||
<?php if($board['bo_use_nogood']) { ?><span class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span> <strong><?php echo number_format($view['wr_nogood']) ?></strong></span><?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$cnt = 0;
|
||||
if ($view['file']['count']) {
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if($cnt) { ?>
|
||||
<section id="bo_v_file">
|
||||
<h2>첨부파일</h2>
|
||||
<ul>
|
||||
<?php
|
||||
// 가변 파일
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
</a>
|
||||
<span class="bo_v_file_cnt"><?php echo $view['file'][$i]['download'] ?>회 다운로드</span> |
|
||||
<span>DATE : <?php echo $view['file'][$i]['datetime'] ?></span>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(isset($view['link']) && array_filter($view['link'])) { ?>
|
||||
<!-- 관련링크 시작 { -->
|
||||
<section id="bo_v_link">
|
||||
<h2>관련링크</h2>
|
||||
<ul>
|
||||
<?php
|
||||
// 링크
|
||||
$cnt = 0;
|
||||
for ($i=1; $i<=count($view['link']); $i++) {
|
||||
if ($view['link'][$i]) {
|
||||
$cnt++;
|
||||
$link = cut_str($view['link'][$i], 70);
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
|
||||
<i class="fa fa-link" aria-hidden="true"></i>
|
||||
<strong><?php echo $link ?></strong>
|
||||
</a>
|
||||
<span class="bo_v_link_cnt"><?php echo $view['link_hit'][$i] ?>회 연결</span>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- } 관련링크 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_wr_subject;?></a></li><?php } ?>
|
||||
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_wr_subject;?></a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// 코멘트 입출력
|
||||
include_once(G5_BBS_PATH.'/view_comment.php');
|
||||
?>
|
||||
|
||||
</article>
|
||||
|
||||
<script>
|
||||
<?php if ($board['bo_download_point'] < 0) { ?>
|
||||
$(function() {
|
||||
$("a.view_file_download").click(function() {
|
||||
if(!g5_is_member) {
|
||||
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
|
||||
|
||||
if(confirm(msg)) {
|
||||
var href = $(this).attr("href")+"&js=on";
|
||||
$(this).attr("href", href);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
function board_move(href)
|
||||
{
|
||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- 게시글 보기 끝 -->
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.view_image").click(function() {
|
||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||
return false;
|
||||
});
|
||||
|
||||
// 추천, 비추천
|
||||
$("#good_button, #nogood_button").click(function() {
|
||||
var $tx;
|
||||
if(this.id == "good_button")
|
||||
$tx = $("#bo_v_act_good");
|
||||
else
|
||||
$tx = $("#bo_v_act_nogood");
|
||||
|
||||
excute_good(this.href, $(this), $tx);
|
||||
return false;
|
||||
});
|
||||
|
||||
// 이미지 리사이즈
|
||||
$("#bo_v_atc").viewimageresize();
|
||||
});
|
||||
|
||||
function excute_good(href, $el, $tx)
|
||||
{
|
||||
$.post(
|
||||
href,
|
||||
{ js: "on" },
|
||||
function(data) {
|
||||
if(data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(data.count) {
|
||||
$el.find("strong").text(number_format(String(data.count)));
|
||||
if($tx.attr("id").search("nogood") > -1) {
|
||||
$tx.text("이 글을 비추천하셨습니다.");
|
||||
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
||||
} else {
|
||||
$tx.text("이 글을 추천하셨습니다.");
|
||||
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
||||
}
|
||||
}
|
||||
}, "json"
|
||||
);
|
||||
}
|
||||
</script>
|
||||
348
theme/rb.basic/mobile/skin/board/basic/view_comment.skin.php
Normal file
@ -0,0 +1,348 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
</script>
|
||||
|
||||
<!-- 댓글 리스트 -->
|
||||
<section id="bo_vc">
|
||||
<h2 class="bo_vc_tit">댓글목록 <span><?php echo $view['wr_comment']; ?></span></h2>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = ""; // 댓글단계
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 15;
|
||||
$str = $list[$i]['content'];
|
||||
// if (strstr($list[$i]['wr_option'], "secret"))
|
||||
// $str = $str;
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-bottom-color:#f8f8f8"<?php } ?>>
|
||||
<div class="comment_inner">
|
||||
<header>
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 댓글<?php if ($cmt_depth) { ?><span class="sound_only">의 댓글</span><?php } ?></h2>
|
||||
<?php echo $list[$i]['name'] ?>
|
||||
<?php if ($is_ip_view) { ?>
|
||||
<span class="sound_only">아이피</span>
|
||||
<span class="bo_vc_hdinfo">(<?php echo $list[$i]['ip']; ?>)</span>
|
||||
<?php } ?>
|
||||
<span class="sound_only">작성일</span>
|
||||
<span class="bo_vc_hdinfo"><i class="fa fa-clock-o" aria-hidden="true"></i> <time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
|
||||
<?php
|
||||
include(G5_SNS_PATH."/view_comment_list.sns.skin.php");
|
||||
?>
|
||||
<?php if( $is_comment_reply_edit ){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
<?php if ($list[$i]['is_reply']) { ?><li><a href="<?php echo $c_reply_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;">답변</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_edit']) { ?><li><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;">수정</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
$(".btn_cm_opt").on("click", function(){
|
||||
$(this).parent("div").children(".bo_vc_act").show();
|
||||
});
|
||||
|
||||
// 댓글 옵션창 닫기
|
||||
$(document).mouseup(function (e){
|
||||
var container = $(".bo_vc_act");
|
||||
if( container.has(e.target).length === 0)
|
||||
container.hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</header>
|
||||
<div class="cmt_contents">
|
||||
<!-- 댓글 출력 -->
|
||||
<p>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) echo "<img src=\"".$board_skin_url."/img/icon_secret.gif\" alt=\"비밀글\">"; ?>
|
||||
<?php echo $str ?>
|
||||
</p>
|
||||
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
||||
<span id="reply_<?php echo $comment_id ?>"></span><!-- 답변 -->
|
||||
<input type="hidden" id="secret_comment_<?php echo $comment_id ?>" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
<?php if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><?php } ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php if ($is_comment_write) {
|
||||
if($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
<aside id="bo_vc_w">
|
||||
<h2>댓글쓰기</h2>
|
||||
<form name="fviewcomment" id="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off" class="bo_vc_w">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||
<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="comment_id" value="<?php echo $c_id ?>" id="comment_id">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="is_good" value="">
|
||||
|
||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
|
||||
<textarea id="wr_content" name="wr_content" required title="댓글 내용"
|
||||
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?> placeholder="댓글내용을 입력해주세요"><?php echo $c_wr_content; ?></textarea>
|
||||
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||
|
||||
<div class="bo_vc_w_wr">
|
||||
<div class="bo_vc_w_info">
|
||||
<?php if ($is_guest) { ?>
|
||||
<label for="wr_name" class="sound_only">이름<strong> 필수</strong></label>
|
||||
<input type="text" name="wr_name" value="<?php echo get_cookie("ck_sns_name"); ?>" id="wr_name" required class="frm_input required" size="25" placeholder="이름">
|
||||
<label for="wr_password" class="sound_only">비밀번호<strong> 필수</strong></label>
|
||||
<input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="25" placeholder="비밀번호">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if ($is_guest) { ?>
|
||||
<?php echo $captcha_html; ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||
?>
|
||||
<span class="sound_only">SNS 동시등록</span>
|
||||
<span id="bo_vc_send_sns"></span>
|
||||
<?php } ?>
|
||||
|
||||
<span class="bo_vc_secret chk_box">
|
||||
<input type="checkbox" name="wr_secret" value="secret" id="wr_secret" class="selec_chk">
|
||||
<label for="wr_secret" class="icon_lock">
|
||||
<span></span>비밀글
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btn_confirm">
|
||||
<button type="submit" id="btn_submit" class="btn_submit">댓글등록</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
f.submit();
|
||||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
||||
/*
|
||||
var s;
|
||||
if (s = word_filter_check(document.getElementById('wr_content').value))
|
||||
{
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
document.getElementById('wr_content').focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
{
|
||||
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
set_comment_token(f);
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
var el_id,
|
||||
form_el = 'fviewcomment',
|
||||
respond = document.getElementById(form_el);
|
||||
|
||||
// 댓글 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
el_id = 'edit_' + comment_id;
|
||||
}
|
||||
else
|
||||
el_id = 'bo_vc_w';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
}
|
||||
|
||||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).appendChild(respond);
|
||||
//입력값 초기화
|
||||
document.getElementById('wr_content').value = '';
|
||||
|
||||
// 댓글 수정
|
||||
if (work == 'cu')
|
||||
{
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
}
|
||||
|
||||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
if(save_before)
|
||||
$("#captcha_reload").trigger("click");
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
|
||||
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||
$(function() {
|
||||
// sns 등록
|
||||
$("#bo_vc_send_sns").load(
|
||||
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
|
||||
function() {
|
||||
save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
$(function() {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(){
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
252
theme/rb.basic/mobile/skin/board/basic/write.skin.php
Normal file
@ -0,0 +1,252 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<section id="bo_w">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<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="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= PHP_EOL.'<li class="chk_box"><input type="checkbox" id="notice" name="notice" class="selec_chk" value="1" '.$notice_checked.'>'.PHP_EOL.'<label for="notice"><span></span>공지</label></li>';
|
||||
}
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= PHP_EOL.'<li class="chk_box"><input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" class="selec_chk" value="'.$html_value.'" '.$html_checked.'>'.PHP_EOL.'<label for="html"><span></span>html</label></li>';
|
||||
}
|
||||
}
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= PHP_EOL.'<li class="chk_box"><input type="checkbox" id="secret" name="secret" class="selec_chk" value="secret" '.$secret_checked.'>'.PHP_EOL.'<label for="secret"><span></span>비밀글</label></li>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
if ($is_mail) {
|
||||
$option .= PHP_EOL.'<li class="chk_box"><input type="checkbox" id="mail" name="mail" class="selec_chk" value="mail" '.$recv_email_checked.'>'.PHP_EOL.'<label for="mail"><span></span>답변메일받기</label></li>';
|
||||
}
|
||||
}
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<div class="form_01 write_div">
|
||||
<h2 class="sound_only"><?php echo $g5['title'] ?></h2>
|
||||
|
||||
<?php if ($is_category) { ?>
|
||||
<div class="bo_w_select write_div">
|
||||
<label for="ca_name" class="sound_only">분류<strong>필수</strong></label>
|
||||
<select id="ca_name" name="ca_name" required>
|
||||
<option value="">선택하세요</option>
|
||||
<?php echo $category_option ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_name) { ?>
|
||||
<div class="write_div">
|
||||
<label for="wr_name" class="sound_only">이름<strong>필수</strong></label>
|
||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input full_input required" maxlength="20" placeholder="이름">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<div class="write_div">
|
||||
<label for="wr_password" class="sound_only">비밀번호<strong>필수</strong></label>
|
||||
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input full_input <?php echo $password_required ?>" maxlength="20" placeholder="비밀번호">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_email) { ?>
|
||||
<div class="write_div">
|
||||
<label for="wr_email" class="sound_only">이메일</label>
|
||||
<input type="email" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input full_input" maxlength="100" placeholder="이메일">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_homepage) { ?>
|
||||
<div class="write_div">
|
||||
<label for="wr_homepage" class="sound_only">홈페이지</label>
|
||||
<input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input full_input" placeholder="홈페이지">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($option) { ?>
|
||||
<div class="write_div">
|
||||
<span class="sound_only">옵션</span>
|
||||
<ul class="bo_v_option">
|
||||
<?php echo $option ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="bo_w_tit write_div">
|
||||
<label for="wr_subject" class="sound_only">제목<strong>필수</strong></label>
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input full_input required" placeholder="제목">
|
||||
</div>
|
||||
|
||||
<div class="write_div">
|
||||
<label for="wr_content" class="sound_only">내용<strong>필수</strong></label>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i> <span class="sound_only">링크 #<?php echo $i ?></span></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo $write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input wr_link" placeholder="링크를 입력하세요">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
|
||||
<div class="bo_w_flie write_div">
|
||||
<div class="file_wr write_div filebox">
|
||||
<input type="text" class="fileName" readonly="readonly" placeholder="파일을 첨부하세요">
|
||||
<label for="bf_file_<?php echo $i+1 ?>"><i class="fa fa-download lb_icon" aria-hidden="true"></i><span class="sound_only">파일 #<?php echo $i+1 ?></span><span class="btn_file">파일첨부</span></label>
|
||||
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file uploadBtn">
|
||||
</div>
|
||||
<?php if ($is_file_content) { ?>
|
||||
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="full_input frm_input" size="50" placeholder="파일 설명을 입력해주세요.">
|
||||
<?php } ?>
|
||||
|
||||
<?php if($w == 'u' && $file[$i]['file']) { ?>
|
||||
<span class="file_del">
|
||||
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div class="write_div">
|
||||
<span class="sound_only">자동등록방지</span>
|
||||
<?php echo $captcha_html ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="btn_cancel">취소</a>
|
||||
<button type="submit" id="btn_submit" class="btn_submit" accesskey="s">작성완료</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||
check_byte("wr_content", "char_count");
|
||||
|
||||
$(function() {
|
||||
$("#wr_content").on("keyup", function() {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
});
|
||||
|
||||
<?php } ?>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "html2";
|
||||
else
|
||||
obj.value = "html1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var uploadFile = $('.filebox .uploadBtn');
|
||||
uploadFile.on('change', function(){
|
||||
if(window.FileReader){
|
||||
var filename = $(this)[0].files[0].name;
|
||||
} else {
|
||||
var filename = $(this).val().split('/').pop().split('\\').pop();
|
||||
}
|
||||
$(this).siblings('.fileName').val(filename);
|
||||
});
|
||||
</script>
|
||||