I have a function like this
function cp_module_ranks_getRank($uid){
return cp_module_ranks_pointsToRank(cp_getPoints($uid));
}
It returns the member rank based on points i set. For example my settings has
- 250 Points = Bronze
- 1000 Points = Silver
- 2500 Points = Gold
- 10000 Points = Diamond
- 25000 Points = Platinum
So if a user has 11234 points then that function return value as Diamond
Now i would like to set a variable based on this rank.
$affdays is the variable
I mean like this
If user rank is Bronze $affdays = 30
If user rank is Silver $affdays = 60
If user rank is Gold $affdays = 90
If user rank is Diamond $affdays = 180
If user rank is Platinum $affdays = 360
Default $affdays = 10
Thanks.