회원 레벨에 따라 표시가 안보이고 보이게 하는 방법이요...
본문
레벨 2이하인 경우 : 할인율과 공급가가 *** 표시로 보이고
레벨 3 이상인 회원일 경우 할인율과 공급가가 보였으면 합니다.
첨부파일로 해당 스킨 올렸습니다.
고수님들 답변 부탁 드리겠습니다. ^^
아래는 해당 스킨입니다.
===============================================================================
<td align=left style='word-break:break-all; padding-top:15px; padding-bottom:15px;'>
<td width=100><span style='font:normal 11px tahoma; color:#BABABA;'>
<tr>
<td width=130 align='center'>
<?
if($member[mb_id] == $list[$i][mb_id] || $is_admin) { //관리자 또는 자기 자신일 경우
echo <<<HEREDOC
<a href="{$list[$i][href]}"><img src="../data/file/$bo_table/$imagee" onmouseover="this.style.filter='gray alpha(opacity=60)'" onmouseout="this.style.filter=''" border="0" width='100' height='120'></a>
HEREDOC;
// echo "<a href='{$list[$i][href]}'>";
// echo $img;
// echo "</a>";
} else {
echo <<<HEREDOC
<a href="{$list[$i][href]}"><img src="../data/file/$bo_table/$imagee" onmouseover="this.style.filter='gray alpha(opacity=60)'" onmouseout="this.style.filter=''" border="0" width='100' height='120'></a>
HEREDOC;
// echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
// echo $img;
// echo "</a>";
}
echo "<br>";
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
//if ($is_category && $list[$i][ca_name]) {
//echo "<span class=small><font color=gray>[<a //href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
//}
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
// echo " " . $list[$i][icon_new];
// echo $nobr_end;
echo "</div>";
?>
</td>
<td valign=top width=400>
<? echo "<a href='{$list[$i][href]}' $style>";
echo "<span style='font-size:11pt;'><font color='444444'><b>".$list[$i][subject]."</b></font></span>";
echo "</a>";?><br>
<?
echo "<br>";
echo "<font color='FD7272'><b> 소비자가 </b>: <strike>".number_format($list[$i][wr_9])."</strike> 원 [할인율]</font>";
echo "<font size=2 color='#287801'><b>";
echo round(($list[$i][wr_9]-$list[$i][wr_1])/$list[$i][wr_9]*100,1);
echo "%</font></b>";
echo "<br>";
echo "<font color='0C1480'> 공급가 : <b>".number_format($list[$i][wr_1])."</b> 원</font>";
echo "<br>";
?>
제품 소개<br>
<font color=#AAAAAA><?=cut_str(strip_tags($list[$i][wr_content]),140,"…")?></font>
</td>
<td width=10></td>
</tr>
</table>
</td>
</td>
<td align=center width=0><!--<nobr style='display:block; overflow:hidden; width:105px;'><?=$list[$i][name]?>--></nobr></td>
<!---<td width=40><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][datetime2]?></span></td>--->
<td width=100><span style='font:normal 11px tahoma; color:#BABABA;'>
답변 3
$discount_rate = $member['mb_level'] > 2 ? round(($list[$i][wr_9]-$list[$i][wr_1])/$list[$i][wr_9]*100,1) : "****";
$supply_price = $member['mb_level'] > 2 ? number_format($list[$i][wr_1]) : "****";
echo "<font color='FD7272'><b> 소비자가 </b>:
<strike>".number_format($list[$i][wr_9])."</strike> 원
[할인율]</font>";
echo "<font size=2 color='#287801'><b>";
echo $discount_rate;
echo "%</font></b>";
echo "<br>";
echo "<font color='0C1480'> 공급가 : <b>".$supply_price."</b> 원</font>"; echo "<br>";
if($member[mb_level]<=2){
echo <b> 소비자가 </b>: *** 원 [***]</font>";
}else if($member[mb_level]>=3){
echo "<font color='FD7272'><b> 소비자가 </b>: <strike>".number_format($list[$i][wr_9])."</strike> 원 [할인율]</font>";
}else{
}
두분 모두 정말 감사합니다.
잘 되네요 ^^