2010-09-15 16:55:54 +02:00
|
|
|
<?php
|
2010-09-20 11:40:27 +02:00
|
|
|
class weather extends Module {
|
2010-09-27 12:48:53 +02:00
|
|
|
|
2010-10-05 17:30:04 +02:00
|
|
|
protected $moduleTitle = 'Météo';
|
2010-09-27 12:48:53 +02:00
|
|
|
|
2010-10-06 10:24:08 +02:00
|
|
|
protected $paramsList = array(
|
2010-09-15 23:36:14 +02:00
|
|
|
'visibility',
|
|
|
|
'city',
|
|
|
|
'x',
|
|
|
|
'y'
|
|
|
|
);
|
2010-09-20 11:40:27 +02:00
|
|
|
|
2010-09-15 16:55:54 +02:00
|
|
|
public function __construct($params){
|
2010-10-05 17:30:04 +02:00
|
|
|
parent::__construct(__CLASS__, $params);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function build(){
|
|
|
|
$ville = $this->getParam('city');
|
2010-09-27 12:48:53 +02:00
|
|
|
include $this->pathToModule.'includes/GoogleMeteo.php';
|
|
|
|
echo '<script type="text/javascript" src="'.$this->pathToModule.'js/'.$this->moduleName.'.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="'.$this->pathToModule.'css/'.$this->moduleName.'.css">';
|
2010-10-05 17:30:04 +02:00
|
|
|
echo '<div id="weather" style="left:'.$this->getParam("x").'; top:'.$this->getParam("y").';">
|
2010-09-17 15:38:57 +02:00
|
|
|
'.$city.'<br/>
|
2010-09-15 16:55:54 +02:00
|
|
|
<div class="weatherpic"></div>
|
|
|
|
<strong>'.$present_weather.'</strong><br/>
|
|
|
|
'.$future_weather1.'<br/>
|
|
|
|
'.$future_weather2.'
|
2010-10-05 17:30:04 +02:00
|
|
|
</div>';
|
2010-09-20 16:39:08 +02:00
|
|
|
}
|
2010-09-15 16:55:54 +02:00
|
|
|
}
|