사용자: #459 frm_tbl style, 게시판스킨 댓글보기

This commit is contained in:
whitedot
2013-05-15 16:07:17 +09:00
parent 04fc3849ca
commit 662eb42483
5 changed files with 236 additions and 236 deletions

View File

@ -229,7 +229,7 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
/* 게시판관리 목록 */
.tbl_bo_list td {text-align:center}
/* 게시판추가/수정 */
.group_setting {width:130px;border-left:1px solid #e9ecee}
.group_setting {width:140px;border-left:1px solid #e9ecee;text-align:center}
#anc_bo_extra .group_setting label {width:auto}
#anc_bo_extra .group_setting input {margin:0}
#anc_bo_extra label {display:inline-block;width:100px}

View File

@ -73,12 +73,12 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
/* 중간 레이아웃 */
#wrapper {z-index:5;margin:50px auto;width:980px;zoom:1}
#wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#wrapper_title {margin-bottom:20px;font-size:1.2em}
#aside {float:right;width:208px;border:1px solid #d9e1e5;background:#fff}
#container {z-index:4;position:relative;float:left;padding:25px 14px 15px;width:728px;min-height:500px;height:auto !important;height:500px;border:1px solid #d9e1e5;background:#fff;zoom:1}
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title {margin-bottom:20px;font-size:1.2em}
/* 하단 레이아웃 */
#ft {background:#484848}
@ -127,7 +127,7 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
/* 버튼 */
.btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #d9d9d9;background:#f5f6fa;color:#000;text-decoration:none;line-height:2.15em;vertical-align:middle}
.btn01:focus, .btn01:hover {text-decoration:none}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #333;background:#333;color:#fff;text-decoration:none;line-height:2.15em;vertical-align:middle}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #333;background:#333;color:#fff !important;text-decoration:none;line-height:2.15em;vertical-align:middle}
.btn02:focus, .btn02:hover {text-decoration:none}
.btn_confirm {margin:20px 0;text-align:center} /* 서식단계 진행 */
.btn_submit {padding:0 10px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
@ -169,11 +169,11 @@ td.empty_table {padding:85px 0;text-align:center}
/* 폼 테이블 */
.frm_tbl {width:100%;border-collapse:collapse;border-spacing:0}
.frm_tbl caption {padding:10px 0;font-weight:bold;text-align:center}
.frm_tbl th {width:100px;border-bottom:1px solid #f7f7f7;text-align:left}
.frm_tbl td {padding:7px 10px;border-bottom:1px solid #f7f7f7;background:transparent}
.frm_tbl caption {padding:10px 0;font-weight:bold;text-align:left}
.frm_tbl th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f5f6fa;text-align:left;vertical-align:top}
.frm_tbl td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent;vertical-align:top}
.frm_tbl textarea,
.frm_input {padding:2px 2px 3px;border:1px solid #d9d9d9;background:#fff;vertical-align:middle}
.frm_input {padding:2px 2px 3px;border:1px solid #ccc;background:#fff;vertical-align:middle}
.frm_tbl textarea {width:90%;height:150px}
.frm_address {display:block;margin-top:5px}
.frm_file {display:block;margin-bottom:5px}
@ -181,7 +181,7 @@ td.empty_table {padding:85px 0;text-align:center}
.frm_tbl #captcha input {margin-left:5px;text-align:center}
.frm_tbl a {text-decoration:none}
.frm_info {display:block;padding:0 0 5px;color:#6595b9;line-height:1.2em}
.frm_info {display:block;padding:0 0 5px;font-size:0.95em;line-height:1.2em}
/* 테이블 항목별 정의 */
.td_chk {width:30px;text-align:center}

View File

@ -135,4 +135,4 @@ if ($config['cf_include_head']) {
<?php echo poll('basic'); // 설문조사 ?>
</div>
<div id="container">
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g4['title'] ?></div><?php } ?>
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><h1 id="container_title"><?php echo $g4['title'] ?></h1><?php } ?>

View File

@ -73,230 +73,230 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
</section>
<?php if ($is_comment_write) {
if($w == '')
$w = 'c';
?>
<aside id="bo_vc_w">
<h2>댓글쓰기</h2>
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="is_good" value="">
<?php
if ($is_comment_write) {
if($w == '') $w = 'c';
?>
<section id="bo_vc_w">
<h2>댓글쓰기</h2>
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="is_good" value="">
<table class="frm_tbl">
<tbody>
<?php if ($is_guest) { ?>
<tr>
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="wr_name" id="wr_name" required class="frm_input required" size="5" maxLength="20"></td>
</tr>
<tr>
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10" maxLength="20"></td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="wr_secret">비밀글사용</label></th>
<td><input type="checkbox" name="wr_secret" value="secret" id="wr_secret"></td>
</tr>
<?php if ($is_guest) { ?>
<tr>
<th scope="row">자동등록방지</th>
<td><?php echo $captcha_html; ?></td>
</tr>
<?php } ?>
<tr>
<th scope="row">내용</th>
<td>
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="댓글 내용"
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
<script>
$("textarea#wr_content[maxlength]").live("keyup change", function() {
var str = $(this).val()
var mx = parseInt($(this).attr("maxlength"))
if (str.length > mx) {
$(this).val(str.substr(0, mx));
return false;
}
});
</script>
</td>
</tr>
</tbody>
</table>
<div class="btn_confirm">
<input type="submit" value="댓글등록" id="btn_submit" class="btn_submit" accesskey="s">
</div>
</form>
</aside>
<script>
var save_before = '';
var save_html = document.getElementById('bo_vc_w').innerHTML;
function good_and_write()
{
var f = document.fviewcomment;
if (fviewcomment_submit(f)) {
f.is_good.value = 1;
f.submit();
} else {
f.is_good.value = 0;
}
}
function fviewcomment_submit(f)
{
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
f.is_good.value = 0;
/*
var s;
if (s = word_filter_check(document.getElementById('wr_content').value))
{
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
document.getElementById('wr_content').focus();
return false;
}
*/
var subject = "";
var content = "";
$.ajax({
url: g4_bbs_url+"/filter.ajax.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}
// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
if (char_min > 0 || char_max > 0)
{
check_byte('wr_content', 'char_count');
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt)
{
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
} else if (char_max > 0 && char_max < cnt)
{
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
else if (!document.getElementById('wr_content').value)
{
alert("댓글을 입력하여 주십시오.");
return false;
}
if (typeof(f.wr_name) != 'undefined')
{
f.wr_name.value = f.wr_name.value.replace(pattern, "");
if (f.wr_name.value == '')
{
alert('이름이 입력되지 않았습니다.');
f.wr_name.focus();
return false;
}
}
if (typeof(f.wr_password) != 'undefined')
{
f.wr_password.value = f.wr_password.value.replace(pattern, "");
if (f.wr_password.value == '')
{
alert('패스워드가 입력되지 않았습니다.');
f.wr_password.focus();
return false;
}
}
<?php if($is_guest) echo chk_captcha_js(); ?>
document.getElementById("btn_submit").disabled = "disabled";
return true;
}
function comment_box(comment_id, work)
{
var el_id;
// 댓글 아이디가 넘어오면 답변, 수정
if (comment_id)
{
if (work == 'c')
el_id = 'reply_' + comment_id;
else
el_id = 'edit_' + comment_id;
}
else
el_id = 'bo_vc_w';
if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정
if (work == 'cu')
{
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
if (typeof char_count != 'undefined')
check_byte('wr_content', 'char_count');
if (document.getElementById('secret_comment_'+comment_id).value)
document.getElementById('wr_secret').checked = true;
else
document.getElementById('wr_secret').checked = false;
}
document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;
save_before = el_id;
}
}
function comment_delete()
{
return confirm("이 댓글을 삭제하시겠습니까?");
}
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
</script>
<table class="frm_tbl">
<tbody>
<?php if ($is_guest) { ?>
<tr>
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="wr_name" id="wr_name" required class="frm_input required" size="5" maxLength="20"></td>
</tr>
<tr>
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10" maxLength="20"></td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="wr_secret">비밀글사용</label></th>
<td><input type="checkbox" name="wr_secret" value="secret" id="wr_secret"></td>
</tr>
<?php if ($is_guest) { ?>
<tr>
<th scope="row">자동등록방지</th>
<td><?php echo $captcha_html; ?></td>
</tr>
<?php } ?>
<tr>
<th scope="row">내용</th>
<td>
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="댓글 내용"
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
<script>
$("textarea#wr_content[maxlength]").live("keyup change", function() {
var str = $(this).val()
var mx = parseInt($(this).attr("maxlength"))
if (str.length > mx) {
$(this).val(str.substr(0, mx));
return false;
}
});
</script>
</td>
</tr>
</tbody>
</table>
<div class="btn_confirm">
<input type="submit" value="댓글등록" id="btn_submit" class="btn_submit" accesskey="s">
</div>
</form>
</section>
<script>
var save_before = '';
var save_html = document.getElementById('bo_vc_w').innerHTML;
function good_and_write()
{
var f = document.fviewcomment;
if (fviewcomment_submit(f)) {
f.is_good.value = 1;
f.submit();
} else {
f.is_good.value = 0;
}
}
function fviewcomment_submit(f)
{
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
f.is_good.value = 0;
/*
var s;
if (s = word_filter_check(document.getElementById('wr_content').value))
{
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
document.getElementById('wr_content').focus();
return false;
}
*/
var subject = "";
var content = "";
$.ajax({
url: g4_bbs_url+"/filter.ajax.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}
// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
if (char_min > 0 || char_max > 0)
{
check_byte('wr_content', 'char_count');
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt)
{
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
} else if (char_max > 0 && char_max < cnt)
{
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
else if (!document.getElementById('wr_content').value)
{
alert("댓글을 입력하여 주십시오.");
return false;
}
if (typeof(f.wr_name) != 'undefined')
{
f.wr_name.value = f.wr_name.value.replace(pattern, "");
if (f.wr_name.value == '')
{
alert('이름이 입력되지 않았습니다.');
f.wr_name.focus();
return false;
}
}
if (typeof(f.wr_password) != 'undefined')
{
f.wr_password.value = f.wr_password.value.replace(pattern, "");
if (f.wr_password.value == '')
{
alert('패스워드가 입력되지 않았습니다.');
f.wr_password.focus();
return false;
}
}
<?php if($is_guest) echo chk_captcha_js(); ?>
document.getElementById("btn_submit").disabled = "disabled";
return true;
}
function comment_box(comment_id, work)
{
var el_id;
// 댓글 아이디가 넘어오면 답변, 수정
if (comment_id)
{
if (work == 'c')
el_id = 'reply_' + comment_id;
else
el_id = 'edit_' + comment_id;
}
else
el_id = 'bo_vc_w';
if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정
if (work == 'cu')
{
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
if (typeof char_count != 'undefined')
check_byte('wr_content', 'char_count');
if (document.getElementById('secret_comment_'+comment_id).value)
document.getElementById('wr_secret').checked = true;
else
document.getElementById('wr_secret').checked = false;
}
document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;
save_before = el_id;
}
}
function comment_delete()
{
return confirm("이 댓글을 삭제하시겠습니까?");
}
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
</script>
<?php } ?>

View File

@ -31,8 +31,8 @@
#ol_after_private a:focus strong,
#ol_after_private a:hover strong {color:#fff;text-decoration:none}
#ol_after_memo {width:50px;margin-right:1px}
#ol_after_pt {width:80px;margin-right:1px}
#ol_after_pt {width:79px;margin-right:1px}
#ol_after_scrap {width:48px;line-height:2.6em !important}
#ol_after_ft {text-align:justify}
#ol_after_ft a {display:inline-block;width:88px;height:22px;background:#333;color:#fff;text-align:center;line-height:1.8em}
#ol_after_ft a {display:inline-block;width:87px;height:22px;background:#333;color:#fff;text-align:center;line-height:1.8em}
#ol_after_ft a:focus, #ol_after_ft a:hover {text-decoration:none !important}