
비밀글 대신에
낙서글로 만들어서
이모티콘은 다른걸로 넣어봤는데요
이게 체크박스만 wr_9에 해당이 되는건지..
코드를 잘못짠것 같아서요
리스트상에서 여분필드 wr_9가 전혀 불러오질 않습니다 -.-
체크박스를 체크하고 댓글을 달시
리스트에다가도 제목옆에 이모티콘을 넣는 조건문을 추가하려면
어찌 해야될까여?
도움좀 부탁드릴게여
<!-- 댓글 시작 { --> <div id="bo_vc" class="cmt_wrap<? if($cmt_amt == 0){?> dno<?}?>"> <div class="cmt_top"> <div class="cmt_top_title"><span class="glyphicon glyphicon-comment"></span> 댓글목록</div> </div> <div class="cmt" style="border:0"> <ul> <?php for ($i=0; $i<$cmt_amt; $i++) { $comment_id = $list[$i]['wr_id']; $cmt_depth = ""; // 댓글단계 $cmt_depth = strlen($list[$i]['wr_comment_reply']) * 20; $comment = $list[$i]['content']; /* if (strstr($list[$i]['wr_option'], "secret")) { $str = $str; } */ $comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment); $cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결 ?> <li id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px"<?php } ?>> <div class="inf"> <p style="z-index:<?php echo $cmt_sv; ?>" class="top"> <?php if ($cmt_depth) { ?><img src="<?php echo $board_skin_url ?>/img/icon_reply.gif" class="icon_reply" alt="댓글의 댓글" style="float:left;margin-right:5px"><?php } ?> <a class="iurl"><span class="glyphicon glyphicon-user"></span> <?=get_text($list[$i]['wr_name'])?></a> <?php if ($is_ip_view) { ?> <span style="float:left;color:#666;line-height:16px;margin-left:5px">[<?php echo $list[$i]['ip']; ?>]</span> <?php } ?> <span style="float:left;color:#777;line-height:16px;margin-left:5px">(<time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time>)</span> <?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) { $query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']); if($w == 'cu') { $sql = " select wr_id, wr_content from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); $c_wr_content = $cmt['wr_content']; } $c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w'; $c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w'; ?> <?php if ($list[$i]['is_reply']) { ?><a class="iurl2" href="<?php echo $c_reply_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;">답변</a><?php } ?> <?php if ($list[$i]['is_edit']) { ?><a class="iurl2" href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;">수정</a><?php } ?> <?php if ($list[$i]['is_del']) { ?><a class="iurl2" href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a><?php } ?> <?php } ?> <?php include(G5_SNS_PATH.'/view_comment_list.sns.skin.php'); ?> </p>************************여기 수정했음 ************************************************* <!-- 댓글 출력 --> <!-- <p> 비밀글 비활성화 <?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?> <?php echo $comment ?> </p>--> <p> wr_9 넣음 <?php if ($list[$i]['wr_9']) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_movie.gif" alt="낙서글"><?php } ?> <?php echo $comment ?> </p>**************************************************************************************** <span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 --> <span id="reply_<?php echo $comment_id ?>"></span><!-- 답변 --> <input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>"> <textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea> </div> </li> <?php } ?> </ul> </div> <?php if ($i == 0) { //댓글이 없다면 ?><p id="no_id">등록된 댓글이 없습니다.</p><?php } ?> </div><!-- } 댓글 끝 -->
여기 아래도 수정했습니다
<div class="tbl_wrap ">
<!-- <div>
<input type="checkbox" name="wr_secret" value="secret" id="wr_secret">
<label for="wr_secret">비밀글</label>
</div>-->
<div>
<input type="checkbox" name="wr_9" value="wr_9" id="wr_9">
<label for="wr_9">낙서글</label>
</div>
</div>
답변 2개 / 댓글 1개
질문의 요지가 무엇인지 모르겠네요
1.DB 안에 wr_9 값이 들어가는 소스가 잘못되었는지 라고 물어보시는건지
-->
<input type="checkbox" name="wr_9" value="wr_9" id="wr_9">
<label for="wr_9">낙서글</label>
html 소스는 문제 없습니다.
밑에 답변은 wr_9 라는 것을 출력해서 db 안에 값이 존재 하는지 출력 하라는것입니다.
wr_9 라는 값이 출력이 되어지지 않는다면 입력부분에서 문제가 있겠죠.
입력 부분에서 값이 들어가는지 확인 하시기 바랍니다.
소스상으로는 별 문제가 없는 것 같은데요..음...
print_r2($list[$i]) 정도의 코드로 우선 wr_9에 값이 들어가 있는지 확인해 보시는게 좋을 것 같습니다.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
<?php echo $list[$i]['wr_9'] ?>
요것은 안되서요...
체크박스하고 쓴 댓글은 많이 잇는 상태이고요..