Change <? to <?php and add some formatting
This commit is contained in:
@@ -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>';
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user