コード例 #1
0
ファイル: index.php プロジェクト: Eu-JinOoi/NightOwl
                            echo "<span style='color:green;'>SET</span>";
                        } else {
                            echo "<span style='color:red;'>NOT SET</span>";
                        }
                    }
                    echo "<br><br>";
                }
                echo "<br><hr><br>";
            }
        }
    }
}
//New Place
$DLRA = new place("Disneyland Park");
$DCA = new place("Disney California Adventure Park");
//Address
$DLRA->addAddress($address1, $address2, $city, $state, $zip, $country, $latitude, $longitude);
$DCA->addAddress($address1, $address2, $city, $state, $zip, $country, $latitude2, $longitude2);
//Details
$DLRA->addDetails($phone, $type, $drivethru, $wifi, $plus18, $plus21, $alcohol, 1);
$DCA->addDetails($phone, $type, $drivethru, $wifi, $plus18, $plus21, $alcohol2, 7);
//Time Settings
$DLRA->timeSettings($timezone, $dlst);
$DCA->timeSettings($timezone, $dlst);
parseJSON($json);
if (!$DLRA->hoursSet() || !$DCA->hoursSet()) {
    echo "<h2>Loading 2nd</h2>";
    parseJSON($json2);
}
$DLRA->writeDB();
$DCA->writeDB();
コード例 #2
0
ファイル: index-orig.php プロジェクト: Eu-JinOoi/NightOwl
                echo $park["parkHours"] . "<br>";
                $hrs = explode(" - ", $park["parkHours"]);
                $o = convertDHours($hrs[0]);
                $c = convertDHours($hrs[1]);
                $is24 = 0;
                if ($o == $c) {
                    echo "<span style='color:green; font-weight:bolder;'>OPEN 24 HOURS!</span><br>";
                    $is24 = 1;
                } else {
                    echo "Opens at: " . $o . "<br>";
                    echo "Closes at: " . $c . "<br>";
                }
                if ($park["title"] == "Disneyland Park" && !$DLRA->hoursSet()) {
                    $DLRA->addHours($dow, $o, $c, $is24, 0);
                    echo "<span style='color:green;'>SET</span>";
                } else {
                    if ($park["title"] == "Disney California Adventure Park" && !$DCA->hoursSet()) {
                        $DCA->addHours($dow, $o, $c, $is24, 0);
                        echo "<span style='color:green;'>SET</span>";
                    } else {
                        echo "<span style='color:red;'>NOT SET</span>";
                    }
                }
                echo "<br><br>";
            }
            echo "<br><hr><br>";
        }
    }
}
$DLRA->writeDB();
$DCA->writeDB();