Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
125
views/board/bootstrap/comment_list.php
Normal file
125
views/board/bootstrap/comment_list.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<div class="alert alert-auto-close alert-dismissible alert-comment-list-message" style="display:none;"><button type="button" class="close alertclose">×</button><span class="alert-comment-list-message-content"></span></div>
|
||||
|
||||
<?php
|
||||
if (element('best_list', $view)) {
|
||||
foreach (element('best_list', $view) as $result) {
|
||||
?>
|
||||
<div class="media" id="comment_<?php echo element('cmt_id', $result); ?>">
|
||||
<?php if (element('use_comment_profile', element('board', $view))) { ?>
|
||||
<div class="media-left">
|
||||
<img class="media-object member-photo" src="<?php echo element('member_photo_url', $result); ?>" width="64" height="64" alt="<?php echo html_escape(element('cmt_nickname', $result)); ?>" title="<?php echo html_escape(element('cmt_nickname', $result)); ?>" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">
|
||||
<?php if (element('is_admin', $view)) { ?><input type="checkbox" name="chk_comment_id[]" value="<?php echo element('cmt_id', $result); ?>" /><?php } ?>
|
||||
<span class="label label-warning">베플</span>
|
||||
<?php echo element('display_name', $result); ?>
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php echo element('display_datetime', $result); ?></span>
|
||||
<?php if (element('display_ip', $result)) { ?>
|
||||
<span class="ip"><i class="fa fa-map-marker"></i> <?php echo element('display_ip', $result); ?></span>
|
||||
<?php } ?>
|
||||
<?php if (element('is_mobile', $result)) { ?><i class="fa fa-wifi"></i><?php } ?>
|
||||
<?php
|
||||
if ( ! element('post_del', element('post', $view))) {
|
||||
?>
|
||||
<span class="reply">
|
||||
<?php if (element('use_comment_like', element('board', $view))) { ?>
|
||||
<a class="good" href="javascript:;" id="btn-comment-like-<?php echo element('cmt_id', $result); ?>" onClick="comment_like('<?php echo element('cmt_id', $result); ?>', '1', 'comment-like-<?php echo element('cmt_id', $result); ?>');" title="추천하기"><i class="fa fa-thumbs-o-up fa-xs"></i> 추천 <span class="comment-like-<?php echo element('cmt_id', $result); ?>"><?php echo number_format(element('cmt_like', $result)); ?></span></a>
|
||||
<?php } ?>
|
||||
<?php if (element('use_comment_dislike', element('board', $view))) { ?>
|
||||
<a class="bad" href="javascript:;" id="btn-comment-dislike-<?php echo element('cmt_id', $result); ?>" onClick="comment_like('<?php echo element('cmt_id', $result); ?>', '2', 'comment-dislike-<?php echo element('cmt_id', $result); ?>');" title="비추하기"><i class="fa fa-thumbs-o-down fa-xs"></i> 비추 <span class="comment-dislike-<?php echo element('cmt_id', $result); ?>"><?php echo number_format(element('cmt_dislike', $result)); ?></span></a>
|
||||
<?php } ?>
|
||||
<?php if (element('use_comment_blame', element('board', $view)) && ( ! element('comment_blame_blind_count', element('board', $view)) OR element('cmt_blame', $result) < element('comment_blame_blind_count', element('board', $view)))) { ?>
|
||||
<a href="javascript:;" id="btn-blame" onClick="comment_blame('<?php echo element('cmt_id', $result); ?>', 'comment-blame-<?php echo element('cmt_id', $result); ?>');" title="신고하기"><i class="fa fa-bell fa-xs"></i><span class="comment-blame-<?php echo element('cmt_id', $result); ?>"><?php echo element('cmt_blame', $result) ? '+' . number_format(element('cmt_blame', $result)) : ''; ?></span></a>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (element('is_admin', $view) && element('use_comment_secret', element('board', $view))) {
|
||||
if (element('cmt_secret', $result)) {
|
||||
?>
|
||||
<a href="javascript:;" onClick="post_action('comment_secret', '<?php echo element('cmt_id', $result); ?>', '0');" title="비밀글 해제하기"><i class="fa fa-lock"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="javascript:;" onClick="post_action('comment_secret', '<?php echo element('cmt_id', $result); ?>', '1');" title="비밀글로 설정하기"><i class="fa fa-unlock"></i></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</h4>
|
||||
<div class="bg-success" style="padding:10px 5px;"><?php echo element('content', $result); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('list', element('data', $view))) {
|
||||
foreach (element('list', element('data', $view)) as $result) {
|
||||
?>
|
||||
|
||||
<div class="media" id="comment_<?php echo element('cmt_id', $result); ?>" style="padding-left:<?php echo element('cmt_depth', $result); ?>px;">
|
||||
<?php if (element('use_comment_profile', element('board', $view))) { ?>
|
||||
<div class="media-left">
|
||||
<img class="media-object member-photo" src="<?php echo element('member_photo_url', $result); ?>" width="64" height="64" alt="<?php echo html_escape(element('cmt_nickname', $result)); ?>" title="<?php echo html_escape(element('cmt_nickname', $result)); ?>" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">
|
||||
<?php if (element('is_admin', $view)) { ?><input type="checkbox" name="chk_comment_id[]" value="<?php echo element('cmt_id', $result); ?>" /><?php } ?>
|
||||
<?php echo element('display_name', $result); ?>
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php echo element('display_datetime', $result); ?></span>
|
||||
<?php if (element('display_ip', $result)) { ?>
|
||||
<span class="ip"><i class="fa fa-map-marker"></i> <?php echo element('display_ip', $result); ?></span>
|
||||
<?php } ?>
|
||||
<?php if (element('is_mobile', $result)) { ?><i class="fa fa-wifi"></i><?php } ?>
|
||||
<?php
|
||||
if ( ! element('post_del', element('post', $view)) && ! element('cmt_del', $result)) {
|
||||
?>
|
||||
<span class="reply">
|
||||
<?php if (element('use_comment_like', element('board', $view))) { ?>
|
||||
<a class="good" href="javascript:;" id="btn-comment-like-<?php echo element('cmt_id', $result); ?>" onClick="comment_like('<?php echo element('cmt_id', $result); ?>', '1', 'comment-like-<?php echo element('cmt_id', $result); ?>');" title="추천하기"><i class="fa fa-thumbs-o-up fa-xs"></i> 추천 <span class="comment-like-<?php echo element('cmt_id', $result); ?>"><?php echo number_format(element('cmt_like', $result)); ?></span></a>
|
||||
<?php } ?>
|
||||
<?php if (element('use_comment_dislike', element('board', $view))) { ?>
|
||||
<a class="bad" href="javascript:;" id="btn-comment-dislike-<?php echo element('cmt_id', $result); ?>" onClick="comment_like('<?php echo element('cmt_id', $result); ?>', '2', 'comment-dislike-<?php echo element('cmt_id', $result); ?>');" title="비추하기"><i class="fa fa-thumbs-o-down fa-xs"></i> 비추 <span class="comment-dislike-<?php echo element('cmt_id', $result); ?>"><?php echo number_format(element('cmt_dislike', $result)); ?></span></a>
|
||||
<?php } ?>
|
||||
<?php if (element('use_comment_blame', element('board', $view)) && ( ! element('comment_blame_blind_count', element('board', $view)) OR element('cmt_blame', $result) < element('comment_blame_blind_count', element('board', $view)))) { ?>
|
||||
<a href="javascript:;" id="btn-blame" onClick="comment_blame('<?php echo element('cmt_id', $result); ?>', 'comment-blame-<?php echo element('cmt_id', $result); ?>');" title="신고하기"><i class="fa fa-bell fa-xs"></i><span class="comment-blame-<?php echo element('cmt_id', $result); ?>"><?php echo element('cmt_blame', $result) ? '+' . number_format(element('cmt_blame', $result)) : ''; ?></span></a>
|
||||
<?php } ?>
|
||||
<?php if (element('can_reply', $result)) { ?>
|
||||
<a href="javascript:;" onClick="comment_box('<?php echo element('cmt_id', $result); ?>', 'c'); return false;">답변</a>
|
||||
<?php } ?>
|
||||
<?php if (element('can_update', $result)) { ?>
|
||||
<a href="javascript:;" onClick="comment_box('<?php echo element('cmt_id', $result); ?>', 'cu'); return false;">수정</a>
|
||||
<?php } ?>
|
||||
<?php if (element('can_delete', $result)) { ?>
|
||||
<a href="javascript:;" onClick="delete_comment('<?php echo element('cmt_id', $result); ?>', '<?php echo element('post_id', $result); ?>', '<?php echo element('page', $view); ?>');">삭제</a>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (element('is_admin', $view) && element('use_comment_secret', element('board', $view))) {
|
||||
if (element('cmt_secret', $result)) {
|
||||
?>
|
||||
<a href="javascript:;" onClick="post_action('comment_secret', '<?php echo element('cmt_id', $result); ?>', '0');"><i class="fa fa-lock"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="javascript:;" onClick="post_action('comment_secret', '<?php echo element('cmt_id', $result); ?>', '1');"><i class="fa fa-unlock"></i></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</h4>
|
||||
<?php echo element('content', $result); ?>
|
||||
<?php if (element('lucky', $result)) { ?><div class="lucky"><i class="fa fa-star"></i> <?php echo element('lucky', $result); ?></div><?php } ?>
|
||||
<span id="edit_<?php echo element('cmt_id', $result); ?>"></span><!-- 수정 -->
|
||||
<span id="reply_<?php echo element('cmt_id', $result); ?>"></span><!-- 답변 -->
|
||||
<input type="hidden" value="<?php echo element('cmt_secret', $result); ?>" id="secret_comment_<?php echo element('cmt_id', $result); ?>" />
|
||||
<textarea id="save_comment_<?php echo element('cmt_id', $result); ?>" style="display:none"><?php echo html_escape(element('cmt_content', $result)); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<nav><?php echo element('paging', $view); ?></nav>
|
||||
154
views/board/bootstrap/comment_write.php
Normal file
154
views/board/bootstrap/comment_write.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
if ( ! element('post_hide_comment', element('post', $view)) && element('is_admin', $view)) {
|
||||
?>
|
||||
<div class="chk_comment_all_wrapper"><label for="chk_comment_all"><input id="chk_comment_all" onclick="all_commentlist_checked(this.checked);" type="checkbox" /> 코멘트 전체선택</label></div>
|
||||
<button type="button" class="btn btn-default btn-sm admin-manage-comment"><i class="fa fa-cog big-fa"></i> 댓글관리</button>
|
||||
<div class="btn-admin-manage-layer admin-manage-layer-comment">
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_delete', '0', '선택하신 글들을 완전삭제하시겠습니까?');"><i class="fa fa-trash-o"></i> 선택삭제</div>
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_secret', '0', '선택하신 글들을 비밀글을 해제하시겠습니까?');"><i class="fa fa-unlock"></i> 비밀글해제</div>
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_secret', '1', '선택하신 글들을 비밀글로 설정하시겠습니까?');"><i class="fa fa-lock"></i> 비밀글로</div>
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_blame_blind', '0', '선택하신 글들을 블라인드 해제 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드해제</div>
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_blame_blind', '1', '선택하신 글들을 블라인드 처리 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드처리</div>
|
||||
<div class="item" onClick="comment_multi_action('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', 'comment_multi_trash', '', '선택하신 글들을 휴지통으로 이동하시겠습니까?');"><i class="fa fa-trash"></i> 휴지통으로</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (element('can_comment_write', element('comment', $view)) OR element('show_textarea', element('comment', $view))) {
|
||||
?>
|
||||
<div id="comment_write_box">
|
||||
<div class="well comment_write_box_inner">
|
||||
<div class="alert alert-auto-close alert-dismissible alert-comment-message" style="display:none;"><button type="button" class="close alertclose">×</button><span class="alert-comment-message-content"></span></div>
|
||||
<?php
|
||||
$attributes = array('name' => 'fcomment', 'id' => 'fcomment');
|
||||
echo form_open('', $attributes);
|
||||
?>
|
||||
<input type="hidden" name="mode" id="mode" value="c" />
|
||||
<input type="hidden" name="post_id" value="<?php echo element('post_id', element('post', $view)); ?>" />
|
||||
<input type="hidden" name="cmt_id" value="" id="cmt_id" />
|
||||
<input type="hidden" name="cmt_page" value="" id="cmt_page" />
|
||||
<?php
|
||||
if (element('is_comment_name', element('comment', $view))) {
|
||||
?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="cmt_nickname">이름</label>
|
||||
<input type="text" class="form-control" id="cmt_nickname" name="cmt_nickname" value="<?php echo set_value('cmt_nickname'); ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="cmt_password">비밀번호</label>
|
||||
<input type="password" class="form-control" id="cmt_password" name="cmt_password" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<textarea class="form-control" name="cmt_content" id="cmt_content" rows="5" accesskey="c" <?php if ( ! element('can_comment_write', element('comment', $view))) {echo 'onClick="alert(\'' . html_escape(element('can_comment_write_message', element('comment', $view))) . '\');return false;"';} ?>><?php echo set_value('cmt_content', element('cmt_content', element('comment', $view))); ?></textarea>
|
||||
<?php if (element('comment_min_length', element('board', $view)) OR element('comment_max_length', element('board', $view))) { ?>
|
||||
<div class="well well-sm" style="margin:15px 0;">
|
||||
현재 <strong><span id="char_count">0</span></strong> 글자이며,
|
||||
<?php if (element('comment_min_length', element('board', $view))) { ?>
|
||||
최소 <strong><?php echo number_format(element('comment_min_length', element('board', $view))); ?></strong> 글자 이상
|
||||
<?php } if (element('comment_max_length', element('board', $view))) { ?>
|
||||
최대 <strong><?php echo number_format(element('comment_max_length', element('board', $view))); ?></strong> 글자 이하
|
||||
<?php } ?>
|
||||
입력하실 수 있습니다.
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="comment_write_button_area">
|
||||
<div class="form-group pull-left">
|
||||
<button type="button" class="btn btn-danger btn-sm" id="cmt_btn_submit" onClick="<?php if ( ! element('can_comment_write', element('comment', $view))) {echo 'alert(\'' . html_escape(element('can_comment_write_message', element('comment', $view))) . '\');return false;"';} else { ?>add_comment(this.form, '<?php echo element('post_id', element('post', $view)); ?>');<?php } ?> ">댓글등록</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<?php if (element('can_comment_secret', element('comment', $view))) { ?>
|
||||
<div class="checkbox pull-left mr10">
|
||||
<label for="cmt_secret">
|
||||
<input type="checkbox" name="cmt_secret" id="cmt_secret" value="1" <?php echo set_checkbox('cmt_secret', '1', (element('cmt_secret', element('comment', $view)) ? true : false)); ?> /> 비밀글
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (element('use_emoticon', element('comment', $view))) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm" title="이모티콘" onclick="window.open('<?php echo site_url('helptool/emoticon?id=cmt_content'); ?>', 'emoticon', 'width=600,height=400,scrollbars=yes')"><i class="fa fa-smile-o fa-lg"></i></button>
|
||||
<?php } ?>
|
||||
<?php if (element('use_specialchars', element('comment', $view))) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm" title="특수문자" onclick="window.open('<?php echo site_url('helptool/specialchars?id=cmt_content'); ?>', 'specialchars', 'width=490,height=245,scrollbars=yes')"><i class="fa fa-star-o fa-lg"></i></button>
|
||||
<?php } ?>
|
||||
<button type="button" class="btn btn-default btn-sm" title="새글등록" onClick="comment_box('', 'c');"><i class="fa fa-pencil fa-lg"></i></button>
|
||||
<button type="button" class="btn btn-default btn-sm" title="창을크게" onClick="resize_textarea('cmt_content', 'down');"><i class="fa fa-plus fa-lg"></i></button>
|
||||
<button type="button" class="btn btn-default btn-sm" title="창을작게" onClick="resize_textarea('cmt_content', 'up');"><i class="fa fa-minus fa-lg"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->member->is_member() === false) { ?>
|
||||
<div class="form-inline passcord">
|
||||
<?php if ($this->cbconfig->item('use_recaptcha')) { ?>
|
||||
<div class="captcha" id="recaptcha"></div>
|
||||
<button type="button" id="captcha" style="display:none;"></button>
|
||||
<input type="hidden" name="recaptcha" />
|
||||
<?php } else { ?>
|
||||
<div class="form-group"><img src="<?php echo base_url('assets/images/preload.png'); ?>" width="160" height="40" id="captcha" alt="captcha" title="captcha" /></div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control col-md-4" id="captcha_key" name="captcha_key" />
|
||||
</div>
|
||||
<div class="form-group">자동등록방지 숫자입력</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo (int) element('comment_min_length', element('board', $view)); ?>); // 최소
|
||||
var char_max = parseInt(<?php echo (int) element('comment_max_length', element('board', $view)); ?>); // 최대
|
||||
|
||||
<?php if (element('comment_min_length', element('board', $view)) OR element('comment_max_length', element('board', $view))) { ?>
|
||||
|
||||
check_byte('cmt_content', 'char_count');
|
||||
$(function() {
|
||||
$(document).on('keyup', '#cmt_content', function() {
|
||||
check_byte('cmt_content', 'char_count');
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
</script>
|
||||
<script type="text/javascript" src="<?php echo base_url('assets/js/comment.js'); ?>"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function($) {
|
||||
view_comment('viewcomment', '<?php echo element('post_id', element('post', $view)); ?>', '', '');
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php if (element('is_comment_name', element('comment', $view))) { ?>
|
||||
<?php if ($this->cbconfig->item('use_recaptcha')) { ?>
|
||||
<script type="text/javascript" src="<?php echo base_url('assets/js/recaptcha.js'); ?>"></script>
|
||||
<?php } else { ?>
|
||||
<script type="text/javascript" src="<?php echo base_url('assets/js/captcha.js'); ?>"></script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fcomment').validate({
|
||||
rules: {
|
||||
<?php if (element('is_comment_name', element('comment', $view))) { ?>
|
||||
cmt_nickname: {required :true, minlength:2, maxlength:20},
|
||||
cmt_password: {required :true, minlength:<?php echo element('password_length', element('comment', $view)); ?>},
|
||||
<?php if ($this->cbconfig->item('use_recaptcha')) { ?>
|
||||
recaptcha : {recaptchaKey:true},
|
||||
<?php } else { ?>
|
||||
captcha_key : {required: true, captchaKey:true},
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
cmt_content: {required :true},
|
||||
mode : {required : true}
|
||||
},
|
||||
messages: {
|
||||
recaptcha: '',
|
||||
captcha_key: '자동등록방지용 코드가 올바르지 않습니다.'
|
||||
}
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
67
views/board/bootstrap/css/style.css
Normal file
67
views/board/bootstrap/css/style.css
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
board skin css
|
||||
*/
|
||||
|
||||
.board .table{border-top: 2px solid #000;border-bottom: 1px solid #ccc;}
|
||||
.border_button{overflow:hidden;}
|
||||
.board .comment-count a{color:#348fe2;padding-left:10px;}
|
||||
.board .info{overflow:hidden;}
|
||||
.board .info li{float:left; padding-right:20px;}
|
||||
.board .contents-view{padding:30px 20px; clear:both;}
|
||||
.board .contents-view-img img { display:block; max-width:100%; margin:0 auto 15px; border:0; height:auto; }
|
||||
#post-content {word-wrap: break-word;}
|
||||
#post-content img {max-width:100%;}
|
||||
|
||||
.board .fa-user{color:#626262;}
|
||||
.board .fa-comments{color:#626262;}
|
||||
.board .fa-eye{color:#626262;}
|
||||
.board .fa-thumbs-up{color:#626262;}
|
||||
.board .fa-thumbs-down{color:#626262;}
|
||||
.board .fa-clock-o{color:#626262;}
|
||||
.board .fa-reply{color:#626262;}
|
||||
.board .gallery .thumbnail{margin-bottom:10px;}
|
||||
.board .recommand{text-align:center;margin-bottom:20px;}
|
||||
.board .recommand a:hover{background:#348fe2; color:#fff; text-decoration:none;}
|
||||
.board .recommand .good{background:#e9e9e9; width:50px; height:50px; display:inline-block; border-radius:50px; padding:8px; margin:0 10px;}
|
||||
.board .recommand .bad{background:#e9e9e9; width:50px; height:50px; display:inline-block; border-radius:50px;padding:6px; margin:0 10px;}
|
||||
.board .like {padding-top:20px;}
|
||||
.board .like a{text-decoration:none;}
|
||||
.board .time{font-size:12px; padding-left:10px;}
|
||||
.board .tags a{font-size:12px; padding-left:5px;}
|
||||
.board .reply{float:right; font-size:12px;}
|
||||
.board .reply a{padding-left:5px;}
|
||||
.board .ip{font-size:12px; padding-left:10px;}
|
||||
.board .tags li{float:left; padding-right:10px;}
|
||||
.board .sns_button div {float:left; padding-right:5px;}
|
||||
.board .btn-point-info {padding-top:8px;color:#BBB;}
|
||||
|
||||
.board .view_full_image {cursor:pointer;}
|
||||
.board .btn-admin-manage-layer { display:none;border:1px solid #ddd;position:absolute;background-color:#fff;z-index:99999; }
|
||||
.board .btn-admin-manage-layer div.item { height:23px;border-bottom:1px solid #ddd; cursor:pointer;padding-left:2px;padding-right:10px; }
|
||||
.board .btn-admin-manage-layer div.item { font:normal 11px 'dotum';line-height:23px; }
|
||||
.board .btn-admin-manage-layer div.item i { width:20px;text-align:center; }
|
||||
|
||||
.board .autowrap { margin:0 auto 15px; }
|
||||
.board .autosize { position:relative; height: 0; padding-bottom: 56.25%; overflow: hidden; margin:0; }
|
||||
.board .autosize iframe, .autosize object, .autosize embed { position: absolute; top: 0; left: 0; width: 100%; height:100%; }
|
||||
|
||||
.board .searchbox {display:none;}
|
||||
.board .passcord { text-align: center;margin:10px auto 0 auto;}
|
||||
.board .passcord li{display:inline-block;margin-right:20px;vertical-align:middle;}
|
||||
|
||||
.board .copy_post_url {cursor:pointer;}
|
||||
|
||||
.lucky {font-size:11px;}
|
||||
.lucky .luckypoint{color:#E71A41;}
|
||||
|
||||
.gallery-box {float:left;}
|
||||
.chk_comment_all_wrapper {padding:10px;}
|
||||
.comment_write_box_inner {margin-top:20px; padding:20px;}
|
||||
.comment_write_button_area {margin-top:20px;overflow:hidden;}
|
||||
|
||||
.board .url-qrcode {position:relative;cursor:pointer;}
|
||||
.board .url-qrcode i {margin:3px 0 0 5px;}
|
||||
#qrcode-content {display:none;position:absolute;background-color:#FFF;border:2px solid #DDD;padding:10px;width:240px;}
|
||||
#qrcode-content .qrcode_code {border:5px solid #479BE3;float:left;}
|
||||
#qrcode-content .qrcode_code img {width:100px;height:100px;}
|
||||
#qrcode-content .qrcode_info {float:left;margin:0 0 0 10px;width:90px;font-size:12px;line-height:18px;color:#555;}
|
||||
292
views/board/bootstrap/gallerylist.php
Normal file
292
views/board/bootstrap/gallerylist.php
Normal file
@@ -0,0 +1,292 @@
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
|
||||
<?php echo element('headercontent', element('board', element('list', $view))); ?>
|
||||
|
||||
<div class="board">
|
||||
<h3><?php echo html_escape(element('board_name', element('board', element('list', $view)))); ?></h3>
|
||||
<div class="row mb20">
|
||||
<div class="col-xs-6 form-inline">
|
||||
<?php if ( ! element('access_list', element('board', element('list', $view))) && element('use_rss_feed', element('board', element('list', $view)))) { ?>
|
||||
<a href="<?php echo rss_url(element('brd_key', element('board', element('list', $view)))); ?>" class="btn btn-danger btn-sm" title="<?php echo html_escape(element('board_name', element('board', element('list', $view)))); ?> RSS 보기"><i class="fa fa-rss"></i></a>
|
||||
<?php } ?>
|
||||
<select class="form-control px150" onchange="location.href='<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?category_id=<?php echo html_escape($this->input->get('categroy_id')); ?>&findex=' + this.value;">
|
||||
<option value="">정렬하기</option>
|
||||
<option value="post_datetime desc" <?php echo $this->input->get('findex') === 'post_datetime desc' ? 'selected="selected"' : '';?>>날짜순</option>
|
||||
<option value="post_hit desc" <?php echo $this->input->get('findex') === 'post_hit desc' ? 'selected="selected"' : '';?>>조회수</option>
|
||||
<option value="post_comment_count desc" <?php echo $this->input->get('findex') === 'post_comment_count desc' ? 'selected="selected"' : '';?>>댓글수</option>
|
||||
<?php if (element('use_post_like', element('board', element('list', $view)))) { ?>
|
||||
<option value="post_like desc" <?php echo $this->input->get('findex') === 'post_like desc' ? 'selected="selected"' : '';?>>추천순</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php if (element('use_category', element('board', element('list', $view))) && ! element('cat_display_style', element('board', element('list', $view)))) { ?>
|
||||
<select class="form-control px150" onchange="location.href='<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=' + this.value;">
|
||||
<option value="">카테고리선택</option>
|
||||
<?php
|
||||
$category = element('category', element('board', element('list', $view)));
|
||||
function ca_select($p = '', $category = '', $category_id = '')
|
||||
{
|
||||
$return = '';
|
||||
if ($p && is_array($p)) {
|
||||
foreach ($p as $result) {
|
||||
$exp = explode('.', element('bca_key', $result));
|
||||
$len = (element(1, $exp)) ? strlen(element(1, $exp)) : 0;
|
||||
$space = str_repeat('-', $len);
|
||||
$return .= '<option value="' . html_escape(element('bca_key', $result)) . '"';
|
||||
if (element('bca_key', $result) === $category_id) {
|
||||
$return .= 'selected="selected"';
|
||||
}
|
||||
$return .= '>' . $space . html_escape(element('bca_value', $result)) . '</option>';
|
||||
$parent = element('bca_key', $result);
|
||||
$return .= ca_select(element($parent, $category), $category, $category_id);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
echo ca_select(element(0, $category), $category, $this->input->get('category_id'));
|
||||
?>
|
||||
</select>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class=" searchbox">
|
||||
<form class="navbar-form navbar-right pull-right" action="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>" onSubmit="return postSearch(this);">
|
||||
<input type="hidden" name="findex" value="<?php echo html_escape($this->input->get('findex')); ?>" />
|
||||
<input type="hidden" name="category_id" value="<?php echo html_escape($this->input->get('category_id')); ?>" />
|
||||
<div class="form-group">
|
||||
<select class="form-control pull-left px100" name="sfield">
|
||||
<option value="post_both" <?php echo ($this->input->get('sfield') === 'post_both') ? ' selected="selected" ' : ''; ?>>제목+내용</option>
|
||||
<option value="post_title" <?php echo ($this->input->get('sfield') === 'post_title') ? ' selected="selected" ' : ''; ?>>제목</option>
|
||||
<option value="post_content" <?php echo ($this->input->get('sfield') === 'post_content') ? ' selected="selected" ' : ''; ?>>내용</option>
|
||||
<option value="post_nickname" <?php echo ($this->input->get('sfield') === 'post_nickname') ? ' selected="selected" ' : ''; ?>>회원명</option>
|
||||
<option value="post_userid" <?php echo ($this->input->get('sfield') === 'post_userid') ? ' selected="selected" ' : ''; ?>>회원아이디</option>
|
||||
</select>
|
||||
<input type="text" class="form-control px150" placeholder="Search" name="skeyword" value="<?php echo html_escape($this->input->get('skeyword')); ?>" />
|
||||
<button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="searchbuttonbox">
|
||||
<button class="btn btn-primary btn-sm pull-right" type="button" onClick="toggleSearchbox();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
<?php if (element('point_info', element('list', $view))) { ?>
|
||||
<div class="point-info pull-right mr10">
|
||||
<button class="btn-point-info btn-link" data-toggle="popover" data-trigger="focus" data-placement="left" title="포인트안내" data-content="<?php echo element('point_info', element('list', $view)); ?>"
|
||||
><i class="fa fa-info-circle fa-lg"></i></button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function postSearch(f) {
|
||||
var skeyword = f.skeyword.value.replace(/(^\s*)|(\s*$)/g,'');
|
||||
if (skeyword.length < 2) {
|
||||
alert('2글자 이상으로 검색해 주세요');
|
||||
f.skeyword.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function toggleSearchbox() {
|
||||
$('.searchbox').show();
|
||||
$('.searchbuttonbox').hide();
|
||||
}
|
||||
<?php
|
||||
if ($this->input->get('skeyword')) {
|
||||
echo 'toggleSearchbox();';
|
||||
}
|
||||
?>
|
||||
$('.btn-point-info').popover({
|
||||
template: '<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',
|
||||
html : true
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (element('use_category', element('board', element('list', $view))) && element('cat_display_style', element('board', element('list', $view))) === 'tab') {
|
||||
$category = element('category', element('board', element('list', $view)));
|
||||
?>
|
||||
<ul class="nav nav-tabs clearfix">
|
||||
<li role="presentation" <?php if ( ! $this->input->get('category_id')) { ?>class="active" <?php } ?>><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=">전체</a></li>
|
||||
<?php
|
||||
if (element(0, $category)) {
|
||||
foreach (element(0, $category) as $ckey => $cval) {
|
||||
?>
|
||||
<li role="presentation" <?php if ($this->input->get('category_id') === element('bca_key', $cval)) { ?>class="active" <?php } ?>><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=<?php echo element('bca_key', $cval); ?>"><?php echo html_escape(element('bca_value', $cval)); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$attributes = array('name' => 'fboardlist', 'id' => 'fboardlist');
|
||||
echo form_open('', $attributes);
|
||||
?>
|
||||
<?php if (element('is_admin', $view)) { ?>
|
||||
<div><label for="all_boardlist_check"><input id="all_boardlist_check" onclick="if (this.checked) all_boardlist_checked(true); else all_boardlist_checked(false);" type="checkbox" /> 전체선택</label></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (element('notice_list', element('list', $view))) {
|
||||
?>
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<?php
|
||||
foreach (element('notice_list', element('list', $view)) as $result) {
|
||||
?>
|
||||
<tr>
|
||||
<?php if (element('is_admin', $view)) { ?><th scope="row"><input type="checkbox" name="chk_post_id[]" value="<?php echo element('post_id', $result); ?>" /></th><?php } ?>
|
||||
<td><span class="label label-primary">공지</span></td>
|
||||
<td>
|
||||
<?php if (element('post_reply', $result)) { ?><span class="label label-primary" style="margin-left:<?php echo strlen(element('post_reply', $result)) * 10; ?>px">Re</span><?php } ?>
|
||||
<a href="<?php echo element('post_url', $result); ?>" style="
|
||||
<?php
|
||||
if (element('title_color', $result)) {
|
||||
echo 'color:' . element('title_color', $result) . ';';
|
||||
}
|
||||
if (element('title_font', $result)) {
|
||||
echo 'font-family:' . element('title_font', $result) . ';';
|
||||
}
|
||||
if (element('title_bold', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
if (element('post_id', element('post', $view)) === element('post_id', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
?>
|
||||
" title="<?php echo html_escape(element('title', $result)); ?>"><?php echo html_escape(element('title', $result)); ?></a>
|
||||
<?php if (element('is_mobile', $result)) { ?><span class="fa fa-wifi"></span><?php } ?>
|
||||
<?php if (element('post_file', $result)) { ?><span class="fa fa-download"></span><?php } ?>
|
||||
<?php if (element('post_secret', $result)) { ?><span class="fa fa-lock"></span><?php } ?>
|
||||
<?php if (element('post_comment_count', $result)) { ?><span class="label label-warning">+<?php echo element('post_comment_count', $result); ?></span><?php } ?>
|
||||
<td><?php echo element('display_name', $result); ?></td>
|
||||
<td><?php echo element('display_datetime', $result); ?></td>
|
||||
<td><?php echo number_format(element('post_hit', $result)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="table-image">
|
||||
<?php
|
||||
$i = 0;
|
||||
$open = false;
|
||||
$cols = element('gallery_cols', element('board', element('list', $view)));
|
||||
if (element('list', element('data', element('list', $view)))) {
|
||||
foreach (element('list', element('data', element('list', $view))) as $result) {
|
||||
if ($cols && $i % $cols === 0) {
|
||||
echo '<div class="row">';
|
||||
$open = true;
|
||||
}
|
||||
$marginright = (($i+1)% $cols === 0) ? 0 : 2;
|
||||
?>
|
||||
<div class="gallery-box" style="width:<?php echo element('gallery_percent', element('board', element('list', $view))); ?>%;margin-right:<?php echo $marginright;?>%;">
|
||||
<?php if (element('is_admin', $view)) { ?><input type="checkbox" name="chk_post_id[]" value="<?php echo element('post_id', $result); ?>" /><?php } ?>
|
||||
<span class="label label-default"><?php echo element('num', $result); ?></span>
|
||||
<?php if (element('is_mobile', $result)) { ?><span class="fa fa-wifi"></span><?php } ?>
|
||||
<?php if (element('category', $result)) { ?><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?category_id=<?php echo html_escape(element('bca_key', element('category', $result))); ?>"><span class="label label-default"><?php echo html_escape(element('bca_value', element('category', $result))); ?></span></a><?php } ?>
|
||||
<div>
|
||||
<a href="<?php echo element('post_url', $result); ?>" title="<?php echo html_escape(element('title', $result)); ?>"><img src="<?php echo element('thumb_url', $result); ?>" alt="<?php echo html_escape(element('title', $result)); ?>" title="<?php echo html_escape(element('title', $result)); ?>" class="thumbnail img-responsive" style="width:<?php echo element('gallery_image_width', element('board', element('list', $view))); ?>px;height:<?php echo element('gallery_image_height', element('board', element('list', $view))); ?>px;" /></a>
|
||||
</div>
|
||||
<p>
|
||||
<?php if (element('post_reply', $result)) { ?><span class="label label-primary">Re</span><?php } ?>
|
||||
<a href="<?php echo element('post_url', $result); ?>" style="
|
||||
<?php
|
||||
if (element('title_color', $result)) {
|
||||
echo 'color:' . element('title_color', $result) . ';';
|
||||
}
|
||||
if (element('title_font', $result)) {
|
||||
echo 'font-family:' . element('title_font', $result) . ';';
|
||||
}
|
||||
if (element('title_bold', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
if (element('post_id', element('post', $view)) === element('post_id', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
?>
|
||||
" title="<?php echo html_escape(element('title', $result)); ?>"><?php echo html_escape(element('title', $result)); ?></a>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo element('display_name', $result); ?>
|
||||
<?php //echo element('display_datetime', $result); ?>
|
||||
<?php if (element('is_hot', $result)) { ?><span class="label label-danger">Hot</span><?php } ?>
|
||||
<?php if (element('is_new', $result)) { ?><span class="label label-warning">New</span><?php } ?>
|
||||
<?php if (element('post_secret', $result)) { ?><span class="fa fa-lock"></span><?php } ?>
|
||||
<?php if (element('post_comment_count', $result)) { ?><span class="comment-count"><i class="fa fa-comments"></i><?php echo element('post_comment_count', $result); ?></span><?php } ?>
|
||||
<span class="hit-count"><i class="fa fa-eye"></i> <?php echo number_format(element('post_hit', $result)); ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
if ($cols && $i > 0 && $i % $cols === 0 && $open) {
|
||||
echo '</div>';
|
||||
$open = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($open) {
|
||||
echo '</div>';
|
||||
$open = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
|
||||
<div class="border_button">
|
||||
<div class="pull-left mr10">
|
||||
<a href="<?php echo element('list_url', element('list', $view)); ?>" class="btn btn-default btn-sm">목록</a>
|
||||
<?php if (element('search_list_url', element('list', $view))) { ?>
|
||||
<a href="<?php echo element('search_list_url', element('list', $view)); ?>" class="btn btn-default btn-sm">검색목록</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (element('is_admin', $view)) { ?>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default btn-sm admin-manage-list"><i class="fa fa-cog big-fa"></i> 관리</button>
|
||||
<div class="btn-admin-manage-layer admin-manage-layer-list">
|
||||
<?php if (element('is_admin', $view) === 'super') { ?>
|
||||
<div class="item" onClick="document.location.href='<?php echo admin_url('board/boards/write/' . element('brd_id', element('board', element('list', $view)))); ?>';"><i class="fa fa-cog"></i> 게시판설정</div>
|
||||
<div class="item" onClick="post_multi_copy('copy');"><i class="fa fa-files-o"></i> 복사하기</div>
|
||||
<div class="item" onClick="post_multi_copy('move');"><i class="fa fa-arrow-right"></i> 이동하기</div>
|
||||
<div class="item" onClick="post_multi_change_category();"><i class="fa fa-tags"></i> 카테고리변경</div>
|
||||
<?php } ?>
|
||||
<div class="item" onClick="post_multi_action('multi_delete', '0', '선택하신 글들을 완전삭제하시겠습니까?');"><i class="fa fa-trash-o"></i> 선택삭제하기</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_secret', '0', '선택하신 글들을 비밀글을 해제하시겠습니까?');"><i class="fa fa-unlock"></i> 비밀글해제</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_secret', '1', '선택하신 글들을 비밀글로 설정하시겠습니까?');"><i class="fa fa-lock"></i> 비밀글로</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_notice', '0', '선택하신 글들을 공지를 내리시겠습니까?');"><i class="fa fa-bullhorn"></i> 공지내림</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_notice', '1', '선택하신 글들을 공지로 등록 하시겠습니까?');"><i class="fa fa-bullhorn"></i> 공지올림</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_blame_blind', '0', '선택하신 글들을 블라인드 해제 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드해제</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_blame_blind', '1', '선택하신 글들을 블라인드 처리 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드처리</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_trash', '', '선택하신 글들을 휴지통으로 이동하시겠습니까?');"><i class="fa fa-trash"></i> 휴지통으로</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (element('write_url', element('list', $view))) { ?>
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo element('write_url', element('list', $view)); ?>" class="btn btn-success btn-sm">글쓰기</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<nav><?php echo element('paging', element('list', $view)); ?></nav>
|
||||
</div>
|
||||
|
||||
<?php echo element('footercontent', element('board', element('list', $view))); ?>
|
||||
|
||||
<?php
|
||||
if (element('highlight_keyword', element('list', $view))) {
|
||||
$this->managelayout->add_js(base_url('assets/js/jquery.highlight.js')); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$('#fboardlist').highlight([<?php echo element('highlight_keyword', element('list', $view));?>]);
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
BIN
views/board/bootstrap/images/social_band.png
Normal file
BIN
views/board/bootstrap/images/social_band.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
views/board/bootstrap/images/social_facebook.png
Normal file
BIN
views/board/bootstrap/images/social_facebook.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
views/board/bootstrap/images/social_kakaostory.png
Normal file
BIN
views/board/bootstrap/images/social_kakaostory.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
BIN
views/board/bootstrap/images/social_kakaotalk.png
Normal file
BIN
views/board/bootstrap/images/social_kakaotalk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
views/board/bootstrap/images/social_twitter.png
Normal file
BIN
views/board/bootstrap/images/social_twitter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
274
views/board/bootstrap/list.php
Normal file
274
views/board/bootstrap/list.php
Normal file
@@ -0,0 +1,274 @@
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
|
||||
<?php echo element('headercontent', element('board', element('list', $view))); ?>
|
||||
|
||||
<div class="board">
|
||||
<h3><?php echo html_escape(element('board_name', element('board', element('list', $view)))); ?></h3>
|
||||
<div class="row mb20">
|
||||
<div class="col-xs-6 form-inline">
|
||||
<?php if ( ! element('access_list', element('board', element('list', $view))) && element('use_rss_feed', element('board', element('list', $view)))) { ?>
|
||||
<a href="<?php echo rss_url(element('brd_key', element('board', element('list', $view)))); ?>" class="btn btn-danger btn-sm" title="<?php echo html_escape(element('board_name', element('board', element('list', $view)))); ?> RSS 보기"><i class="fa fa-rss"></i></a>
|
||||
<?php } ?>
|
||||
<select class="form-control px150" onchange="location.href='<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?category_id=<?php echo html_escape($this->input->get('categroy_id')); ?>&findex=' + this.value;">
|
||||
<option value="">정렬하기</option>
|
||||
<option value="post_datetime desc" <?php echo $this->input->get('findex') === 'post_datetime desc' ? 'selected="selected"' : '';?>>날짜순</option>
|
||||
<option value="post_hit desc" <?php echo $this->input->get('findex') === 'post_hit desc' ? 'selected="selected"' : '';?>>조회수</option>
|
||||
<option value="post_comment_count desc" <?php echo $this->input->get('findex') === 'post_comment_count desc' ? 'selected="selected"' : '';?>>댓글수</option>
|
||||
<?php if (element('use_post_like', element('board', element('list', $view)))) { ?>
|
||||
<option value="post_like desc" <?php echo $this->input->get('findex') === 'post_like desc' ? 'selected="selected"' : '';?>>추천순</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php if (element('use_category', element('board', element('list', $view))) && ! element('cat_display_style', element('board', element('list', $view)))) { ?>
|
||||
<select class="form-control px150" onchange="location.href='<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=' + this.value;">
|
||||
<option value="">카테고리선택</option>
|
||||
<?php
|
||||
$category = element('category', element('board', element('list', $view)));
|
||||
function ca_select($p = '', $category = '', $category_id = '')
|
||||
{
|
||||
$return = '';
|
||||
if ($p && is_array($p)) {
|
||||
foreach ($p as $result) {
|
||||
$exp = explode('.', element('bca_key', $result));
|
||||
$len = (element(1, $exp)) ? strlen(element(1, $exp)) : 0;
|
||||
$space = str_repeat('-', $len);
|
||||
$return .= '<option value="' . html_escape(element('bca_key', $result)) . '"';
|
||||
if (element('bca_key', $result) === $category_id) {
|
||||
$return .= 'selected="selected"';
|
||||
}
|
||||
$return .= '>' . $space . html_escape(element('bca_value', $result)) . '</option>';
|
||||
$parent = element('bca_key', $result);
|
||||
$return .= ca_select(element($parent, $category), $category, $category_id);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
echo ca_select(element(0, $category), $category, $this->input->get('category_id'));
|
||||
?>
|
||||
</select>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class=" searchbox">
|
||||
<form class="navbar-form navbar-right pull-right" action="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>" onSubmit="return postSearch(this);">
|
||||
<input type="hidden" name="findex" value="<?php echo html_escape($this->input->get('findex')); ?>" />
|
||||
<input type="hidden" name="category_id" value="<?php echo html_escape($this->input->get('category_id')); ?>" />
|
||||
<div class="form-group">
|
||||
<select class="form-control pull-left px100" name="sfield">
|
||||
<option value="post_both" <?php echo ($this->input->get('sfield') === 'post_both') ? ' selected="selected" ' : ''; ?>>제목+내용</option>
|
||||
<option value="post_title" <?php echo ($this->input->get('sfield') === 'post_title') ? ' selected="selected" ' : ''; ?>>제목</option>
|
||||
<option value="post_content" <?php echo ($this->input->get('sfield') === 'post_content') ? ' selected="selected" ' : ''; ?>>내용</option>
|
||||
<option value="post_nickname" <?php echo ($this->input->get('sfield') === 'post_nickname') ? ' selected="selected" ' : ''; ?>>회원명</option>
|
||||
<option value="post_userid" <?php echo ($this->input->get('sfield') === 'post_userid') ? ' selected="selected" ' : ''; ?>>회원아이디</option>
|
||||
</select>
|
||||
<input type="text" class="form-control px150" placeholder="Search" name="skeyword" value="<?php echo html_escape($this->input->get('skeyword')); ?>" />
|
||||
<button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="searchbuttonbox">
|
||||
<button class="btn btn-primary btn-sm pull-right" type="button" onClick="toggleSearchbox();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
<?php if (element('point_info', element('list', $view))) { ?>
|
||||
<div class="point-info pull-right mr10">
|
||||
<button class="btn-point-info btn-link" data-toggle="popover" data-trigger="focus" data-placement="left" title="포인트안내" data-content="<?php echo element('point_info', element('list', $view)); ?>"
|
||||
><i class="fa fa-info-circle fa-lg"></i></button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function postSearch(f) {
|
||||
var skeyword = f.skeyword.value.replace(/(^\s*)|(\s*$)/g,'');
|
||||
if (skeyword.length < 2) {
|
||||
alert('2글자 이상으로 검색해 주세요');
|
||||
f.skeyword.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function toggleSearchbox() {
|
||||
$('.searchbox').show();
|
||||
$('.searchbuttonbox').hide();
|
||||
}
|
||||
<?php
|
||||
if ($this->input->get('skeyword')) {
|
||||
echo 'toggleSearchbox();';
|
||||
}
|
||||
?>
|
||||
$('.btn-point-info').popover({
|
||||
template: '<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',
|
||||
html : true
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (element('use_category', element('board', element('list', $view))) && element('cat_display_style', element('board', element('list', $view))) === 'tab') {
|
||||
$category = element('category', element('board', element('list', $view)));
|
||||
?>
|
||||
<ul class="nav nav-tabs clearfix">
|
||||
<li role="presentation" <?php if ( ! $this->input->get('category_id')) { ?>class="active" <?php } ?>><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=">전체</a></li>
|
||||
<?php
|
||||
if (element(0, $category)) {
|
||||
foreach (element(0, $category) as $ckey => $cval) {
|
||||
?>
|
||||
<li role="presentation" <?php if ($this->input->get('category_id') === element('bca_key', $cval)) { ?>class="active" <?php } ?>><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?findex=<?php echo html_escape($this->input->get('findex')); ?>&category_id=<?php echo element('bca_key', $cval); ?>"><?php echo html_escape(element('bca_value', $cval)); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$attributes = array('name' => 'fboardlist', 'id' => 'fboardlist');
|
||||
echo form_open('', $attributes);
|
||||
?>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if (element('is_admin', $view)) { ?><th><input onclick="if (this.checked) all_boardlist_checked(true); else all_boardlist_checked(false);" type="checkbox" /></th><?php } ?>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>글쓴이</th>
|
||||
<th>날짜</th>
|
||||
<th>조회수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (element('notice_list', element('list', $view))) {
|
||||
foreach (element('notice_list', element('list', $view)) as $result) {
|
||||
?>
|
||||
<tr>
|
||||
<?php if (element('is_admin', $view)) { ?><th scope="row"><input type="checkbox" name="chk_post_id[]" value="<?php echo element('post_id', $result); ?>" /></th><?php } ?>
|
||||
<td><span class="label label-primary">공지</span></td>
|
||||
<td>
|
||||
<?php if (element('post_reply', $result)) { ?><span class="label label-primary" style="margin-left:<?php echo strlen(element('post_reply', $result)) * 10; ?>px">Re</span><?php } ?>
|
||||
<a href="<?php echo element('post_url', $result); ?>" style="
|
||||
<?php
|
||||
if (element('title_color', $result)) {
|
||||
echo 'color:' . element('title_color', $result) . ';';
|
||||
}
|
||||
if (element('title_font', $result)) {
|
||||
echo 'font-family:' . element('title_font', $result) . ';';
|
||||
}
|
||||
if (element('title_bold', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
if (element('post_id', element('post', $view)) === element('post_id', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
?>
|
||||
" title="<?php echo html_escape(element('title', $result)); ?>"><?php echo html_escape(element('title', $result)); ?></a>
|
||||
<?php if (element('is_mobile', $result)) { ?><span class="fa fa-wifi"></span><?php } ?>
|
||||
<?php if (element('post_file', $result)) { ?><span class="fa fa-download"></span><?php } ?>
|
||||
<?php if (element('post_secret', $result)) { ?><span class="fa fa-lock"></span><?php } ?>
|
||||
<?php if (element('post_comment_count', $result)) { ?><span class="label label-warning">+<?php echo element('post_comment_count', $result); ?></span><?php } ?>
|
||||
<td><?php echo element('display_name', $result); ?></td>
|
||||
<td><?php echo element('display_datetime', $result); ?></td>
|
||||
<td><?php echo number_format(element('post_hit', $result)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('list', element('data', element('list', $view)))) {
|
||||
foreach (element('list', element('data', element('list', $view))) as $result) {
|
||||
?>
|
||||
<tr>
|
||||
<?php if (element('is_admin', $view)) { ?><th scope="row"><input type="checkbox" name="chk_post_id[]" value="<?php echo element('post_id', $result); ?>" /></th><?php } ?>
|
||||
<td><?php echo element('num', $result); ?></td>
|
||||
<td>
|
||||
<?php if (element('category', $result)) { ?><a href="<?php echo board_url(element('brd_key', element('board', element('list', $view)))); ?>?category_id=<?php echo html_escape(element('bca_key', element('category', $result))); ?>"><span class="label label-default"><?php echo html_escape(element('bca_value', element('category', $result))); ?></span></a><?php } ?>
|
||||
<?php if (element('post_reply', $result)) { ?><span class="label label-primary" style="margin-left:<?php echo strlen(element('post_reply', $result)) * 10; ?>px">Re</span><?php } ?>
|
||||
<a href="<?php echo element('post_url', $result); ?>" style="
|
||||
<?php
|
||||
if (element('title_color', $result)) {
|
||||
echo 'color:' . element('title_color', $result) . ';';
|
||||
}
|
||||
if (element('title_font', $result)) {
|
||||
echo 'font-family:' . element('title_font', $result) . ';';
|
||||
}
|
||||
if (element('title_bold', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
if (element('post_id', element('post', $view)) === element('post_id', $result)) {
|
||||
echo 'font-weight:bold;';
|
||||
}
|
||||
?>
|
||||
" title="<?php echo html_escape(element('title', $result)); ?>"><?php echo html_escape(element('title', $result)); ?></a>
|
||||
<?php if (element('is_mobile', $result)) { ?><span class="fa fa-wifi"></span><?php } ?>
|
||||
<?php if (element('post_file', $result)) { ?><span class="fa fa-download"></span><?php } ?>
|
||||
<?php if (element('post_secret', $result)) { ?><span class="fa fa-lock"></span><?php } ?>
|
||||
<?php if (element('is_hot', $result)) { ?><span class="label label-danger">Hot</span><?php } ?>
|
||||
<?php if (element('is_new', $result)) { ?><span class="label label-warning">New</span><?php } ?>
|
||||
<?php if (element('post_comment_count', $result)) { ?><span class="label label-warning">+<?php echo element('post_comment_count', $result); ?></span><?php } ?>
|
||||
<td><?php echo element('display_name', $result); ?></td>
|
||||
<td><?php echo element('display_datetime', $result); ?></td>
|
||||
<td><?php echo number_format(element('post_hit', $result)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ( ! element('notice_list', element('list', $view)) && ! element('list', element('data', element('list', $view)))) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="6" class="nopost">게시물이 없습니다</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo form_close(); ?>
|
||||
|
||||
<div class="border_button">
|
||||
<div class="pull-left mr10">
|
||||
<a href="<?php echo element('list_url', element('list', $view)); ?>" class="btn btn-default btn-sm">목록</a>
|
||||
<?php if (element('search_list_url', element('list', $view))) { ?>
|
||||
<a href="<?php echo element('search_list_url', element('list', $view)); ?>" class="btn btn-default btn-sm">검색목록</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (element('is_admin', $view)) { ?>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default btn-sm admin-manage-list"><i class="fa fa-cog big-fa"></i> 관리</button>
|
||||
<div class="btn-admin-manage-layer admin-manage-layer-list">
|
||||
<?php if (element('is_admin', $view) === 'super') { ?>
|
||||
<div class="item" onClick="document.location.href='<?php echo admin_url('board/boards/write/' . element('brd_id', element('board', element('list', $view)))); ?>';"><i class="fa fa-cog"></i> 게시판설정</div>
|
||||
<div class="item" onClick="post_multi_copy('copy');"><i class="fa fa-files-o"></i> 복사하기</div>
|
||||
<div class="item" onClick="post_multi_copy('move');"><i class="fa fa-arrow-right"></i> 이동하기</div>
|
||||
<div class="item" onClick="post_multi_change_category();"><i class="fa fa-tags"></i> 카테고리변경</div>
|
||||
<?php } ?>
|
||||
<div class="item" onClick="post_multi_action('multi_delete', '0', '선택하신 글들을 완전삭제하시겠습니까?');"><i class="fa fa-trash-o"></i> 선택삭제하기</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_secret', '0', '선택하신 글들을 비밀글을 해제하시겠습니까?');"><i class="fa fa-unlock"></i> 비밀글해제</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_secret', '1', '선택하신 글들을 비밀글로 설정하시겠습니까?');"><i class="fa fa-lock"></i> 비밀글로</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_notice', '0', '선택하신 글들을 공지를 내리시겠습니까?');"><i class="fa fa-bullhorn"></i> 공지내림</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_notice', '1', '선택하신 글들을 공지로 등록 하시겠습니까?');"><i class="fa fa-bullhorn"></i> 공지올림</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_blame_blind', '0', '선택하신 글들을 블라인드 해제 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드해제</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_blame_blind', '1', '선택하신 글들을 블라인드 처리 하시겠습니까?');"><i class="fa fa-exclamation-circle"></i> 블라인드처리</div>
|
||||
<div class="item" onClick="post_multi_action('post_multi_trash', '', '선택하신 글들을 휴지통으로 이동하시겠습니까?');"><i class="fa fa-trash"></i> 휴지통으로</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (element('write_url', element('list', $view))) { ?>
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo element('write_url', element('list', $view)); ?>" class="btn btn-success btn-sm">글쓰기</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<nav><?php echo element('paging', element('list', $view)); ?></nav>
|
||||
</div>
|
||||
|
||||
<?php echo element('footercontent', element('board', element('list', $view))); ?>
|
||||
|
||||
<?php
|
||||
if (element('highlight_keyword', element('list', $view))) {
|
||||
$this->managelayout->add_js(base_url('assets/js/jquery.highlight.js')); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$('#fboardlist').highlight([<?php echo element('highlight_keyword', element('list', $view));?>]);
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
38
views/board/bootstrap/password.php
Normal file
38
views/board/bootstrap/password.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
|
||||
<div class="board">
|
||||
<div class="page-header">
|
||||
<h4>비밀번호 입력</h4>
|
||||
</div>
|
||||
<div class="form-horizontal mt20">
|
||||
<?php
|
||||
echo validation_errors('<div class="alert alert-warning" role="alert">', '</div>');
|
||||
echo show_alert_message(element('message', $view), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
echo show_alert_message($this->session->flashdata('message'), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
$attributes = array('class' => 'form-horizontal', 'name' => 'fpassword', 'id' => 'fpassword');
|
||||
echo form_open(current_url(), $attributes);
|
||||
?>
|
||||
<div class="alert alert-dismissible alert-info infoalert"><?php echo element('info', $view); ?></div>
|
||||
<div class="form-group">
|
||||
<label for="cur_password" class="col-sm-3 control-label">비밀번호</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="password" class="form-control" id="modify_password" name="modify_password" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" class="btn btn-success btn-sm">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fpassword').validate({
|
||||
rules: {
|
||||
modify_password : { required:true }
|
||||
}
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
287
views/board/bootstrap/post.php
Normal file
287
views/board/bootstrap/post.php
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
<?php $this->managelayout->add_js(base_url('plugin/zeroclipboard/ZeroClipboard.js')); ?>
|
||||
|
||||
<?php
|
||||
if (element('syntax_highlighter', element('board', $view)) OR element('comment_syntax_highlighter', element('board', $view))) {
|
||||
$this->managelayout->add_css(base_url('assets/js/syntaxhighlighter/styles/shCore.css'));
|
||||
$this->managelayout->add_css(base_url('assets/js/syntaxhighlighter/styles/shThemeMidnight.css'));
|
||||
$this->managelayout->add_js(base_url('assets/js/syntaxhighlighter/scripts/shCore.js'));
|
||||
$this->managelayout->add_js(base_url('assets/js/syntaxhighlighter/scripts/shBrushJScript.js'));
|
||||
$this->managelayout->add_js(base_url('assets/js/syntaxhighlighter/scripts/shBrushPhp.js'));
|
||||
$this->managelayout->add_js(base_url('assets/js/syntaxhighlighter/scripts/shBrushCss.js'));
|
||||
$this->managelayout->add_js(base_url('assets/js/syntaxhighlighter/scripts/shBrushXml.js'));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
SyntaxHighlighter.config.clipboardSwf = '<?php echo base_url('assets/js/syntaxhighlighter/scripts/clipboard.swf'); ?>';
|
||||
var is_SyntaxHighlighter = true;
|
||||
SyntaxHighlighter.all();
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo element('headercontent', element('board', $view)); ?>
|
||||
|
||||
<div class="board">
|
||||
<?php echo show_alert_message($this->session->flashdata('message'), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>'); ?>
|
||||
<h3>
|
||||
<?php if (element('category', element('post', $view))) { ?>[<?php echo html_escape(element('bca_value', element('category', element('post', $view)))); ?>] <?php } ?>
|
||||
<?php echo html_escape(element('post_title', element('post', $view))); ?>
|
||||
</h3>
|
||||
<ul class="info">
|
||||
<li><?php echo element('display_name', element('post', $view)); ?></li>
|
||||
<li><i class="fa fa-comments"></i> <?php echo number_format(element('post_comment_count', element('post', $view))); ?></li>
|
||||
<li><i class="fa fa-eye"></i> <?php echo number_format(element('post_hit', element('post', $view))); ?></li>
|
||||
<?php if (element('use_post_like', element('board', $view))) { ?>
|
||||
<li><i class="fa fa-thumbs-up"></i> <span class="post-like"><?php echo number_format(element('post_like', element('post', $view))); ?></span></li>
|
||||
<?php } ?>
|
||||
<?php if (element('use_post_dislike', element('board', $view))) { ?>
|
||||
<li><i class="fa fa-thumbs-down"></i> <span class="post-dislike"><?php echo number_format(element('post_dislike', element('post', $view))); ?></span></li>
|
||||
<?php } ?>
|
||||
<?php if (element('use_print', element('board', $view))) { ?>
|
||||
<li><a href="javascript:;" id="btn-print" onClick="post_print('<?php echo element('post_id', element('post', $view)); ?>', 'post-print');" title="이 글을 프린트하기"><i class="fa fa-print"></i> <span class="post-print">Print</span></a></li>
|
||||
<?php } ?>
|
||||
<li class="copy_post_url" data-clipboard-text="<?php echo element('short_url', $view); ?>"><span><i class="fa fa-link"></i> 글주소</span></li>
|
||||
<?php if (element('show_url_qrcode', element('board', $view))) { ?>
|
||||
<li class="url-qrcode" data-qrcode-url="<?php echo urlencode(element('short_url', $view)); ?>"><i class="fa fa-qrcode"></i></li>
|
||||
<?php } ?>
|
||||
<li class="pull-right time"><i class="fa fa-clock-o"></i> <?php echo element('display_datetime', element('post', $view)); ?></li>
|
||||
<?php if (element('display_ip', element('post', $view))) { ?>
|
||||
<li class="pull-right time"><i class="fa fa-map-marker"></i> <?php echo element('display_ip', element('post', $view)); ?></li>
|
||||
<?php } ?>
|
||||
<?php if (element('is_mobile', element('post', $view))) { ?>
|
||||
<li class="pull-right time"><i class="fa fa-wifi"></i></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php if (element('link_count', $view) > 0 OR element('file_download_count', $view) > 0) { ?>
|
||||
<ul class="list-group">
|
||||
<?php if (element('file_download_count', $view) > 0) { ?>
|
||||
<li class="list-group-item list-group-item-info">Download</li>
|
||||
<?php foreach (element('file_download', $view) as $key => $value) { ?>
|
||||
<li class="list-group-item"><i class="fa fa-download"></i> <a href="javascript:file_download('<?php echo element('download_link', $value); ?>')"><?php echo html_escape(element('pfi_originname', $value)); ?>(<?php echo byte_format(element('pfi_filesize', $value)); ?>)</a> <span class="time"><i class="fa fa-clock-o"></i> <?php echo display_datetime(element('pfi_datetime', $value), 'full'); ?></span><span class="badge"><?php echo number_format(element('pfi_download', $value)); ?></span></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('link_count', $view) > 0) { ?>
|
||||
<li class="list-group-item list-group-item-info">Link</li>
|
||||
<?php
|
||||
foreach (element('link', $view) as $key => $value) {
|
||||
?>
|
||||
<li class="list-group-item"><i class="fa fa-link"></i> <a href="<?php echo element('link_link', $value); ?>" target="_blank"><?php echo html_escape(element('pln_url', $value)); ?></a><span class="badge"><?php echo number_format(element('pln_hit', $value)); ?></span>
|
||||
<?php if (element('show_url_qrcode', element('board', $view))) { ?>
|
||||
<span class="url-qrcode" data-qrcode-url="<?php echo urlencode(element('pln_url', $value)); ?>"><i class="fa fa-qrcode"></i></span>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function file_download(link) {
|
||||
<?php if (element('point_filedownload', element('board', $view)) < 0) { ?>if ( ! confirm("파일을 다운로드 하시면 포인트가 차감(<?php echo number_format(element('point_filedownload', element('board', $view))); ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?")) { return; }<?php }?>
|
||||
document.location.href = link;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<?php if (element('extra_content', $view)) { ?>
|
||||
<ul class="list-group">
|
||||
<?php foreach (element('extra_content', $view) as $key => $value) { ?>
|
||||
<li class="list-group-item">
|
||||
<div class="col-sm-2"> <strong><?php echo html_escape(element('display_name', $value)); ?></strong></div>
|
||||
<div class="list-group-item-text" style="min-height:20px;"><?php echo nl2br(html_escape(element('output', $value))); ?></div></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<div class="contents-view">
|
||||
<div class="contents-view-img">
|
||||
<?php
|
||||
if (element('file_image', $view)) {
|
||||
foreach (element('file_image', $view) as $key => $value) {
|
||||
?>
|
||||
<img src="<?php echo element('thumb_image_url', $value); ?>" alt="<?php echo html_escape(element('pfi_originname', $value)); ?>" title="<?php echo html_escape(element('pfi_originname', $value)); ?>" class="view_full_image" data-origin-image-url="<?php echo element('origin_image_url', $value); ?>" style="max-width:100%;" />
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- 본문 내용 시작 -->
|
||||
<div id="post-content"><?php echo element('content', element('post', $view)); ?></div>
|
||||
<!-- 본문 내용 끝 -->
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( ! element('post_del', element('post', $view)) && (element('use_post_like', element('board', $view)) OR element('use_post_dislike', element('board', $view)))) { ?>
|
||||
<div class="recommand">
|
||||
<?php if (element('use_post_like', element('board', $view))) { ?>
|
||||
<a class="good" href="javascript:;" id="btn-post-like" onClick="post_like('<?php echo element('post_id', element('post', $view)); ?>', '1', 'post-like');" title="추천하기"><span class="post-like"><?php echo number_format(element('post_like', element('post', $view))); ?></span><br /><i class="fa fa-thumbs-o-up fa-lg"></i></a>
|
||||
<?php } ?>
|
||||
<?php if (element('use_post_dislike', element('board', $view))) { ?>
|
||||
<a class="bad" href="javascript:;" id="btn-post-dislike" onClick="post_like('<?php echo element('post_id', element('post', $view)); ?>', '2', 'post-dislike');" title="비추하기"><span class="post-dislike"><?php echo number_format(element('post_dislike', element('post', $view))); ?></span><br /><i class="fa fa-thumbs-o-down fa-lg"></i></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="pull-right mb20">
|
||||
<?php if ( ! element('post_del', element('post', $view)) && element('use_scrap', element('board', $view))) { ?>
|
||||
<button type="button" class="btn btn-black btn-sm" id="btn-scrap" onClick="post_scrap('<?php echo element('post_id', element('post', $view)); ?>', 'post-scrap');">스크랩 <span class="post-scrap"><?php echo element('scrap_count', element('post', $view)) ? '+' . number_format(element('scrap_count', element('post', $view))) : ''; ?></span></button>
|
||||
<?php } ?>
|
||||
<?php if ( ! element('post_del', element('post', $view)) && element('use_blame', element('board', $view)) && ( ! element('blame_blind_count', element('board', $view)) OR element('post_blame', element('post', $view)) < element('blame_blind_count', element('board', $view)))) { ?>
|
||||
<button type="button" class="btn btn-black btn-sm" id="btn-blame" onClick="post_blame('<?php echo element('post_id', element('post', $view)); ?>', 'post-blame');">신고 <span class="post-blame"><?php echo element('post_blame', element('post', $view)) ? '+' . number_format(element('post_blame', element('post', $view))) : ''; ?></span></button>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( ! element('post_del', element('post', $view)) && element('is_admin', $view)) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm admin-manage-post"><i class="fa fa-cog big-fa"></i> 관리</button>
|
||||
<div class="btn-admin-manage-layer admin-manage-post-layer">
|
||||
<?php if (element('is_admin', $view) === 'super') { ?>
|
||||
<div class="item" onClick="post_copy('copy', '<?php echo element('post_id', element('post', $view)); ?>');"><i class="fa fa-files-o"></i> 복사하기</div>
|
||||
<div class="item" onClick="post_copy('move', '<?php echo element('post_id', element('post', $view)); ?>');"><i class="fa fa-arrow-right"></i> 이동하기</div>
|
||||
<?php if (element('use_category', element('board', $view))) { ?>
|
||||
<div class="item" onClick="post_change_category('<?php echo element('post_id', element('post', $view)); ?>');"><i class="fa fa-tags"></i> 카테고리변경</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('use_post_secret', element('board', $view))) {
|
||||
if (element('post_secret', element('post', $view))) {
|
||||
?>
|
||||
<div class="item" onClick="post_action('post_secret', '<?php echo element('post_id', element('post', $view)); ?>', '0');"><i class="fa fa-unlock"></i> 비밀글해제</div>
|
||||
<?php } else { ?>
|
||||
<div class="item" onClick="post_action('post_secret', '<?php echo element('post_id', element('post', $view)); ?>', '1');"><i class="fa fa-lock"></i> 비밀글로</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('post_hide_comment', element('post', $view))) {
|
||||
?>
|
||||
<div class="item" onClick="post_action('post_hide_comment', '<?php echo element('post_id', element('post', $view)); ?>', '0');"><i class="fa fa-comments"></i> 댓글감춤해제</div>
|
||||
<?php } else { ?>
|
||||
<div class="item" onClick="post_action('post_hide_comment', '<?php echo element('post_id', element('post', $view)); ?>', '1');"><i class="fa fa-comments"></i> 댓글감춤</div>
|
||||
<?php } ?>
|
||||
<?php if (element('post_notice', element('post', $view))) { ?>
|
||||
<div class="item" onClick="post_action('post_notice', '<?php echo element('post_id', element('post', $view)); ?>', '0');"><i class="fa fa-bullhorn"></i> 공지내림</div>
|
||||
<?php } else { ?>
|
||||
<div class="item" onClick="post_action('post_notice', '<?php echo element('post_id', element('post', $view)); ?>', '1');"><i class="fa fa-bullhorn"></i> 공지올림</div>
|
||||
<?php } ?>
|
||||
<?php if (element('post_blame', element('post', $view)) >= element('blame_blind_count', element('board', $view))) { ?>
|
||||
<div class="item" onClick="post_action('post_blame_blind', '<?php echo element('post_id', element('post', $view)); ?>', '0');"><i class="fa fa-exclamation-circle"></i> 블라인드해제</div>
|
||||
<?php } else { ?>
|
||||
<div class="item" onClick="post_action('post_blame_blind', '<?php echo element('post_id', element('post', $view)); ?>', '1');"><i class="fa fa-exclamation-circle"></i> 블라인드처리</div>
|
||||
<?php } ?>
|
||||
<?php if (element('use_posthistory', element('board', $view))) { ?>
|
||||
<div class="item" onClick="post_history('<?php echo element('post_id', element('post', $view)); ?>');" ><i class="fa fa-history"></i> 글변경로그</div>
|
||||
<?php } ?>
|
||||
<?php if (element('use_download_log', element('board', $view))) { ?>
|
||||
<div class="item" onClick="download_log('<?php echo element('post_id', element('post', $view)); ?>');" ><i class="fa fa-download"></i> 다운로드로그</div>
|
||||
<?php } ?>
|
||||
<?php if (element('use_link_click_log', element('board', $view))) { ?>
|
||||
<div class="item" onClick="link_click_log('<?php echo element('post_id', element('post', $view)); ?>');"><i class="fa fa-link"></i> 링크클릭로그</div>
|
||||
<?php } ?>
|
||||
<div class="item" onClick="post_action('post_trash', '<?php echo element('post_id', element('post', $view)); ?>', '', '이 글을 휴지통으로 이동하시겠습니까?');"><i class="fa fa-trash"></i> 휴지통으로</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (element('use_sns_button', $view)) {
|
||||
$this->managelayout->add_js(base_url('assets/js/sns.js'));
|
||||
if ($this->cbconfig->item('kakao_apikey')) {
|
||||
$this->managelayout->add_js('https://developers.kakao.com/sdk/js/kakao.min.js');
|
||||
?>
|
||||
<script type="text/javascript">Kakao.init('<?php echo $this->cbconfig->item('kakao_apikey'); ?>');</script>
|
||||
<?php } ?>
|
||||
<div class="sns_button">
|
||||
<a href="javascript:;" onClick="sendSns('facebook', '<?php echo element('short_url', $view); ?>', '<?php echo html_escape(element('post_title', element('post', $view)));?>');" title="이 글을 페이스북으로 퍼가기"><img src="<?php echo element('view_skin_url', $layout); ?>/images/social_facebook.png" width="22" height="22" alt="이 글을 페이스북으로 퍼가기" title="이 글을 페이스북으로 퍼가기" /></a>
|
||||
<a href="javascript:;" onClick="sendSns('twitter', '<?php echo element('short_url', $view); ?>', '<?php echo html_escape(element('post_title', element('post', $view)));?>');" title="이 글을 트위터로 퍼가기"><img src="<?php echo element('view_skin_url', $layout); ?>/images/social_twitter.png" width="22" height="22" alt="이 글을 트위터로 퍼가기" title="이 글을 트위터로 퍼가기" /></a>
|
||||
<?php if ($this->cbconfig->item('kakao_apikey')) { ?>
|
||||
<a href="javascript:;" onClick="kakaolink_send('<?php echo html_escape(element('post_title', element('post', $view)));?>', '<?php echo element('short_url', $view); ?>');" title="이 글을 카카오톡으로 퍼가기"><img src="<?php echo element('view_skin_url', $layout); ?>/images/social_kakaotalk.png" width="22" height="22" alt="이 글을 카카오톡으로 퍼가기" title="이 글을 카카오톡으로 퍼가기" /></a>
|
||||
<?php } ?>
|
||||
<a href="javascript:;" onClick="sendSns('kakaostory', '<?php echo element('short_url', $view); ?>', '<?php echo html_escape(element('post_title', element('post', $view)));?>');" title="이 글을 카카오스토리로 퍼가기"><img src="<?php echo element('view_skin_url', $layout); ?>/images/social_kakaostory.png" width="22" height="22" alt="이 글을 카카오스토리로 퍼가기" title="이 글을 카카오스토리로 퍼가기" /></a>
|
||||
<a href="javascript:;" onClick="sendSns('band', '<?php echo element('short_url', $view); ?>', '<?php echo html_escape(element('post_title', element('post', $view)));?>');" title="이 글을 밴드로 퍼가기"><img src="<?php echo element('view_skin_url', $layout); ?>/images/social_band.png" width="22" height="22" alt="이 글을 밴드로 퍼가기" title="이 글을 밴드로 퍼가기" /></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<?php if (element('tag', element('post', $view))) { ?>
|
||||
<div class="tags mt20">
|
||||
<i class="fa fa-tags"></i>
|
||||
<?php
|
||||
foreach (element('tag', element('post', $view)) as $key => $value) {
|
||||
?>
|
||||
<a href="<?php echo site_url('tags/?tag=' . html_escape(element('pta_tag', $value))); ?>" title="<?php echo html_escape(element('pta_tag', $value)); ?> 태그 목록"><?php echo html_escape(element('pta_tag', $value)); ?></a>,
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( ! element('post_hide_comment', element('post', $view))) {
|
||||
?>
|
||||
<div id="viewcomment"></div>
|
||||
<?php
|
||||
$this->load->view(element('view_skin_path', $layout) . '/comment_write');
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="border_button mt20 mb20">
|
||||
<div class="btn-group pull-left" role="group" aria-label="...">
|
||||
<?php if (element('modify_url', $view)) { ?>
|
||||
<a href="<?php echo element('modify_url', $view); ?>" class="btn btn-default btn-sm">수정</a>
|
||||
<?php } ?>
|
||||
<?php if (element('delete_url', $view)) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm btn-one-delete" data-one-delete-url="<?php echo element('delete_url', $view); ?>">삭제</button>
|
||||
<?php } ?>
|
||||
<a href="<?php echo element('list_url', $view); ?>" class="btn btn-default btn-sm">목록</a>
|
||||
<?php if (element('search_list_url', $view)) { ?>
|
||||
<a href="<?php echo element('search_list_url', $view); ?>" class="btn btn-default btn-sm">검색목록</a>
|
||||
<?php } ?>
|
||||
<?php if (element('reply_url', $view)) { ?>
|
||||
<a href="<?php echo element('reply_url', $view); ?>" class="btn btn-default btn-sm">답변</a>
|
||||
<?php } ?>
|
||||
<?php if (element('prev_post', $view)) { ?>
|
||||
<a href="<?php echo element('url', element('prev_post', $view)); ?>" class="btn btn-default btn-sm">이전글</a>
|
||||
<?php } ?>
|
||||
<?php if (element('next_post', $view)) { ?>
|
||||
<a href="<?php echo element('url', element('next_post', $view)); ?>" class="btn btn-default btn-sm">다음글</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (element('write_url', $view)) { ?>
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo element('write_url', $view); ?>" class="btn btn-success btn-sm">글쓰기</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo element('footercontent', element('board', $view)); ?>
|
||||
|
||||
<?php if (element('target_blank', element('board', $view))) { ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
$("#post-content a[href^='http']").attr('target', '_blank');
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var client = new ZeroClipboard($('.copy_post_url'));
|
||||
client.on('ready', function( readyEvent ) {
|
||||
client.on('aftercopy', function( event ) {
|
||||
alert('게시글 주소가 복사되었습니다. \'Ctrl+V\'를 눌러 붙여넣기 해주세요.');
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
if (element('highlight_keyword', $view)) {
|
||||
$this->managelayout->add_js(base_url('assets/js/jquery.highlight.js'));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$('#post-content').highlight([<?php echo element('highlight_keyword', $view);?>]);
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
384
views/board/bootstrap/write.php
Normal file
384
views/board/bootstrap/write.php
Normal file
@@ -0,0 +1,384 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
|
||||
<?php echo element('headercontent', element('board', $view)); ?>
|
||||
|
||||
<div class="board">
|
||||
<h3><?php echo html_escape(element('board_name', element('board', $view))); ?> 글쓰기</h3>
|
||||
<?php
|
||||
echo validation_errors('<div class="alert alert-warning" role="alert">', '</div>');
|
||||
echo show_alert_message(element('message', $view), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
$attributes = array('class' => 'form-horizontal', 'name' => 'fwrite', 'id' => 'fwrite', 'onsubmit' => 'return submitContents(this)');
|
||||
echo form_open_multipart(current_full_url(), $attributes);
|
||||
?>
|
||||
<input type="hidden" name="<?php echo element('primary_key', $view); ?>" value="<?php echo element(element('primary_key', $view), element('post', $view)); ?>" />
|
||||
<div class="form-horizontal box-table">
|
||||
<?php if (element('is_post_name', element('post', $view))) { ?>
|
||||
<div class="form-group">
|
||||
<label for="post_nickname" class="col-sm-2 control-label">이름</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control px150" name="post_nickname" id="post_nickname" value="<?php echo set_value('post_nickname', element('post_nickname', element('post', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->member->is_member() === false) { ?>
|
||||
<div class="form-group">
|
||||
<label for="post_password" class="col-sm-2 control-label">비밀번호</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control px150" name="post_password" id="post_password" />
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="post_email" class="col-sm-2 control-label">이메일</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="post_email" id="post_email" value="<?php echo set_value('post_email', element('post_email', element('post', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="post_homepage" class="col-sm-2 control-label">홈페이지</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="post_homepage" id="post_homepage" value="<?php echo set_value('post_homepage', element('post_homepage', element('post', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="post_title" class="col-sm-2 control-label">제목</label>
|
||||
<div class="col-sm-10" style="display:table;">
|
||||
<input type="text" class="form-control" name="post_title" id="post_title" value="<?php echo set_value('post_title', element('post_title', element('post', $view))); ?>" />
|
||||
<?php if (element('use_google_map', element('board', $view))) { ?>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-md btn-default" id="btn_google_map" onClick="open_google_map();">지도</button>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (element('use_subject_style', element('board', $view))) { ?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">제목옵션</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="checkbox-inline" for="post_title_bold">
|
||||
<input type="checkbox" name="post_title_bold" id="post_title_bold" value="1" <?php echo set_checkbox('post_title_bold', '1', (element('post_title_bold', element('meta', element('post', $view))) ? true : false)); ?> /> 제목굵게
|
||||
</label>
|
||||
<label class="checkbox-inline" for="post_title_font">
|
||||
<select name="post_title_font" class="form-control">
|
||||
<option value="">제목폰트</option>
|
||||
<option value="굴림,gulim" <?php echo set_select('post_title_font', '굴림,gulim', (element('post_title_font', element('meta', element('post', $view))) === '굴림,gulim' ? true : false)); ?> >굴림</option>
|
||||
<option value="굴림체,gulimche" <?php echo set_select('post_title_font', '굴림체,gulimche', (element('post_title_font', element('meta', element('post', $view))) === '굴림체,gulimche' ? true : false)); ?> >굴림체</option>
|
||||
<option value="돋움,dotum" <?php echo set_select('post_title_font', '돋움,dotum', (element('post_title_font', element('meta', element('post', $view))) === '돋움,dotum' ? true : false)); ?> >돋움</option>
|
||||
<option value="돋움체,dotumche,applegothic" <?php echo set_select('post_title_font', '돋움체,dotumche,applegothic', (element('post_title_font', element('meta', element('post', $view))) === '돋움체,dotumche,applegothic' ? true : false)); ?> >돋움체</option>
|
||||
<option value="바탕,batang,applemyungjo" <?php echo set_select('post_title_font', '바탕,batang,applemyungjo', (element('post_title_font', element('meta', element('post', $view))) === '바탕,batang,applemyungjo' ? true : false)); ?> >바탕</option>
|
||||
<option value="바탕체,batangche" <?php echo set_select('post_title_font', '바탕체, batangche', (element('post_title_font', element('meta', element('post', $view))) === '바탕체,batangche' ? true : false)); ?> >바탕체</option>
|
||||
<option value="궁서,gungsuh,gungseo" <?php echo set_select('post_title_font', '궁서,gungsuh,gungseo', (element('post_title_font', element('meta', element('post', $view))) === '궁서,gungsuh,gungseo' ? true : false)); ?> >궁서</option>
|
||||
<option value="arial" <?php echo set_select('post_title_font', 'arial', (element('post_title_font', element('meta', element('post', $view))) === 'arial' ? true : false)); ?> >Arial</option>
|
||||
<option value="tahoma" <?php echo set_select('post_title_font', 'tahoma', (element('post_title_font', element('meta', element('post', $view))) === 'tahoma' ? true : false)); ?> >Tahoma</option>
|
||||
<option value="times new roman" <?php echo set_select('post_title_font', 'times new roman', (element('post_title_font', element('meta', element('post', $view))) === 'times new roman' ? true : false)); ?> >TimesNewRoman</option>
|
||||
<option value="verdana" <?php echo set_select('post_title_font', 'verdana', (element('post_title_font', element('meta', element('post', $view))) === 'verdana' ? true : false)); ?> >Verdana</option>
|
||||
<option value="courier new" <?php echo set_select('post_title_font', 'courier new', (element('post_title_font', element('meta', element('post', $view))) === 'courier new' ? true : false)); ?> >CourierNew</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="checkbox-inline" for="post_title_color">
|
||||
색상 : <input type="text" class="form-control px100" name="post_title_color" id="post_title_color" value="<?php echo set_value('post_title_color', element('post_title_color', element('meta', element('post', $view))) ? element('post_title_color', element('meta', element('post', $view))) : '#000000'); ?>" />
|
||||
<button type="button" class="btn btn-xs btn-default" id="btn_color_picker" >색상선택</button>
|
||||
<div id="color_picker" style="position:absolute; display:none; padding:10px; background-color:#fff; border:1px solid #ccc; z-index:999;"></div>
|
||||
<?php $this->managelayout->add_css(base_url('assets/js/colorpicker/farbtastic.css')); ?>
|
||||
<?php $this->managelayout->add_js(base_url('assets/js/colorpicker/farbtastic.js')); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '#btn_color_picker', function () {
|
||||
$('#color_picker').toggle();
|
||||
});
|
||||
$('#color_picker').farbtastic('#post_title_color');
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (element('can_post_notice', element('post', $view)) OR element('can_post_secret', element('post', $view)) OR element('can_post_receive_email', element('post', $view))) { ?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">옵션</label>
|
||||
<div class="col-sm-10">
|
||||
<?php if (element('can_post_notice', element('post', $view))) { ?>
|
||||
<label class="checkbox-inline" for="post_notice_1">
|
||||
<input type="checkbox" name="post_notice" id="post_notice_1" value="1" <?php echo set_checkbox('post_notice', '1', (element('post_notice', element('post', $view)) === '1' ? true : false)); ?> onChange="if (this.checked) {$('#post_notice_2').prop('disabled', true);} else {$('#post_notice_2').prop('disabled', false);}" <?php if (element('post_notice', element('post', $view)) === '2')echo "disabled='disabled'"; ?> /> 공지
|
||||
</label>
|
||||
<label class="checkbox-inline" for="post_notice_2">
|
||||
<input type="checkbox" name="post_notice" id="post_notice_2" value="2" <?php echo set_checkbox('post_notice', '2', (element('post_notice', element('post', $view)) === '2' ? true : false)); ?> onChange="if (this.checked) {$('#post_notice_1').prop('disabled', true);} else {$('#post_notice_1').prop('disabled', false);}" <?php if (element('post_notice', element('post', $view)) === '1')echo "disabled='disabled'"; ?> /> 전체공지
|
||||
</label>
|
||||
<?php } ?>
|
||||
<?php if (element('can_post_secret', element('post', $view))) { ?>
|
||||
<label class="checkbox-inline" for="post_secret">
|
||||
<input type="checkbox" name="post_secret" id="post_secret" value="1" <?php echo set_checkbox('post_secret', '1', (element('post_secret', element('post', $view)) ? true : false)); ?> /> 비밀글
|
||||
</label>
|
||||
<?php } ?>
|
||||
<?php if (element('can_post_receive_email', element('post', $view))) { ?>
|
||||
<label class="checkbox-inline" for="post_receive_email">
|
||||
<input type="checkbox" name="post_receive_email" id="post_receive_email" value="1" <?php echo set_checkbox('post_receive_email', '1', (element('post_receive_email', element('post', $view)) ? true : false)); ?> /> 답변메일받기
|
||||
</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (element('use_category', element('board', $view))) { ?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">분류</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-inline">
|
||||
<select name="post_category" class="form-control">
|
||||
<option value="">카테고리선택</option>
|
||||
<?php
|
||||
$category = element('category', $view);
|
||||
function ca_select($p = '', $category = '', $post_category = '')
|
||||
{
|
||||
$return = '';
|
||||
if ($p && is_array($p)) {
|
||||
foreach ($p as $result) {
|
||||
$exp = explode('.', element('bca_key', $result));
|
||||
$len = (element(1, $exp)) ? strlen(element(1, $exp)) : 0;
|
||||
$space = str_repeat('-', $len);
|
||||
$return .= '<option value="' . html_escape(element('bca_key', $result)) . '"';
|
||||
if (element('bca_key', $result) === $post_category) {
|
||||
$return .= 'selected="selected"';
|
||||
}
|
||||
$return .= '>' . $space . html_escape(element('bca_value', $result)) . '</option>';
|
||||
$parent = element('bca_key', $result);
|
||||
$return .= ca_select(element($parent, $category), $category, $post_category);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
echo ca_select(element(0, $category), $category, element('post_category', element('post', $view)));
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (element('extra_content', $view)) {
|
||||
foreach (element('extra_content', $view) as $key => $value) {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="<?php echo element('field_name', $value); ?>"><?php echo element('display_name', $value); ?></label>
|
||||
<div class="col-sm-10"><?php echo element('input', $value); ?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if ( ! element('use_dhtml', element('board', $view)) AND (element('post_min_length', element('board', $view)) OR element('post_max_length', element('board', $view)))) { ?>
|
||||
<div class="well well-sm" style="margin:15px 0;">
|
||||
현재 <strong><span id="char_count">0</span></strong> 글자이며,
|
||||
<?php if (element('post_min_length', element('board', $view))) { ?>
|
||||
최소 <strong><?php echo number_format(element('post_min_length', element('board', $view))); ?></strong> 글자 이상
|
||||
<?php } if (element('post_max_length', element('board', $view))) { ?>
|
||||
최대 <strong><?php echo number_format(element('post_max_length', element('board', $view))); ?></strong> 글자 이하
|
||||
<?php } ?>
|
||||
입력하실 수 있습니다.
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<?php if ( ! element('use_dhtml', element('board', $view))) { ?>
|
||||
<div>
|
||||
<div class="btn-group pull-right mb10">
|
||||
<?php if (element('use_emoticon', element('board', $view))) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="window.open('<?php echo site_url('helptool/emoticon?id=post_content'); ?>', 'emoticon', 'width=600,height=400,scrollbars=yes')"><i class="fa fa-smile-o fa-lg"></i></button>
|
||||
<?php } ?>
|
||||
<?php if (element('use_specialchars', element('board', $view))) { ?>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="window.open('<?php echo site_url('helptool/specialchars?id=post_content'); ?>', 'specialchars', 'width=490,height=245,scrollbars=yes')"><i class="fa fa-star-o fa-lg"></i></button>
|
||||
<?php } ?>
|
||||
<button type="button" class="btn btn-default btn-sm" onClick="resize_textarea('post_content', 'down');"><i class="fa fa-plus fa-lg"></i></button>
|
||||
<button type="button" class="btn btn-default btn-sm" onClick="resize_textarea('post_content', 'up');"><i class="fa fa-minus fa-lg"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo display_dhtml_editor('post_content', set_value('post_content', element('post_content', element('post', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = element('use_dhtml', element('board', $view)), $editor_type = $this->cbconfig->item('post_editor_type')); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (element('link_count', element('board', $view)) > 0) {
|
||||
$link_count = element('link_count', element('board', $view));
|
||||
for ($i = 0; $i < $link_count; $i++) {
|
||||
$link = html_escape(element('pln_url', element($i, element('link', $view))));
|
||||
$link_column = $link ? 'post_link_update[' . element('pln_id', element($i, element('link', $view))) . ']' : 'post_link[' . $i . ']';
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="<?php echo $link_column; ?>" class="col-sm-2 control-label">링크 #<?php echo $i+1; ?></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="<?php echo $link_column; ?>" id="<?php echo $link_column; ?>" value="<?php echo set_value($link_column, $link); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (element('use_upload', element('board', $view))) {
|
||||
$file_count = element('upload_file_count', element('board', $view));
|
||||
for ($i = 0; $i < $file_count; $i++) {
|
||||
$download_link = html_escape(element('download_link', element($i, element('file', $view))));
|
||||
$file_column = $download_link ? 'post_file_update[' . element('pfi_id', element($i, element('file', $view))) . ']' : 'post_file[' . $i . ']';
|
||||
$del_column = $download_link ? 'post_file_del[' . element('pfi_id', element($i, element('file', $view))) . ']' : '';
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="<?php echo $file_column; ?>" class="col-sm-2 control-label">파일 #<?php echo $i+1; ?></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" class="form-control" name="<?php echo $file_column; ?>" id="<?php echo $file_column; ?>" />
|
||||
<?php if ($download_link) { ?>
|
||||
<a href="<?php echo $download_link; ?>"><?php echo html_escape(element('pfi_originname', element($i, element('file', $view)))); ?></a>
|
||||
<label for="<?php echo $del_column; ?>">
|
||||
<input type="checkbox" name="<?php echo $del_column; ?>" id="<?php echo $del_column; ?>" value="1" <?php echo set_checkbox($del_column, '1'); ?> /> 삭제
|
||||
</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if (element('use_post_tag', element('board', $view)) && element('can_tag_write', element('board', $view))) { ?>
|
||||
<div class="form-group">
|
||||
<label for="post_tag" class="col-sm-2 control-label">태그</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="post_tag" id="post_tag" value="<?php echo set_value('post_tag', element('post_tag', element('post', $view))); ?>" /> <div class="help-block">태그를 콤마(,)로 구분해 입력해주세요. 예) 자유,인기,질문</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ( element('is_use_captcha', element('board', $view)) ) { ?>
|
||||
<div class="well well-sm form-inline passcord">
|
||||
<?php if ($this->cbconfig->item('use_recaptcha')) { ?>
|
||||
<div class="captcha" id="recaptcha"><button type="button" id="captcha"></button></div>
|
||||
<input type="hidden" name="recaptcha" />
|
||||
<?php } else { ?>
|
||||
<ul>
|
||||
<li><img src="<?php echo base_url('assets/images/preload.png'); ?>" width="160" height="40" id="captcha" alt="captcha" title="captcha" /></li>
|
||||
<li><input type="text" class="form-control col-md-4" id="captcha_key" name="captcha_key" /></li>
|
||||
<li>좌측에 보이는 문자를 입력해주세요.</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="border_button text-center mt20">
|
||||
<button type="button" class="btn btn-default btn-sm btn-history-back">취소</button>
|
||||
<button type="submit" class="btn btn-success btn-sm">작성완료</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
|
||||
<?php echo element('footercontent', element('board', $view)); ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo (int) element('post_min_length', element('board', $view)); ?>); // 최소
|
||||
var char_max = parseInt(<?php echo (int) element('post_max_length', element('board', $view)); ?>); // 최대
|
||||
|
||||
<?php if ( ! element('use_dhtml', element('board', $view)) AND (element('post_min_length', element('board', $view)) OR element('post_max_length', element('board', $view)))) { ?>
|
||||
|
||||
check_byte('post_content', 'char_count');
|
||||
$(function() {
|
||||
$('#post_content').on('keyup', function() {
|
||||
check_byte('post_content', 'char_count');
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
function submitContents(f) {
|
||||
if ($('#char_count')) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte('post_content', 'char_count'));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert('내용은 ' + char_min + '글자 이상 쓰셔야 합니다.');
|
||||
$('#post_content').focus();
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt) {
|
||||
alert('내용은 ' + char_max + '글자 이하로 쓰셔야 합니다.');
|
||||
$('#post_content').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var title = '';
|
||||
var content = '';
|
||||
$.ajax({
|
||||
url: cb_url + '/postact/filter_spam_keyword',
|
||||
type: 'POST',
|
||||
data: {
|
||||
title: f.post_title.value,
|
||||
content: f.post_content.value,
|
||||
csrf_test_name : cb_csrf_hash
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data) {
|
||||
title = data.title;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
if (title) {
|
||||
alert('제목에 금지단어(\'' + title + '\')가 포함되어있습니다');
|
||||
f.post_title.focus();
|
||||
return false;
|
||||
}
|
||||
if (content) {
|
||||
alert('내용에 금지단어(\'' + content + '\')가 포함되어있습니다');
|
||||
f.post_content.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ( element('is_use_captcha', element('board', $view)) ) {
|
||||
if ($this->cbconfig->item('use_recaptcha')) {
|
||||
$this->managelayout->add_js(base_url('assets/js/recaptcha.js'));
|
||||
} else {
|
||||
$this->managelayout->add_js(base_url('assets/js/captcha.js'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fwrite').validate({
|
||||
rules: {
|
||||
post_title: {required :true, minlength:2, maxlength:60},
|
||||
post_content : {<?php echo (element('use_dhtml', element('board', $view))) ? 'required_' . $this->cbconfig->item('post_editor_type') : 'required'; ?> : true }
|
||||
<?php if (element('is_post_name', element('post', $view))) { ?>
|
||||
, post_nickname: {required :true, minlength:2, maxlength:20}
|
||||
, post_email: {required :true, email:true}
|
||||
<?php } ?>
|
||||
<?php if ($this->member->is_member() === false) { ?>
|
||||
, post_password: {required :true, minlength:4, maxlength:100}
|
||||
<?php } ?>
|
||||
<?php if ( element('is_use_captcha', element('board', $view)) ) { ?>
|
||||
<?php if ($this->cbconfig->item('use_recaptcha')) { ?>
|
||||
, recaptcha : {recaptchaKey:true}
|
||||
<?php } else { ?>
|
||||
, captcha_key : {required: true, captchaKey:true}
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (element('use_category', element('board', $view))) { ?>
|
||||
, post_category : {required: true}
|
||||
<?php } ?>
|
||||
},
|
||||
messages: {
|
||||
recaptcha: '',
|
||||
captcha_key: '자동등록방지용 코드가 올바르지 않습니다.'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?php if (element('has_tempsave', $view)) { ?>get_tempsave(cb_board); <?php } ?>
|
||||
<?php if ( ! element('post_id', element('post', $view))) { ?>window.onbeforeunload = function () { auto_tempsave(cb_board); } <?php } ?>
|
||||
//]]>
|
||||
</script>
|
||||
Reference in New Issue
Block a user