별점 주는 소스
본문
img 폴더에 별점 png이미지 넣었고요
그런데 왜
이렇게 나오나요?
올래는
이런식으로 나와야하는데...
<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>