공지체크 클래스 추가

공지체크 클래스 추가

QA

공지체크 클래스 추가

본문

공지로 체크된 글일 경우, <div class="webzin_list">여기에 클래스 notice를 추가해서

공지글의 배경컬러를 주고 싶은데 어떻게해야하나요?

 


    <?php for ($i=0; $i<count($list); $i++) {
        $classes = array();
        
        $classes[] = 'gall_li';
        $classes[] = 'col-gn-'.$bo_gallery_cols;
        if( $i && ($i % $bo_gallery_cols == 0) ){
            $classes[] = 'box_clear';
        }
        if( $wr_id && $wr_id == $list[$i]['wr_id'] ){
            $classes[] = 'gall_now';
        }
        $content = strip_tags($list[$i]['wr_content']); 
     ?>
    <div class="webzin_list">
        <ul>
            <li>
                <div class="gall_chk">
                    <?php if ($is_checkbox) { ?>
                        <label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
                        <input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
                    <?php } ?>
                    <span class="sound_only">
                        <?php
                        if ($wr_id == $list[$i]['wr_id'])
                            echo "<span class=\"bo_current\">열람중</span>";
                        else
                            echo $list[$i]['num'];
                         ?>
                    </span>
                </div>
                
                
 
                
                <a href="<?php echo $list[$i]['href'] ?>">
                <?php
                if ($list[$i]['is_notice']) { // 공지사항   
                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
                    if($thumb['src']) {
                        $img_content = '<img  src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
                         
                    } else {
                        $img_content = '<span class="no_image">no image</span>';
                    }
                    echo $img_content;
     
                   } else {
                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
                    if($thumb['src']) {
                        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
                    } else {
                        $img_content = '<span class="no_image">no image</span>';
                    }
                    echo $img_content;
                }
                ?>
                </a>
                
                
                
                
            </li>
            <li>
                <div>
                    <p>
                        <?php
                        // echo $list[$i]['icon_reply']; 갤러리는 reply 를 사용 안 할 것 같습니다. - 지운아빠 2013-03-04
                        if ($is_category && $list[$i]['ca_name']) {
                         ?>
                        <a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
                        <?php } ?>
                        <a href="<?php echo $list[$i]['href'] ?>" class="bo_tit">
                            <?php echo $list[$i]['subject'] ?>
                            <?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><span class="cnt_cmt">+ <?php echo $list[$i]['wr_comment']; ?></span><span class="sound_only">개</span><?php } ?>
                            <?php
                            // if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
                            // if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
                            if (isset($list[$i]['icon_new'])) echo rtrim($list[$i]['icon_new']);
                            if (isset($list[$i]['icon_hot'])) echo rtrim($list[$i]['icon_hot']);
                            //if (isset($list[$i]['icon_file'])) echo rtrim($list[$i]['icon_file']);
                            //if (isset($list[$i]['icon_link'])) echo rtrim($list[$i]['icon_link']);
                            if (isset($list[$i]['icon_secret'])) echo rtrim($list[$i]['icon_secret']);
                             ?>
                         </a>
                    </p>
                    <p>
                        
                        <i class="fa fa-clock-o" aria-hidden="true"></i> 작성일 : <?php echo $list[$i]['datetime2'] ?> / 
                        <i class="fa fa-eye" aria-hidden="true"></i> 조회수 : <?php echo $list[$i]['wr_hit'] ?>
                        <?php if ($is_good) { ?>| <span class="sound_only">추천</span><strong><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> <?php echo $list[$i]['wr_good'] ?></strong><?php } ?>
                        <?php if ($is_nogood) { ?>| <span class="sound_only">비추천</span><strong><i class="fa fa-thumbs-o-down" aria-hidden="true"></i> <?php echo $list[$i]['wr_nogood'] ?></strong><?php } ?>
                    </p>
                    
                    

                </div>
                <div>
                    <a href="<?php echo $list[$i]['href'] ?>">
                        <p><?=$content?></p>
                    </a>
                </div>
            </li>
        </ul>
    </div>
    <?php } ?>
    <?php if (count($list) == 0) { echo "<div class=\"empty_list\" datano='no'>게시물이 없습니다.</div>"; } ?>
 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 123,524 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT