리스트에서 별표5개와 0/100점 이 뜨는 부분입니다.
리스트순서를 별점이 높은 순서대로 불러오고 싶은데
adm/board_form.php에 어찌 수정해야되는지요/..?
<div class="td_subject" style="text-align:right">
<?php
$use_count = 0;
for ($jj=3; $jj<11; $jj++) {
if($board['bo_'.$jj.'_subj']==''){
continue;
}
$use_count++;
}
$point_parent_id = $list[$i]['wr_id'];
$point_sql = " select sum(wr_2+wr_3+wr_4+wr_5+wr_6+wr_7+wr_8+wr_9+wr_10) sum_point, (select count(*) from $write_table where wr_parent = '$point_parent_id' and wr_is_comment = '1') point_count from $write_table where wr_parent = '$point_parent_id' and wr_is_comment = '1' ";
$point_cmt = sql_fetch($point_sql);
$sum_point = $point_cmt['sum_point']==''? 0 : $point_cmt['sum_point'];
$point_count = $point_cmt['point_count']==''? 0 : $point_cmt['point_count'];
$calc_point = $point_count==0 ? 0 : $sum_point/($point_count*$use_count)/$board['bo_1']*100;
?>
<div class="star">
<?php for ($si=0; $si < floor($calc_point*0.05); $si++){ ?>
<img src="<?php echo $board_skin_url; ?>/img/icon_star.png" width="16" height="16">
<?php } ?>
<?php for ($si=0; $si < 5-floor($calc_point*0.05); $si++){ ?>
<img src="<?php echo $board_skin_url; ?>/img/icon_gray_star.png" width="16" height="16">
<?php } ?>
</div>
<!--<b style="color:#2E2E2E"><?php echo floor($calc_point); ?> / 100점</b>-->
</div>
이부분을 어찌 수정해야되는지요..?별점이 높은 순으로 글을 불러오고 싶습니다.
<option value="point_sql asc" <?php echo get_selected($board['bo_sort_field'], "point_sql asc"); ?>>point_sql asc : 별점높은순</option>