
Moze zna ktos lepszy pomysl ...
<?php class OnlineMeter { $diff = $_SESSION['omgcts']; if($traffic == LOW_TRAFFIC) $peak = 5; else if($traffic == MID_TRAFFIC) $peak = 10; else if($traffic == HIGH_TRAFFIC) $peak = 50; else if($traffic == ELITE_TRAFFIC) $peak = 1000; if($h < 1) $peak*=0.9; else if($h < 3) $peak*=0.4; else if($h < 5) $peak*=0.01; else if($h < 8) $peak*=0.2; else if($h < 10) $peak*=1.1; else if($h < 12) $peak*=1.5; else if($h < 15) $peak*=2.1; else if($h < 19) $peak*=3.1; else $peak*=4.1; } return $_SESSION['omgc'] ? $_SESSION['omgc'] : 0; } } ?>
<?php ?>