30 lines
871 B
PHP
30 lines
871 B
PHP
<?php
|
|
class weather extends Module {
|
|
|
|
protected $moduleTitle = 'Météo';
|
|
|
|
protected $paramsList = array(
|
|
'visibility',
|
|
'city',
|
|
'x',
|
|
'y'
|
|
);
|
|
|
|
public function __construct($params){
|
|
parent::__construct(__CLASS__, $params);
|
|
}
|
|
|
|
public function build(){
|
|
$ville = $this->getParam('city');
|
|
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">';
|
|
echo '<div id="weather" style="left:'.$this->getParam("x").'; top:'.$this->getParam("y").';">
|
|
'.$city.'<br/>
|
|
<div class="weatherpic"></div>
|
|
<strong>'.$present_weather.'</strong><br/>
|
|
'.$future_weather1.'<br/>
|
|
'.$future_weather2.'
|
|
</div>';
|
|
}
|
|
} |