Accueil/modules/weather/Weather.php

30 lines
878 B
PHP
Raw Normal View History

<?php
2010-09-20 11:40:27 +02:00
class weather extends Module {
2010-09-27 12:48:53 +02:00
protected $moduleTitle = 'Météo';
2010-09-27 12:48:53 +02:00
2010-09-20 11:40:27 +02:00
protected static $paramsList = array(
2010-09-15 23:36:14 +02:00
'visibility',
'city',
'x',
'y'
);
2010-09-20 11:40:27 +02:00
public function __construct($params){
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">';
echo '<div id="weather" style="left:'.$this->getParam("x").'; top:'.$this->getParam("y").';">
2010-09-17 15:38:57 +02:00
'.$city.'<br/>
<div class="weatherpic"></div>
<strong>'.$present_weather.'</strong><br/>
'.$future_weather1.'<br/>
'.$future_weather2.'
</div>';
}
}