채택완료

공지 가 하나만 나오고 나머지는 숨어버립니다.

공지를 여러개 체크해도 마지막으로 체크한 공지만 리스트에 나오고

하나씩 공지를 지우면 그이전에 공지한 글이 나옵니다.

아래 소스가 공지 부분인데 어디를 수정하면 되나요??

 

<? for ($i=0; $i<count($list); $i++) { ?>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr align="center"
<? if ($wr_id == $list[$i][wr_id]) { ?>
bgcolor="#FFF9F9"
<? }?>
onmouseover="this.style.backgroundColor='#fafafa'" onmouseout="this.style.backgroundColor=''" style="FILTER:blendTrans(duration=0.5);">
                        <td width="40" height="35">
                          <?php
            if ($list[$i]['is_notice']) // 공지사항
                echo '<strong>공지</strong>';
            else if ($wr_id == $list[$i]['wr_id'])
                echo "<span class=\"bo_current\">열람중</span>";
            else
                echo $list[$i]['num'];
             ?> 

 

 

====

 

<td align=left class="list" style='word-break:break-all;'>
                          <?
       if ($is_checkbox)  
                   
          echo "<input type=checkbox name=chk_wr_id[] value='".$list[$i][wr_id]."' id='chk_wr_id_".$i."'>";

        
       
       
       $style = "";
       if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";

       echo "&nbsp;<a href='{$list[$i][href]}' $style>";

       echo $list[$i][subject];
       echo "</a>";

       if ($sca == '아파트')
        echo $list[$i][ext3_03];

       if ($list[$i][comment_cnt])
        echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";

       
      ?>
                        </td>

|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

count($list 찍어 보세요 아무리도 커리 문제일듯한데 

답변에 대한 댓글 1개

skin.exe.php파일을 인클루드 하면 본문과 같은 문제가 생기는것 같습니다.
한번 살펴보시고 어디를 수정하면 될런지 도움말씀 주시면 감사드립니다.
https://sir.kr/qa/186186

답변을 작성하려면 로그인이 필요합니다.