Change <? to <?php and add some formatting

This commit is contained in:
2016-11-17 22:16:26 +01:00
parent 2d5ba7fb8d
commit fb71f8c112
27 changed files with 270 additions and 296 deletions

View File

@@ -1,5 +1,7 @@
<?php
class weather extends Module {
class weather extends Module
{
protected $moduleTitle = 'Météo';
@@ -16,15 +18,17 @@ class weather extends Module {
public function build(){
$ville = $this->getParam('city');
$future_weather = [];
include $this->pathToModule.'includes/GoogleMeteo.php';
echo '<script type="text/javascript" src="'.$this->pathToModule.'js/'.$this->moduleName.'.js"></script>
if (!empty($present_weather)) {
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/>
echo '<div id="weather" style="left:'.$this->getParam("x").'; top:'.$this->getParam("y").';">
'.$ville.'<br/>
<div class="weatherpic"></div>
<strong>'.$present_weather.'</strong><br/>
'.$future_weather1.'<br/>
'.$future_weather2.'
</div>';
'.implode('<br/>', $future_weather).'
</div>';
}
}
}