Accueil/class/Weather.php

26 lines
729 B
PHP

<?php
class weather {
private $params = array();
public function __construct($params){
$this->setParams($params);
$city = $params['city'];
include 'GoogleMeteo.php';
echo '<script type="text/javascript" src="js/jquery.weather.js"></script>
<link rel="stylesheet" type="text/css" href="css/weather.css">';
echo '<div id="weather" style="left:'.$params['x'].'; top:'.$params['y'].';">
<div class="weatherpic"></div>
<strong>'.$present_weather.'</strong><br/>
'.$future_weather1.'<br/>
'.$future_weather2.'
</div>';
}
private function setParams($params){
$this->params = $params;
}
public static function start($params){
$weather = new weather($params);
}
}