Cheshir 21 02/23/13 11:20 Немогу понять, как превести условие <if test="$author['pp_reputation_points']>2300 && $author['pp_reputation_points']<=2700">gold width60</if> К варианту на php elseif( $member['pp_reputation_points'] >2300 && $member['pp_reputation_points']<=2700 ){$relax_class = 'gold width60';} в таком виде (php) выдает ошибку при загрузке dav... Поделиться сообщением Ссылка на сообщение
Cheshir 21 02/23/13 11:44 Ошибку нашел, почему не загружалось, но классы все равно не подтягиваются... <php> $relax_class = 'zero'; if( $member['pp_reputation_points'] >3100 ){$relax_class = 'gold';} elseif( $member['pp_reputation_points'] >2700 && $member['pp_reputation_points']<=3100 ){$relax_class = 'gold width80';} elseif( $member['pp_reputation_points'] >2300 && $member['pp_reputation_points']<=2700 ){$relax_class = 'gold width60';} elseif( $member['pp_reputation_points'] >1900 && $member['pp_reputation_points']<=2300 ){$relax_class = 'gold width40';} elseif( $member['pp_reputation_points'] >1500 && $member['pp_reputation_points']<=1900 ){$relax_class = 'gold width20';} elseif( $member['pp_reputation_points'] >1300 && $member['pp_reputation_points']<=1500 ){$relax_class = 'green';} elseif( $member['pp_reputation_points'] >1100 && $member['pp_reputation_points']<=1300 ){$relax_class = 'green width80';} elseif( $member['pp_reputation_points'] >900 && $member['pp_reputation_points']<=1100 ){$relax_class = 'green width60';} elseif( $member['pp_reputation_points'] >700 && $member['pp_reputation_points']<=900 ){$relax_class = 'green width40';} elseif( $member['pp_reputation_points'] >500 && $member['pp_reputation_points']<=700 ){$relax_class = 'green width20';} elseif( $member['pp_reputation_points'] >400 && $member['pp_reputation_points']<=500 ){$relax_class = 'gray';} elseif( $member['pp_reputation_points'] >300 && $member['pp_reputation_points']<=400 ){$relax_class = 'gray width80';} elseif( $member['pp_reputation_points'] >150 && $member['pp_reputation_points']<=300 ){$relax_class = 'gray width60';} elseif( $member['pp_reputation_points'] >50 && $member['pp_reputation_points']<=150 ){$relax_class = 'gray width40';} elseif( $member['pp_reputation_points'] >=1 && $member['pp_reputation_points']<=50 ){$relax_class = 'gray width20';} elseif( $member['pp_reputation_points'] <0 && $member['pp_reputation_points']>=-15 ){$relax_class = 'red width20';} elseif( $member['pp_reputation_points'] <-15 && $member['pp_reputation_points']>=-30 ){$relax_class = 'red width40';} elseif( $member['pp_reputation_points'] <-30 && $member['pp_reputation_points']>=-45 ){$relax_class = 'red width60';} elseif( $member['pp_reputation_points'] <-45 && $member['pp_reputation_points']>=-60 ){$relax_class = 'red width80';} elseif( $member['pp_reputation_points'] <-60 ){$relax_class = 'red';} </php> <div style="padding-left:20px;"> <div style="width:10% !important;" class="reputation-bg_post" data-tooltip="Общий рейтинг (Релаксы): {$member['pp_reputation_points']}"> <div class="reputation-bar_post {$relax_class}">{$member['pp_reputation_points']} </div> </div> </div> Что не так? Поделиться сообщением Ссылка на сообщение