이메일 쓰는 란을 없애고 싶은데요~ 정보
이메일 쓰는 란을 없애고 싶은데요~본문
블로그 형 스킨을 쓰는데
코멘트 부분에 이름, 비밀번호, 이메일, 내용 이렇게 쓰게 되어 있거든요~
여기서 이메일만 없애고 싶은데 이메일 부분을 주석처리 하니까 밑에 상태바에 페이지에 오류가 있다고 자꾸 나오네요~ 한번 봐주시면 감사하겠습니다~!!
list.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.
set_session("ss_delete_token", $token = uniqid(time()));
// 리턴 URL 정의
$rUrl = urlencode($_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
$x_img_button = " [삭제]"; // X 버튼입니다. IMG 태그를 적어주세요. 예) <img src='경로' />
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }
.board_list td.name { padding:0 0 0 10px; }
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
.board_button { clear:both; margin:10px 0 0 0; }
.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
.board_page a:link { color:#777; }
.board_search { text-align:center; margin:10px 0 0 0; }
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }
/* initialize */
body, .bodyWrapper form, .bodyWrapper div, .bodyWrapper p, .bodyWrapper h1, .bodyWrapper h2, .bodyWrapper h3, .bodyWrapper h4, .bodyWrapper h5, .bodyWrapper h6, .bodyWrapper dl, .bodyWrapper dt, .bodyWrapper dd, .bodyWrapper ul, .bodyWrapper ol, .bodyWrapper li, .bodyWrapper fieldset, .bodyWrapper th, .bodyWrapper td {margin:0;padding:0;color:#ccc;}
.bodyWrapper {width:623px;font-family:돋움,Dotum,sans-serif;font-size:12px;}
.bodyWrapper fieldset, .bodyWrapper img {border:0}
.bodyWrapper ol, .bodyWrapper ul, .bodyWrapper dl {list-style:none}
.bodyWrapper input,.bodyWrapper textarea, .bodyWrapper select{font-family:돋움,Dotum,sans-serif;outline:none;color:#999;}
.bodyWrapper h1 {font-size:11px;color:#999999; text-align:left;}
.bodyWrapper .info {zoom:1;margin:20px 0 13px 0;}
.bodyWrapper .info:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
.bodyWrapper .info dt,.bodyWrapper .info dd {float:left}
.bodyWrapper .info dd {padding:0 7px;color:#909090;}
.bodyWrapper .info dd.cmt {color:#a9c846;}
.bodyWrapper .content {line-height:16px;}
.bodyWrapper .comment {margin:10px 0 0 0;color:#8d8b8c;}
.bodyWrapper .comment a {text-decoration:none;}
.bodyWrapper .comment h2 {font-size:11px;color:#888888;margin:0 0 5px 0;text-align:right;font-weight:normal;}
.bodyWrapper .comment h2 span {font-weight:normal;}
.bodyWrapper .comment .list {border-top:2px solid #c9c9c9;border-bottom:2px solid #c9c9c9;padding:20px;}
.bodyWrapper .comment .list li {margin-bottom:5px;}
.bodyWrapper .comment .frm {background-color:#;padding:10px 23px;}
.bodyWrapper .comment {margin:10px 0 10px 0;}
.bodyWrapper .comment .frm li {margin-bottom:10px;color:#383838;font-weight:bolder;font-size:16px;}
.bodyWrapper .comment .frm input.normal {width:230px;height:18px;background-color:#FFF;border:1px solid #e2e2e2;vertical-align:middle;padding:3px;line-height:18px;}
.bodyWrapper .comment .frm textarea {width:392px;height:82px;background-color:#FFF;border:1px solid #e2e2e2;padding:3px;}
.bodyWrapper .comment .frm button {width:115px;height:20px;border:0;padding:0;color:#cccccc;background-color:#3e3e3e;}
.bodyWrapper .comment .frmWrapper {width:623px;margin:0 auto;margin-top:0px;}
.bodyWrapper .comment .frmWrapper h2 {padding-bottom:17px;border-bottom:2px solid #666666;margin-bottom:13px;}
.bodyWrapper .paging {width:250px;font-size:12px;margin:0 auto;}
.bodyWrapper .paging a {color:#666666;}
</style>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="center">
<div class="bodyWrapper" >
<?php for ($i=0; $i<count($list); $i++) { ?>
<h1><?php echo $list[$i]["wr_subject"]; ?></h1>
<!-- <dl class="info">
<dd><?php echo $list[$i]["wr_datetime"]; ?></dd>
<dt><img src="<?=$board_skin_path?>/img/icon_men.jpg" /></dt>
<dd><?php echo $list[$i]["wr_name"]; ?></dd>
<dt><img src="<?=$board_skin_path?>/img/icon_comment.jpg" /></dt>
<dd class="cmt"><?php echo $list[$i]["wr_comment"] > 0 ? $list[$i]["wr_comment"] : "No Comment"; ?></dd>
</dl>-->
<table width="100%">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="1" bgcolor=#666666></td>
</tr>
<tr>
<td height="10" ></td>
</tr>
</table>
<div class="content"align="center">
<!-- 내용 -->
<?php
$html = 0;
if (strstr($list[$i][wr_option], "html1"))
$html = 1;
else if (strstr($list[$i][wr_option], "html2"))
$html = 2;
foreach($list[$i]["file"] as $imgRow) {
if(strlen($imgRow["view"]) == 0) continue;
echo $imgRow["view"]."<br /><br />";
}
echo conv_content($list[$i][wr_content], $html);
?>
<!-- 내용 -->
</div>
<table width="100%" cellpadding="0" cellspacing="0"><tr><td align="left">
<div class="comment">
<?php if($list[$i]["wr_comment"] > 0) { ?>
<a href="javascript:void(0);" id="comment_button"><h2>Comment <span>(<?php echo $list[$i]["wr_comment"]; ?>)</span></h2>
</a>
<ul class="list" style="display:none;">
<?php
$sql = " select * from $write_table where wr_parent = '".$list[$i]["wr_id"]."' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";
$result = sql_query($sql);
for ($j=0; $rowCmt=sql_fetch_array($result); $j++) {
// 삭제버튼 처리
$del_button = "";
if (($member[mb_level] >= $board[bo_comment_level]) || $is_admin)
{
if ($member[mb_id])
{
if ($rowCmt[mb_id] == $member[mb_id] || $is_admin)
{
$del_button = "<a href='./delete_comment.php?bo_table=$bo_table&comment_id=$rowCmt[wr_id]&token=$token&cwin=$cwin&page=$page&rUrl=$rUrl".$qstr."'>$x_img_button</a>";
}
}
else
{
if (!$rowCmt[mb_id]) {
$del_button = "<a href='./password.php?w=x&bo_table=$bo_table&comment_id=$rowCmt[wr_id]&cwin=$cwin&page=$page&rUrl=$rUrl".$qstr."'>$x_img_button</a>";
}
}
}
?>
<li><?php echo $rowCmt["wr_name"];?> <?php echo ($is_admin && strlen($rowCmt["wr_email"]) > 0) ? "[".$rowCmt["wr_email"]."]" : ""; ?> : <?php echo $rowCmt["wr_content"]."".$del_button;?></li>
<?php } ?>
</ul>
<?php } ?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="left">
<div class="frmWrapper" style="display:<?php echo ($member[mb_level] >= $board[bo_comment_level]) ? "" : "none"; ?>">
<h2> </h2>
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off" style="margin:0px;">
<input type=hidden name=w id=w value='c'>
<input type=hidden name=bo_table value='<?=$bo_table?>'>
<input type=hidden name=wr_id value='<?=$list[$i]["wr_id"]?>'>
<input type=hidden name=comment_id id='comment_id' value=''>
<input type=hidden name=sca value='<?=$sca?>' >
<input type=hidden name=sfl value='<?=$sfl?>' >
<input type=hidden name=stx value='<?=$stx?>'>
<input type=hidden name=spt value='<?=$spt?>'>
<input type=hidden name=page value='<?=$page?>'>
<input type=hidden name=cwin value='<?=$cwin?>'>
<input type=hidden name=rUrl value='<?=urlencode($_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);?>'>
<input type=hidden name=is_good value=''>
<input type=hidden name=wr_key value='<? set_session("captcha_keystring", uniqid());echo get_session("captcha_keystring")?>'>
<ul class="frm"></li>
<?php if($is_guest) { ?>
<li><input name="wr_name" id="wr_name" type="text" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 100px;" /></li>
<li><input name="wr_password" id="wr_password" type="password" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 150px;"/></li>
<!-- <li><input name="wr_email" id="wr_email" type="text" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 150px;"/></li>-->
<?php } ?>
<li><textarea name="wr_content" id="wr_content" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:50; width: 100%;"></textarea></li>
<li><button type="submit">댓글 남기기</button></li>
</ul>
</form>
</div></td></tr></table>
</div></td></tr></table>
<div class="board_button">
<div style="float:left;">
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align="absmiddle" border='0'></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" border='0'></a>
<? } ?>
</div>
</div>
<?php } ?>
<!-- 페이지 -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="right"> <div class="paging">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("이전", "이전 페이지", $write_pages);
$write_pages = str_replace("처음", "처음", $write_pages);
$write_pages = str_replace("다음", "...", $write_pages);
$write_pages = str_replace("맨끝", "...", $write_pages);
$write_pages = str_replace("이전 페이지</a>", "이전페이지</a> <span class='bar'>|</span> ", $write_pages);
//$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
//$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
</div> </td>
</tr></table>
</div>
</td></tr></table>
<?php if($is_admin) { ?>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:left;">
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
</div>
<div style="float:right;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
<col width="40" />
<col width="50" />
<? if ($is_good) { ?><col width="40" /><? } ?>
<? if ($is_nogood) { ?><col width="40" /><? } ?>
<tr>
<th>번호</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>제 목</th>
<th>글쓴이</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr>
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<b>공지</b>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span class='current'>{$list[$i][num]}</span>";
else
echo $list[$i][num];
?>
</td>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td class="subject">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>";
else
echo "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
</td>
<td class="name"><?=$list[$i][name]?></td>
<td class="datetime"><?=$list[$i][datetime2]?></td>
<td class="hit"><?=$list[$i][wr_hit]?></td>
<? if ($is_good) { ?><td class="good"><?=$list[$i][wr_good]?></td><? } ?>
<? if ($is_nogood) { ?><td class="nogood"><?=$list[$i][wr_nogood]?></td><? } ?>
</tr>
<? } // end for ?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<!-- 페이지 -->
<div class="board_page">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
//$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
</div>
<div style="float:right;">
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border='0'></a><? } ?>
</div>
</td></tr></table>
<script type="text/javascript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
if ('<?=$sop?>' == 'and')
document.fsearch.sop[0].checked = true;
if ('<?=$sop?>' == 'or')
document.fsearch.sop[1].checked = true;
} else {
document.fsearch.sop[0].checked = true;
}
</script>
<? if ($is_checkbox) { ?>
<script type="text/javascript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<? } // is_admin ?>
<!-- 유효성 검사 -->
<script>
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: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}
// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
$(f).find('textarea[name=wr_content]').val($(f).find('textarea[name=wr_content]').val().replace(pattern, ""));
if($(f).find('input[name=wr_name]').length > 0)
{
$(f).find('input[name=wr_name]').val($(f).find('input[name=wr_name]').val().replace(pattern, ""));
if ($(f).find('input[name=wr_name]').val() == '')
{
alert('이름이 입력되지 않았습니다.');
$(f).find('input[name=wr_name_placeholder]').focus();
return false;
}
}
if ($(f).find('input[name=wr_password]').length > 0)
{
$(f).find('input[name=wr_password]').val($(f).find('input[name=wr_password]').val().replace(pattern, ""));
if ( $(f).find('input[name=wr_password]').val() == '')
{
alert('패스워드가 입력되지 않았습니다.');
$(f).find('input[name=wr_password_placeholder]').focus();
return false;
}
}
if ($(f).find('input[name=wr_email]').length > 0)
{
if ( $(f).find('input[name=wr_email]').val() == '')
{
alert('이메일이 입력되지 않았습니다.');
$(f).find('input[name=wr_email_placeholder]').focus();
return false;
}
}
if (!$(f).find('textarea[name=wr_content]').val())
{
alert("코멘트를 입력하여 주십시오.");
$(f).find('textarea[name=wr_content]').focus();
return false;
}
return true;
}
if(typeof(JKC) == "undefined") var JKC = {};
(function($){
JKC.Placeholder = function() {
this.initialize.apply(this,arguments);
}
JKC.Placeholder.prototype = {
initialize : function(hash) {
var obj = this;
// 멤버변수 정의
this.hash = this.getHashData(hash);
this.init();
// 이벤트 정의
this.addEvent();
},
// Hash 변수정의
getHashData : function(hash) {
if(typeof(hash.id) == "undefined") hash.id = "placeholder"; // 개체 아이디
if(typeof(hash.element) == "undefined") hash.element = null; // 엘리먼트
if(typeof(hash.str) == "undefined") hash.str = "placeholder"; // 문구
return hash;
},
addEvent : function() {
var obj = this;
var ele = this.getElement();
var ele_place = $(ele).next();
ele_place.focus(function() {
$(this).hide();
ele.show();
ele.focus();
});
ele.blur(function() {
if($(this).val() == "") {
$(this).hide();
ele_place.show();
}
});
},
init : function() {
var ele = this.getElement();
// 보관용 div 생성
$(document.body).append("<div id='placeholder_hiddenbox'></div>");
// 복사
var clone = ele.clone();
if(clone.attr("id").length > 0) {
clone.attr("id",clone.attr("id")+"_placeholder");
}
if(clone.attr("name").length > 0) {
clone.attr("name",clone.attr("name")+"_placeholder");
}
// 복사된 객체 추가
$("#placeholder_hiddenbox").append(clone);
var html = $("#placeholder_hiddenbox").html();
$("#placeholder_hiddenbox").remove();
html = html.replace(/(type=[\'\"]?)password([\'\"]?)/i,"$1text$2");
ele.after(html);
ele.next().val(this.hash.str);
ele.hide();
},
getElement : function() {
if(this.hash.element == null) {
return $("#"+this.hash.id);
} else {
return $(this.hash.element);
}
}
}
})(jQuery);
// 댓글 버튼
$("#comment_button").click(function() {
var ul = $(this).next();
if(ul.hasClass("on")) {
ul.removeClass("on");
ul.slideUp();
} else {
ul.addClass("on");
ul.slideDown();
}
});
<?php if($is_guest) { ?>
var arrPlaceholder = [];
$(".frmWrapper").each(function() {
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_name]"),
str: "이름"
}));
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_password]"),
str: "비밀번호"
}));
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_email]"),
str: "이메일"
}));
});
<?php } ?>
</script>
<!-- 게시판 목록 끝 -->
이메일 부분만 다 찾아서 주석 처리 해 봤는데 자꾸 페이지 오류라고 상태바에 나와서요~ ㅠ
전문가 분들 조언 부탁드려요~!
코멘트 부분에 이름, 비밀번호, 이메일, 내용 이렇게 쓰게 되어 있거든요~
여기서 이메일만 없애고 싶은데 이메일 부분을 주석처리 하니까 밑에 상태바에 페이지에 오류가 있다고 자꾸 나오네요~ 한번 봐주시면 감사하겠습니다~!!
list.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.
set_session("ss_delete_token", $token = uniqid(time()));
// 리턴 URL 정의
$rUrl = urlencode($_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
$x_img_button = " [삭제]"; // X 버튼입니다. IMG 태그를 적어주세요. 예) <img src='경로' />
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }
.board_list td.name { padding:0 0 0 10px; }
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
.board_button { clear:both; margin:10px 0 0 0; }
.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
.board_page a:link { color:#777; }
.board_search { text-align:center; margin:10px 0 0 0; }
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }
/* initialize */
body, .bodyWrapper form, .bodyWrapper div, .bodyWrapper p, .bodyWrapper h1, .bodyWrapper h2, .bodyWrapper h3, .bodyWrapper h4, .bodyWrapper h5, .bodyWrapper h6, .bodyWrapper dl, .bodyWrapper dt, .bodyWrapper dd, .bodyWrapper ul, .bodyWrapper ol, .bodyWrapper li, .bodyWrapper fieldset, .bodyWrapper th, .bodyWrapper td {margin:0;padding:0;color:#ccc;}
.bodyWrapper {width:623px;font-family:돋움,Dotum,sans-serif;font-size:12px;}
.bodyWrapper fieldset, .bodyWrapper img {border:0}
.bodyWrapper ol, .bodyWrapper ul, .bodyWrapper dl {list-style:none}
.bodyWrapper input,.bodyWrapper textarea, .bodyWrapper select{font-family:돋움,Dotum,sans-serif;outline:none;color:#999;}
.bodyWrapper h1 {font-size:11px;color:#999999; text-align:left;}
.bodyWrapper .info {zoom:1;margin:20px 0 13px 0;}
.bodyWrapper .info:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
.bodyWrapper .info dt,.bodyWrapper .info dd {float:left}
.bodyWrapper .info dd {padding:0 7px;color:#909090;}
.bodyWrapper .info dd.cmt {color:#a9c846;}
.bodyWrapper .content {line-height:16px;}
.bodyWrapper .comment {margin:10px 0 0 0;color:#8d8b8c;}
.bodyWrapper .comment a {text-decoration:none;}
.bodyWrapper .comment h2 {font-size:11px;color:#888888;margin:0 0 5px 0;text-align:right;font-weight:normal;}
.bodyWrapper .comment h2 span {font-weight:normal;}
.bodyWrapper .comment .list {border-top:2px solid #c9c9c9;border-bottom:2px solid #c9c9c9;padding:20px;}
.bodyWrapper .comment .list li {margin-bottom:5px;}
.bodyWrapper .comment .frm {background-color:#;padding:10px 23px;}
.bodyWrapper .comment {margin:10px 0 10px 0;}
.bodyWrapper .comment .frm li {margin-bottom:10px;color:#383838;font-weight:bolder;font-size:16px;}
.bodyWrapper .comment .frm input.normal {width:230px;height:18px;background-color:#FFF;border:1px solid #e2e2e2;vertical-align:middle;padding:3px;line-height:18px;}
.bodyWrapper .comment .frm textarea {width:392px;height:82px;background-color:#FFF;border:1px solid #e2e2e2;padding:3px;}
.bodyWrapper .comment .frm button {width:115px;height:20px;border:0;padding:0;color:#cccccc;background-color:#3e3e3e;}
.bodyWrapper .comment .frmWrapper {width:623px;margin:0 auto;margin-top:0px;}
.bodyWrapper .comment .frmWrapper h2 {padding-bottom:17px;border-bottom:2px solid #666666;margin-bottom:13px;}
.bodyWrapper .paging {width:250px;font-size:12px;margin:0 auto;}
.bodyWrapper .paging a {color:#666666;}
</style>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="center">
<div class="bodyWrapper" >
<?php for ($i=0; $i<count($list); $i++) { ?>
<h1><?php echo $list[$i]["wr_subject"]; ?></h1>
<!-- <dl class="info">
<dd><?php echo $list[$i]["wr_datetime"]; ?></dd>
<dt><img src="<?=$board_skin_path?>/img/icon_men.jpg" /></dt>
<dd><?php echo $list[$i]["wr_name"]; ?></dd>
<dt><img src="<?=$board_skin_path?>/img/icon_comment.jpg" /></dt>
<dd class="cmt"><?php echo $list[$i]["wr_comment"] > 0 ? $list[$i]["wr_comment"] : "No Comment"; ?></dd>
</dl>-->
<table width="100%">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="1" bgcolor=#666666></td>
</tr>
<tr>
<td height="10" ></td>
</tr>
</table>
<div class="content"align="center">
<!-- 내용 -->
<?php
$html = 0;
if (strstr($list[$i][wr_option], "html1"))
$html = 1;
else if (strstr($list[$i][wr_option], "html2"))
$html = 2;
foreach($list[$i]["file"] as $imgRow) {
if(strlen($imgRow["view"]) == 0) continue;
echo $imgRow["view"]."<br /><br />";
}
echo conv_content($list[$i][wr_content], $html);
?>
<!-- 내용 -->
</div>
<table width="100%" cellpadding="0" cellspacing="0"><tr><td align="left">
<div class="comment">
<?php if($list[$i]["wr_comment"] > 0) { ?>
<a href="javascript:void(0);" id="comment_button"><h2>Comment <span>(<?php echo $list[$i]["wr_comment"]; ?>)</span></h2>
</a>
<ul class="list" style="display:none;">
<?php
$sql = " select * from $write_table where wr_parent = '".$list[$i]["wr_id"]."' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";
$result = sql_query($sql);
for ($j=0; $rowCmt=sql_fetch_array($result); $j++) {
// 삭제버튼 처리
$del_button = "";
if (($member[mb_level] >= $board[bo_comment_level]) || $is_admin)
{
if ($member[mb_id])
{
if ($rowCmt[mb_id] == $member[mb_id] || $is_admin)
{
$del_button = "<a href='./delete_comment.php?bo_table=$bo_table&comment_id=$rowCmt[wr_id]&token=$token&cwin=$cwin&page=$page&rUrl=$rUrl".$qstr."'>$x_img_button</a>";
}
}
else
{
if (!$rowCmt[mb_id]) {
$del_button = "<a href='./password.php?w=x&bo_table=$bo_table&comment_id=$rowCmt[wr_id]&cwin=$cwin&page=$page&rUrl=$rUrl".$qstr."'>$x_img_button</a>";
}
}
}
?>
<li><?php echo $rowCmt["wr_name"];?> <?php echo ($is_admin && strlen($rowCmt["wr_email"]) > 0) ? "[".$rowCmt["wr_email"]."]" : ""; ?> : <?php echo $rowCmt["wr_content"]."".$del_button;?></li>
<?php } ?>
</ul>
<?php } ?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="left">
<div class="frmWrapper" style="display:<?php echo ($member[mb_level] >= $board[bo_comment_level]) ? "" : "none"; ?>">
<h2> </h2>
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off" style="margin:0px;">
<input type=hidden name=w id=w value='c'>
<input type=hidden name=bo_table value='<?=$bo_table?>'>
<input type=hidden name=wr_id value='<?=$list[$i]["wr_id"]?>'>
<input type=hidden name=comment_id id='comment_id' value=''>
<input type=hidden name=sca value='<?=$sca?>' >
<input type=hidden name=sfl value='<?=$sfl?>' >
<input type=hidden name=stx value='<?=$stx?>'>
<input type=hidden name=spt value='<?=$spt?>'>
<input type=hidden name=page value='<?=$page?>'>
<input type=hidden name=cwin value='<?=$cwin?>'>
<input type=hidden name=rUrl value='<?=urlencode($_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);?>'>
<input type=hidden name=is_good value=''>
<input type=hidden name=wr_key value='<? set_session("captcha_keystring", uniqid());echo get_session("captcha_keystring")?>'>
<ul class="frm"></li>
<?php if($is_guest) { ?>
<li><input name="wr_name" id="wr_name" type="text" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 100px;" /></li>
<li><input name="wr_password" id="wr_password" type="password" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 150px;"/></li>
<!-- <li><input name="wr_email" id="wr_email" type="text" class="normal" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:15; width: 150px;"/></li>-->
<?php } ?>
<li><textarea name="wr_content" id="wr_content" style="border: #000000 1px solid; background-color: #000000; font-size: 11px; height:50; width: 100%;"></textarea></li>
<li><button type="submit">댓글 남기기</button></li>
</ul>
</form>
</div></td></tr></table>
</div></td></tr></table>
<div class="board_button">
<div style="float:left;">
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align="absmiddle" border='0'></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" border='0'></a>
<? } ?>
</div>
</div>
<?php } ?>
<!-- 페이지 -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="right"> <div class="paging">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("이전", "이전 페이지", $write_pages);
$write_pages = str_replace("처음", "처음", $write_pages);
$write_pages = str_replace("다음", "...", $write_pages);
$write_pages = str_replace("맨끝", "...", $write_pages);
$write_pages = str_replace("이전 페이지</a>", "이전페이지</a> <span class='bar'>|</span> ", $write_pages);
//$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
//$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
</div> </td>
</tr></table>
</div>
</td></tr></table>
<?php if($is_admin) { ?>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:left;">
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
</div>
<div style="float:right;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
<col width="40" />
<col width="50" />
<? if ($is_good) { ?><col width="40" /><? } ?>
<? if ($is_nogood) { ?><col width="40" /><? } ?>
<tr>
<th>번호</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>제 목</th>
<th>글쓴이</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr>
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<b>공지</b>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span class='current'>{$list[$i][num]}</span>";
else
echo $list[$i][num];
?>
</td>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td class="subject">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>";
else
echo "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
</td>
<td class="name"><?=$list[$i][name]?></td>
<td class="datetime"><?=$list[$i][datetime2]?></td>
<td class="hit"><?=$list[$i][wr_hit]?></td>
<? if ($is_good) { ?><td class="good"><?=$list[$i][wr_good]?></td><? } ?>
<? if ($is_nogood) { ?><td class="nogood"><?=$list[$i][wr_nogood]?></td><? } ?>
</tr>
<? } // end for ?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<!-- 페이지 -->
<div class="board_page">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
//$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
</div>
<div style="float:right;">
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border='0'></a><? } ?>
</div>
</td></tr></table>
<script type="text/javascript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
if ('<?=$sop?>' == 'and')
document.fsearch.sop[0].checked = true;
if ('<?=$sop?>' == 'or')
document.fsearch.sop[1].checked = true;
} else {
document.fsearch.sop[0].checked = true;
}
</script>
<? if ($is_checkbox) { ?>
<script type="text/javascript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<? } // is_admin ?>
<!-- 유효성 검사 -->
<script>
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: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}
// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
$(f).find('textarea[name=wr_content]').val($(f).find('textarea[name=wr_content]').val().replace(pattern, ""));
if($(f).find('input[name=wr_name]').length > 0)
{
$(f).find('input[name=wr_name]').val($(f).find('input[name=wr_name]').val().replace(pattern, ""));
if ($(f).find('input[name=wr_name]').val() == '')
{
alert('이름이 입력되지 않았습니다.');
$(f).find('input[name=wr_name_placeholder]').focus();
return false;
}
}
if ($(f).find('input[name=wr_password]').length > 0)
{
$(f).find('input[name=wr_password]').val($(f).find('input[name=wr_password]').val().replace(pattern, ""));
if ( $(f).find('input[name=wr_password]').val() == '')
{
alert('패스워드가 입력되지 않았습니다.');
$(f).find('input[name=wr_password_placeholder]').focus();
return false;
}
}
if ($(f).find('input[name=wr_email]').length > 0)
{
if ( $(f).find('input[name=wr_email]').val() == '')
{
alert('이메일이 입력되지 않았습니다.');
$(f).find('input[name=wr_email_placeholder]').focus();
return false;
}
}
if (!$(f).find('textarea[name=wr_content]').val())
{
alert("코멘트를 입력하여 주십시오.");
$(f).find('textarea[name=wr_content]').focus();
return false;
}
return true;
}
if(typeof(JKC) == "undefined") var JKC = {};
(function($){
JKC.Placeholder = function() {
this.initialize.apply(this,arguments);
}
JKC.Placeholder.prototype = {
initialize : function(hash) {
var obj = this;
// 멤버변수 정의
this.hash = this.getHashData(hash);
this.init();
// 이벤트 정의
this.addEvent();
},
// Hash 변수정의
getHashData : function(hash) {
if(typeof(hash.id) == "undefined") hash.id = "placeholder"; // 개체 아이디
if(typeof(hash.element) == "undefined") hash.element = null; // 엘리먼트
if(typeof(hash.str) == "undefined") hash.str = "placeholder"; // 문구
return hash;
},
addEvent : function() {
var obj = this;
var ele = this.getElement();
var ele_place = $(ele).next();
ele_place.focus(function() {
$(this).hide();
ele.show();
ele.focus();
});
ele.blur(function() {
if($(this).val() == "") {
$(this).hide();
ele_place.show();
}
});
},
init : function() {
var ele = this.getElement();
// 보관용 div 생성
$(document.body).append("<div id='placeholder_hiddenbox'></div>");
// 복사
var clone = ele.clone();
if(clone.attr("id").length > 0) {
clone.attr("id",clone.attr("id")+"_placeholder");
}
if(clone.attr("name").length > 0) {
clone.attr("name",clone.attr("name")+"_placeholder");
}
// 복사된 객체 추가
$("#placeholder_hiddenbox").append(clone);
var html = $("#placeholder_hiddenbox").html();
$("#placeholder_hiddenbox").remove();
html = html.replace(/(type=[\'\"]?)password([\'\"]?)/i,"$1text$2");
ele.after(html);
ele.next().val(this.hash.str);
ele.hide();
},
getElement : function() {
if(this.hash.element == null) {
return $("#"+this.hash.id);
} else {
return $(this.hash.element);
}
}
}
})(jQuery);
// 댓글 버튼
$("#comment_button").click(function() {
var ul = $(this).next();
if(ul.hasClass("on")) {
ul.removeClass("on");
ul.slideUp();
} else {
ul.addClass("on");
ul.slideDown();
}
});
<?php if($is_guest) { ?>
var arrPlaceholder = [];
$(".frmWrapper").each(function() {
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_name]"),
str: "이름"
}));
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_password]"),
str: "비밀번호"
}));
arrPlaceholder.push(new JKC.Placeholder({
element: $(this).find("input[name=wr_email]"),
str: "이메일"
}));
});
<?php } ?>
</script>
<!-- 게시판 목록 끝 -->
이메일 부분만 다 찾아서 주석 처리 해 봤는데 자꾸 페이지 오류라고 상태바에 나와서요~ ㅠ
전문가 분들 조언 부탁드려요~!
댓글 전체
마지막에 스크립트도 다 지우신거 맞나요?.
네~~~ 다 지웠는데~~ 밑에 페이지에 오류가 있습니다는 여전히 떠요~ㅜㅜ
한가지 문제가 다 지우니 코멘트가 안나오는 문제가 있었네요~ ㅠㅠ
방법 없을까요?
한가지 문제가 다 지우니 코멘트가 안나오는 문제가 있었네요~ ㅠㅠ
방법 없을까요?