Пример #1
0
* Generic dashboard for displaying time and weather.
* 1.1 Implementing basic MVC style separation of business logic from view.
*****************************/
//include files
include_once "weather.php";
include_once "time.php";
include_once "getStocks.php";
include_once "navbar.php";
//DEBUG MODE
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
//pull in the weather class
$weather = new weather();
$weatherWidget = $weather->weatherWidgetHTML();
$currentWeather = $weather->todaysWeather();
$tomorrowsWeather = $weather->tomorrowsWeather();
//extract the stocks
$stocks = new stockPrices();
$currentPrices = $stocks->getStocksDiv();
//pull in the time object and provide weather info
$time = new Time();
$welcomeWidget = $time->welcomeWidget($currentWeather, $tomorrowsWeather);
$timeNatLangWidget = $time->timeNaturalLanguage(1);
$wallpaperOverride = $time->wallpaperCss();
//import the navbar
$navObj = new NavBar();
$navBar = $navObj->generateMenu('home');
?>
<html>
  
<head>