출력변수문제

출력변수문제

QA

출력변수문제

답변 1

본문

outlogin에 활동점수와 이번주 랭킹 출력되는부분입니다.
활동점수는 0이상일시 무조건 출력되고
랭킹은 $rank_limit 값 안에 해당하는 사람만 출력하게 하고싶은데
아무리 바꿔봐도 도통 안되네요 ;;;;;;;
 
// 활동지수와 주간 순위 - 2012.11.24
$rank_limit = 3000;
global $activity_point_equation;
$result = sql_query(" SELECT mb_id, mb_level, mb_deal, $activity_point_equation AS actpoint, $activity_point_equation - mb_apoint_week AS this_week
      FROM $g4[member_table] WHERE 1 = 1
      ORDER BY this_week DESC LIMIT 0, $rank_limit ");
$my_actpoint = -1; $my_week_act_rank = -1;
$i = 1;
while ($row = sql_fetch_array($result)) {
 if ($row['mb_id']==$member['mb_id']) {
  $my_actpoint = $row['actpoint'];
  $my_week_act_rank = $i;
  break;
 }
 if ($row['mb_level']<48 && $row['mb_deal']==0) $i++;  // 순위는 8레벨 미만, 딜러가 아닌 경우만 ..
}
 
?>
 
<? if ($my_actpoint>0) { ?><span class='text11 fontb'>활동점수 <?echo number_format($my_actpoint)?> (이번주 <?=$my_week_act_rank?>위)</span><?}?>
 
제가 바꿔보것.
<? if ($my_actpoint>0) { ?><span class='text11 fontb'>활동점수 <?echo number_format($my_actpoint)?><?}?> <? if ($my_week_act_rank < $rank_limit) {?>(이번주 <?=$my_week_act_rank?>위)</span><?}?>

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로