Changeset 873 for trunk/Modules/WebCam


Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
Location:
trunk/Modules/WebCam
Files:
2 edited

Legend:

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

    r860 r873  
    99  function Show()
    1010  {
    11     if(file_exists($this->System->ModuleManager->Modules['WebCam']->ImageFileName))
     11    if (file_exists($this->System->ModuleManager->Modules['WebCam']->ImageFileName))
    1212    {
    1313      $Output = '<script language="JavaScript">
     
    3838      '<a href="http://www.mestovsetin.cz/vismo/dokumenty2.asp?id_org=18676&id=480245">Webové kamery ve Vsetíně</a><br />';
    3939
    40     return($Output);
     40    return ($Output);
    4141  }
    4242}
     
    7272    $Output .= '<a href="//www.zdechov.net/kamery/?Id=3"><img alt="Skiareál, motokrosová grapa" width="140" height="79" src="//www.zdechov.net/images/webcam/webcam3.jpg" /></a>';
    7373    $Output .= '<a href="//www.zdechov.net/kamery/?Id=4"><img alt="Fotbalové hřiště" width="140" height="79" src="//www.zdechov.net/images/webcam/webcam4.jpg" /></a>';
    74     return($Output);
     74    return ($Output);
    7575  }
    7676}
  • trunk/Modules/WebCam/webcam_refresh.php

    r738 r873  
    33
    44$Config['Web']['ShowPHPError'] = true;
    5 while(1)
     5while (1)
    66{
    77  $ModifyTime = filemtime('webcam.jpg');
    8   if((time() - $Config['Web']['WebcamRefresh']) >= $ModifyTime)
     8  if ((time() - $Config['Web']['WebcamRefresh']) >= $ModifyTime)
    99  {
    1010//    $Output = shell_exec('wget "http://kamera-stred/Webcam.jpg?MobilePass='.$Config['Web']['WebcamPassword'].'&V=2&Q=2&B=2&U=0" -O webcam_cache.jpg -T '.($Config['Web']['WebcamRefresh']).' --limit-rate=200k');
    1111    $Output = shell_exec('wget "http://kamera-knihovna/cgi-bin/viewer/video.jpg" -O webcam_cache.jpg -T '.($Config['Web']['WebcamRefresh']).' --limit-rate=200k');
    1212
    13     if((strpos($Output, 'failed') === false) and (strpos($Output, 'error') === false))
     13    if ((strpos($Output, 'failed') === false) and (strpos($Output, 'error') === false))
    1414      shell_exec('mv -f webcam_cache.jpg webcam.jpg');
    1515  }
Note: See TracChangeset for help on using the changeset viewer.