별점 주는 소스

별점 주는 소스

QA

별점 주는 소스

본문

img 폴더에 별점 png이미지 넣었고요

그런데 왜463972260411cdce1761f77ae9553394_1478836791_8924.JPG
이렇게 나오나요?

 

올래는

463972260411cdce1761f77ae9553394_1478836810_28.JPG 

이런식으로 나와야하는데...

 

<view.skin.php>

<?php

  //=======================================================
  // 시작 => 별점평가__있으면
  IF ( (int)$view['wr_1'] > 0 && $view['wr_3'] > 0 )
  {
?>
    <section id="bo_v_info_add">
        <div class="star_icon_div">
            <span class="star_score_span" style="width:<?php echo (int)($view['wr_3']*20); ?>%"></span>
        </div>
        <div style="float:left;padding:4px 0 0 10px;color:#aaa;"><?php echo $view['wr_3']; ?>점 / <?php echo number_format((int)$view['wr_1']); ?>명</div>
    </section>

<?php
  }
  // 끝 => 별점평가__있으면
  //=======================================================

?> 

<view.comment.skin.php>

   <?php
            include(G5_SNS_PATH.'/view_comment_list.sns.skin.php');
            ?>
        </header>

<?php

        //=================================================
        // 별점평가
        $in_star_score_n = (int)$list[$i]['wr_1'];


        //=================================================
        // 시작 => 별점평가__있으면
        IF ( $in_star_score_n > 0 )
        {
?>
            <div class="star_icon_div">
                <span class="star_score_span" style="width:<?php echo ($in_star_score_n*20); ?>%"></span>
            </div><br style="clear:both;">
<?php
        }
        // 끝 => 별점평가__있으면
        //=================================================

?>


        <!-- 댓글 출력 -->
  
      <div style="height:auto;min-height:10px;padding:20px 0px 0px 0px">
        <div style="float:left;padding:0px 10px 0px 0px;text-align:top">
           <?php
           //echo $config[cf_1] + "10";
           // 회원 사진
          $mb1_dir = substr($list[$i][mb_id],0,2);
          $mb_1 = G5_DATA_PATH.'/member_image/'.$mb1_dir.'/'.$list[$i][mb_id].'.gif';
         if (file_exists($mb_1)) { // 등록한 사진이 있는 경우
           $mb_1 = G5_DATA_URL.'/member_image/'.$mb1_dir.'/'.$list[$i]['mb_id'] .'.gif';
          echo '<img src="'.$mb_1.'" alt="">';            
          } else { // 등록한 사진이 없거나 비회원인 경우
          $mb_1 = G5_SKIN_URL.'/board/basic/img/member_no_img.gif';
          echo '<img src="'.$mb_1.'" alt="">';
          }
        ?>
        </div>
        <div>
            <?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
           <?php echo $comment ?>
         </div>
        </div>

 

           <tr>
            <th scope="row">별점평가</th>
                <td style="line-height:2.4em;">
<?php

        //=========================================
        // 시작 => 반복문
        FOR ($i=1; $i<6; $i++)
        {
?>
          <div style="clear:both;float:left;height:20px;">
            <input type="radio" name="start_icon" id="start_icon_<?php echo $i; ?>" value="<?php echo $i; ?>">
          </div>
          <div class="star_icon_div">
            <span class="star_score_span" style="width:<?php echo ($i*20); ?>%"></span>
          </div>
<?php
        }
        // 끝 => 반복문
        //=========================================

?>
            </td>
        </tr>

 

이 질문에 댓글 쓰기 :

답변 1

css 가 빠진거 같은데여

하닌까 되네요 ^^ 그런데 전 별5개평점주는게 하나만 나와서 별을 클릭하면 클릭한 곳에 별이 색칠해져서 평점주고 싶은데 지금건 별평점이 5줄이나 있고 왼쪽에 클릭하는게 있는데 그걸 클릭하면 그중에 선택해서 별평점 주는 방식이네요... 그냥 한줄만나와서 별클릭해서 줄려면 어떻게해야하나요?

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

회원로그인

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