Ajout des class pour chaque module et pour la config du site, Correction module météo en cas de ville non trouvée, Correction d'ajout de tâche dans Todoist,
This commit is contained in:
26
class/Weather.php
Normal file
26
class/Weather.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user