글쓰기 전의 게시판 목록에선 스크립트가 먹히는데
글쓰기를한뒤 게시판 목록을 보면 스크립트가 안먹히네요..
검색을 해서 common.lib부분의 악성코드 정의하는 부분에 script를 없애도 똑같네요,,,
안될려면 전부다 안되야 할텐데...
이상하게 글쓰기를 한 뒤에만 게시판 목록 스크립트가 먹히질 않네요...
게시판의 목록부분에서 스크립트 차단을 정의하는 소스가 따로있나요??
list부분의 소스입니다.
<div class="wrap">
<div class="aside mCustomScrollbar light" data-mcs-theme="minimal">
<div class="category_sub" tabindex="1" >
<a href="<?php echo G5_BBS_URL?>/board.php?bo_table=Document&sca=<?php echo $sca?>" style="color:white; " ><?php echo $sca;?></a>
</div>
<?php if($is_admin){?>
<div class="menu_add"><a target="iframe_list" href="<?php echo G5_BBS_URL ?>/write.php?bo_table=<?php echo $bo_table?>&sca=<?php echo $sca?>">+ 메인메뉴 추가</a></div>
<?php }?>
<!-- 해당 카테고리 리스트 부분 출력 -->
<table>
<?php for($j; $j < count($list); $j++){
$reply_href = G5_BBS_URL.'/write.php?w=r&bo_table='.$bo_table.'& wr_id='.$list[$j]['wr_id'].$qstr;
$delete_href =G5_BBS_URL.'/delete.php?bo_table='.$bo_table.'&wr_id='.$list[$j]['wr_id'].'&token='.$token.'&page='.$page.urldecode($qstr);
?>
<tr>
<td class="category_subject" style="position: relative; top: 100px; font-size: 18px; width: 600px;">
<?php if(!$list[$j]['wr_reply']){?>
<div class="reply_main">
<a class="reply_1" onclick="listCa(<?php echo $list[$j]['wr_id']?>)" style=" text-decoration: none; color: #b3b3b3; position: relative; top: 13px; left: 5px;" target="iframe_list" href=" <?php echo $list[$j]['href'] ?>"><?php echo $list[$j]['subject'].' '?></a>
<?php if($is_admin){?>
<a target="iframe_list" href="<?php echo $delete_href?>" onclick="del(this.href); return false;" style="font-size: 15px; float: right; border: 1px solid #b3b3b3; border-radius:5px; width: 50px; text-align: center; color: #b3b3b3; position:relative; top: 13px; right:5px; text-decoration: none;" >삭제</a>
<a target="iframe_list" href="<?php echo $reply_href?>" style=" text-decoration: none; font-size: 15px; float: right; border: 1px solid #b3b3b3; border-radius:5px; width: 50px; text-align: center; position: relative; right:15px; top: 13px; color: #b3b3b3;">추가</a>
<?php }?>
<br>
<br>
</div>
<?php }else {?>
<div class="reply_sub ca<?php echo $list[$j]['wr_1']?>">
<a class="reply_sub_1" style="font-size:16px; margin-left:20px; text-decoration: none;color: #b3b3b3; position: relative; top: 13px; left: 5px;" target="iframe_list" href=" <?php echo $list[$j]['href'] ?>"><?php echo $list[$j]['subject'].' '?></a>
<?php if($is_admin){?>
<a target="iframe_list" href="<?php echo $delete_href?>" onclick="del(this.href); return false;" style="font-size: 15px; float: right; border: 1px solid #b3b3b3; border-radius:5px; width: 50px; text-align: center; color: #b3b3b3; position:relative; top: 13px; right:5px; text-decoration: none;" >삭제</a>
<a target="iframe_list" href="<?php echo $reply_href?>" style=" text-decoration: none; font-size: 15px; float: right; border: 1px solid #b3b3b3; border-radius:5px; width: 50px; text-align: center; position: relative; right:15px; top: 13px; color: #b3b3b3;">추가</a>
<?php }?>
<br>
<br>
</div>
<?php }?>
</td>
</tr>
<?php }?>
</table>
</div>
</div>
그리고 밑은 스크립트 소스입니다.
<script>
$('.reply_sub').css('display', 'none');
function listCa(no) {
$('.ca'+no).show();
var checkElement = $('.ca'+no);
if((checkElement.is('.reply_sub')) && (checkElement.is(':visible'))){
$('.reply_sub').css('display', 'none');
checkElement.show();
}else{
$('.reply_sub').css('display', 'none');
}
}
$('.reply_1').click(function(){
$(this).css('color', 'black');
var mainColor = $(this);
if(mainColor.css('color', 'black')){
$('.reply_1').css('color', '#B3B3B3');
$('.reply_1').css('font-weight', 'normal');
$('.reply_1').parent().css('background', '#343131');
mainColor.css('color', 'black');
mainColor.css('font-weight', 'bold');
mainColor.parent().css('background', 'white');
}
});
</script>
답변 1개
스크립트는 페이지 고정이라 리스트들어갔다가 왔다고 해서
변하는 부분은 없습니다.
문제가되는 스크립트를 찾으시고 한줄씩 주석 처리또는
alert로 값 표시해가면서 어느라인에서 문제인지
전후를 비교해보세여
답변을 작성하려면 로그인이 필요합니다.