Changeset 860


Ignore:
Timestamp:
May 8, 2019, 8:22:45 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Made some links to follow http/https protocol.
  • Modified: Simplified .htaccess.
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/.htaccess

    r744 r860  
    33  deny from all
    44</Files>
     5
     6<Files Query.log>
     7  order allow,deny
     8  deny from all
     9</Files>
     10
     11RewriteEngine On
     12RewriteBase /
    513
    614RewriteEngine On
  • trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php

    r817 r860  
    2828        $Name = $Interface['DeviceName'];
    2929        if($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
    30         $Items[] = array('mac-address' => $Interface['MAC'], 'address' => $Interface['LocalIP'], 'server' => $Server, 'comment' => $Name);
     30        $Items[] = array('mac-address' => $Interface['MAC'], 'address' => $Interface['LocalIP'], 'server' => $Server, 'comment' => $Name, 'lease-time' => '24h');
    3131      }
    3232
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r781 r860  
    110110
    111111    // Accept free-access clients
    112     $Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
    113         'src-address-list' => 'free-access', 'in-interface' => $LocalInterface,
    114         'action' => 'accept', 'comment' => 'Free_access');
     112    //$Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
     113    //    'src-address-list' => 'free-access', 'in-interface' => $LocalInterface,
     114    //    'action' => 'accept', 'comment' => 'Free_access');
    115115    // Redirect unregistred clients to free access activation page
    116     $Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
    117         'src-address-list' => 'unregistred', 'in-interface' => $LocalInterface, 'protocol' => 'tcp',
    118         'action' => 'dst-nat', 'to-addresses' => '10.145.64.70', 'to-ports' => 8080, 'comment' => 'Redirect_unregistred');
     116    //$Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
     117    //    'src-address-list' => 'unregistred', 'in-interface' => $LocalInterface, 'protocol' => 'tcp',
     118    //    'action' => 'dst-nat', 'to-addresses' => '10.145.64.70', 'to-ports' => 8080, 'comment' => 'Redirect_unregistred');
    119119
    120120    // Masquerade hosts without public ip
  • trunk/Modules/NetworkConfigRouterOS/Generators/NetwatchImport.php

    r852 r860  
    6565      }
    6666    }
     67    echo("transakce\n");
    6768    $this->Database->Transaction($Queries);
     69    echo("done\n");
    6870
    6971    // Set offline all interfaces which were not updated as online
     
    9092    }
    9193    $Queries[] = $this->Database->GetUpdate('NetworkDevice', '`LastOnline` < "'.TimeToMysqlDateTime($StartTime).'"', array('Online' => 0));
     94    echo("Transakce 2\n");
    9295    $this->Database->Transaction($Queries);
     96    echo("done\n");
    9397  }
    9498
  • trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php

    r818 r860  
    6969  {
    7070    $IPAddress = GetRemoteAddress();
    71     if(IsInternetAddr($IPAddress))
    72       return('<p>Internet zdarma je dostupný pouze z vnitřní sítě.</p>');
     71    $Output = 'Vaše IP adresa je: '.$IPAddress.'<br/>';
     72    if(IsInternetAddr($IPAddress)) {
     73      $Output .= '<p>Internet zdarma je dostupný pouze z vnitřní sítě.</p>';
     74      return($Output);
     75    }
    7376    $Time = time();
    7477
     
    99102      }
    100103    }
    101     $Output = '<div style="text-align:center;"><h3>Vítejte v síti ZděchovNET</h3></div>';
    102     //$Output .= 'Vaše adresa IP je: '.GetRemoteAddress().'<br/>';
     104    $Output .= '<div style="text-align:center;"><h3>Vítejte v síti ZděchovNET</h3></div>';
    103105    $Output .= '<p>Pro přístup k Internetu zdarma sdílenou rychlostí 128/128 kbit/s klikněte na odkaz níže.
    104106      Internet bude zpřístupněn po dobu 24 hodin. Po uplynutí této doby je potřeba provést novou aktivaci.</p>';
  • trunk/Modules/NetworkConfigRouterOS/Routerboard.php

    r854 r860  
    88  var $UserName;
    99  var $Password;
    10   var $PrivateKey = '~/.ssh/id_dsa';
     10  var $PrivateKey = '~/.ssh/id_rsa';
    1111  var $MaxBurstLineCount = 100;
    1212  var $Debug = false;
     
    5252      $Commands = str_replace('$', '\$', $Commands);
    5353      //$Commands = str_replace(' ', '\ ', $Commands);
    54       $Command = $this->SSHPath.' -o ConnectTimeout='.$this->Timeout.' -l '.$this->UserName.' -o HostKeyAlgorithms=+ssh-dss -o KexAlgorithms=diffie-hellman-group14-sha1 -i '.$this->PrivateKey.' '.$this->HostName.' "'.$Commands.'"';
     54      if ($this->PrivateKey != '') $PrivKey = ' -i '.$this->PrivateKey;
     55        else $PrivKey = '';
     56
     57      $Command = $this->SSHPath.' -oBatchMode=no -o ConnectTimeout='.$this->Timeout.' -l '.$this->UserName.
     58        $PrivKey.' '.$this->HostName.' "'.$Commands.'"';
    5559      if($this->Debug) echo($Command);
    5660      $Output = array();
  • trunk/Modules/Portal/Portal.php

    r858 r860  
    140140  function MeteoPanel()
    141141  {
    142     $Output = '<a href="http://stat.zdechov.net/meteo/?Measure=28" title="Klikněte pro detailní informace a předpověď"><img src="http://www.zdechov.net/meteo/koliba.png" border="0" alt="Počasí - Meteostanice Zděchov" width="150" height="150" /></a>';
     142    $Output = '<a href="https://stat.zdechov.net/meteo/?Measure=28" title="Klikněte pro detailní informace a předpověď"><img src="https://www.zdechov.net/meteo/koliba.png" border="0" alt="Počasí - Meteostanice Zděchov" width="150" height="150" /></a>';
    143143    return($Output);
    144144  }
  • trunk/Modules/WebCam/WebCam.php

    r854 r860  
    6767    global $Config;
    6868    $Output = '';
    69     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=5"><img alt="Koupaliště" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam5.jpg" /></a>';
    70     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam.jpg" /></a>';
    71     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=2"><img alt="Webkamera střed obce obloha" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam2.jpg" /></a>';
    72     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=3"><img alt="Skiareál, motokrosová grapa" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam3.jpg" /></a>';
    73     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=4"><img alt="Fotbalové hřiště" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam4.jpg" /></a>';
    74     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=6"><img alt="Lev výběh 1" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam6.jpg" /></a>';
    75     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=7"><img alt="Lev výběh 2" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam7.jpg" /></a>';
    76     $Output .= '<a href="http://www.zdechov.net/kamery/?Id=8"><img alt="Lev domek" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam8.jpg" /></a>';
     69    $Output .= '<a href="//www.zdechov.net/kamery/?Id=5"><img alt="Koupaliště" width="140" height="79" src="//www.zdechov.net/images/webcam/webcam5.jpg" /></a>';
     70    $Output .= '<a href="//www.zdechov.net/kamery/?Id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="//www.zdechov.net/images/webcam/webcam.jpg" /></a>';
     71    $Output .= '<a href="//www.zdechov.net/kamery/?Id=2"><img alt="Webkamera střed obce obloha" width="140" height="105" src="//www.zdechov.net/images/webcam/webcam2.jpg" /></a>';
     72    $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>';
     73    $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>';
    7774    return($Output);
    7875  }
Note: See TracChangeset for help on using the changeset viewer.