? my ($company,$company_en,$update, $kyoukyuu_kw, $kyoukyuu_time,$maxpower_kw,$maxpower_time,$today_persent,$maxupdate,$results,$qrurl,$flg,$mon,$day) = @_;

| ? if ($kyoukyuu_kw+0 ne 0) {
Update: |
Max power supply: | mi.kW ()
Forecasted max power: | mi.kW ()
Forecasted max usage: | %
Forecasted update: |
? } else {
/'s supply results
? } ? if ($company eq '東京電力' || $company eq '東北電力') {
Select Date: | /
? }

? if ($company eq '東京電力' || $company eq '東北電力') { ? if($flg eq 1) {
Date | Time | Today | Usage | Yesterday | Diff Yesterday | Yeah 2011 | Yeah 2010 | Yeah 2009 | Yeah 2008
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
? } else {
Date | Time | Today | Usage | Yesterday | Diff Yesterday
? } ? } elsif ($company eq '関西電力') {
Date | Time | Today | Forecast | Usage | Yesterday | Diff Yesterday
? } elsif ($company eq '中部電力') {
Date | Time | Today | Forecast | Usage | Yesterday | Diff Yesterday | Last Week | Diff Last Week
? } else {
Date | Time | Today | Yesterday | Usage | Diff Yesterday
? } ? my $cflg=0; ? for my $i (0 .. $#$results) { my $r = $results->[$i]; ? if ($r->{persent}+0 eq 0 && $cflg eq 0) {
? } else { ? $cflg = 1; ? my $bgcolor; ? if ($r->{persent} >= 99) { ? $bgcolor="#f8696b"; ? } elsif($r->{persent} >= 97) { ? $bgcolor="#fa8370"; ? } elsif($r->{persent} >= 95) { ? $bgcolor="#fb9d75"; ? } elsif($r->{persent} >= 93) { ? $bgcolor="#fdb87b"; ? } elsif($r->{persent} >= 90) { ? $bgcolor="#fed280"; ? } elsif($r->{persent} >= 86) { ? $bgcolor="#ffeb84"; ? } elsif($r->{persent} >= 83) { ? $bgcolor="#dfe282"; ? } elsif($r->{persent} >= 80) { ? $bgcolor="#c0d980"; ? } elsif($r->{persent} >= 75) { ? $bgcolor="#a1d07e"; ? } elsif($r->{persent} >= 70) { ? $bgcolor="#82c77c"; ? } else { ? $bgcolor="#63be7b"; ? }
? } {date} ?> | {time} ?> | ? if ($r->{today_power}+0 ne 0) { {today_power} ?>mi.kW ? } else { none ? } ? if (1) { | ? if ($r->{forecast_power}+0 ne 0) { {forecast_power} ?>mi.kW ? } else { none ? } ? } ? if (1) { ? } else { | ? if ($r->{yesterday_power}+0 ne 0) { {yesterday_power} ?>mi.kW ? } else { none ? } ? } | ? if ($r->{persent}+0 ne 0) { {persent} ?>% ? } ? if (1) { | ? if ($r->{yesterday_power}+0 ne 0) { {yesterday_power} ?>mi.kW ? } else { none ? } ? } | ? if ($r->{today_power} ne 0 && $r->{yesterday_power}+0 ne 0) { {diff} ?>mi.kW ? } ? if($company eq '中部電力') { | ? if($r->{lastweek_power}+0 ne 0) { {lastweek_power} ?>mi.kW ? } else { none ? } | ? if($r->{today_power}+0 ne 0 && $r->{lastweek_power}+0 ne 0) { {diffweek} ?>mi.kW ? } ? } ? if (($company eq '東京電力' || $company eq '東北電力') && $flg eq 1) { | ? if ($r->{power2011}+0 ne 0) { {power2011} ?>mi.kW ? } else { none ? } | ? if ($r->{power2010}+0 ne 0) { {power2010} ?>mi.kW ? } else { none ? } | ? if ($r->{power2009}+0 ne 0) { {power2009} ?>mi.kW ? } else { none ? } | ? if ($r->{power2008}+0 ne 0) { {power2008} ?>mi.kW ? } else { none ? } ? }
? }

[Return] ? if($company_en =~/TEPCO/) { [Update] [View usage for 4 years old] {TEPCO's official power usage graph] ? } elsif($company_en =~/KEPCO/) { [Update] ? } elsif($company eq '東北電力') { [Update] [View usage for 3 years old] ? } else { [Update] ? } ? if ($qrurl) {
If you have mobile phone to transfer this result, use this barcode.
? }