I dont know how your calculations would go about, but you could probably have just one script, and adjust a few values depending on the zone? Then you wouln't have to duplicate lots of code in each seperate script.
As a simplified example to show what I mean, lets say I want to calculate the cost of only electricity for different zones, and I know that if you live in zone1 each kWh costs 1 (dollar or something), in zone2 they cost 2 and in zone3 they cost 3.
I'll just put this value in my formula, as in
PHP Code:
switch($zone) { case 'zone1': $m = 1; break; case 'zone2': $m = 2; break; case 'zone3': $m = 3; break; default: $m = 1; break; }
$cost = some_advanced_calculations() * $m;
For your script maybe you'll need more than one variable $m. As I said, I dont know how your calculations would be like. But you could probably still set up some variables for each zone, so that they all could use the same calculation script.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
Last edited by lizciz; 10-02-2009 at 05:02 PM..
|