Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Meteostation/Meteostation.php

    r586 r738  
    99  var $ShortTitle = 'Meteostanice';
    1010  var $ParentClass = 'PagePortal';
    11  
     11
    1212  function Show()
    1313  {
     
    2424  var $Period;
    2525  var $URL;
    26  
     26
    2727  function DownloadData()
    2828  {
    2929    $XmlData = simplexml_load_file($this->URL);
    3030
    31     $Data = array('MeteoStation' => $this->Id, 
     31    $Data = array('MeteoStation' => $this->Id,
    3232      'WindSpeed' => trim($XmlData->windspeed),
    3333      'WindDir' => trim($XmlData->winddir),
     
    4343    );
    4444    $this->Database->insert('MeteoStationMeasure', array(
    45       'Time' => TimeToMysqlDateTime(time()), 'MeteoStation' => $Data['MeteoStation'], 
    46       'WindSpeed' => $Data['WindSpeed'], 'WindDir' => $Data['WindDir'], 
    47       'WindGust' => $Data['WindGust'], 'Pressure' => $Data['Pressure'], 
     45      'Time' => TimeToMysqlDateTime(time()), 'MeteoStation' => $Data['MeteoStation'],
     46      'WindSpeed' => $Data['WindSpeed'], 'WindDir' => $Data['WindDir'],
     47      'WindGust' => $Data['WindGust'], 'Pressure' => $Data['Pressure'],
    4848      'SysTemp' => $Data['SysTemp'], 'Temperature' => $Data['Temperature'],
    4949      'BarAltitude' => $Data['BarAltitude'], 'WindChill' => $Data['WindChill'],
     
    5252    $this->Data = $Data;
    5353  }
    54  
     54
    5555  function CreateImage($FileName)
    5656  {
     
    6565    $Image->SaveToFile($FileName);
    6666  }
    67  
     67
    6868  function LoadFromDb()
    6969  {
     
    7979{
    8080  var $Data;
    81  
     81
    8282  function __construct($System)
    8383  {
     
    9090    $this->Dependencies = array();
    9191  }
    92  
     92
    9393  function DownloadAll()
    9494  {
     
    9898      $MeteoStation = new MeteoStation();
    9999      $MeteoStation->Id = $DbRow['Id'];
    100       $MeteoStation->LoadFromDb();     
     100      $MeteoStation->LoadFromDb();
    101101      $MeteoStation->DownloadData();
    102102      $MeteoStation->CreateImage('cache/'.$DbRow['Id'].'.png');
    103103    }
    104104  }
    105  
    106  
     105
     106
    107107  function DoInstall()
    108108  {
    109109  }
    110  
     110
    111111  function DoUninstall()
    112   {     
     112  {
    113113  }
    114  
     114
    115115  function DoStart()
    116116  {
    117117    $this->System->RegisterPage('meteo', 'PageMeteo');
    118   } 
    119  
     118  }
     119
    120120  function DoStop()
    121   { 
     121  {
    122122  }
    123123}
Note: See TracChangeset for help on using the changeset viewer.