All pastes #1043 Raw Edit

sudoer

public php v1 · immutable
#1043 ·published 2004-09-23 06:20 UTC
rendered paste body
if($continuedial == 1){ ?>        <td align=right bgcolor="<? echo $color; ?>">        <? #echo "OFF";        $this = 1;        $already = 0;        $loadon = 0;        while($this == 1){                        $circuittime = strtotime($circuitdate);                        $future = $rdg_time + (60 * 15);                        $past = $rdg_time - (60 * 15);                        echo "r$rdg_time p$past f $future";                        $past =2123123123123;                        #echo "emtpy: ". empty($rdg_time);                if(isset($rdg_time) && (($past <= $circuittime) && ($circuittime < $rdg_time))){                #if(($rdg_time <= $circuittime) && ($circuittime < $future)){ #the dial switch is inbetween current interval                        #echo "WWWWWWWWWWWWWWW";                /*                        if($already == 1){                                if(ereg("Restore", $circuitchange)){                                        $switch = 'Load ON';                                }elseif(ereg("Alarm", $circuitchange)){                                        $switch = 'Load ON';                                }else{                                $switch = 'UNKNOWN switch';                                }                                $previoustime = $circuitdate;*/                        if($already == 0){                                if(ereg("Restore", $circuitchange)){                                        $switch = 'Load ON';                                        $loadon = 1;                                }elseif(ereg("Alarm", $circuitchange)){                                        $switch = 'Load ON';                                        $loadon = 1;                                }  /*else{                                        $switch = 'UNKNOWN switch';                                }                                */                                echo $switch;                                $already = 1;                        }                        $change++;                        $row2 = mysql_fetch_row($result2);                        $circuitchange = $row2[0];                        $circuitdate = $row2[1];                        #echo "$circuitchange";                        $this = 1;                        #$circuittime = strtotime($circuitdate);                        #$future = $rdg_time + (60 * 15); }else{                        $this = 0;                        if($already == 0){                                if($demand == 0){                                        $switch= '';                                }else{                                        $switch = 'Load shed';                                }                                echo $switch;                        }                }        }        #echo $switch; ?>        </td><? } ?>