Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfig/Generate.php

    r848 r873  
    11<?php
    22
    3 if(isset($_SERVER['REMOTE_ADDR'])) die();
     3if (isset($_SERVER['REMOTE_ADDR'])) die();
    44include_once(dirname(__FILE__).'/../../Application/System.php');
    55$System = new Core();
     
    99$Now = time();
    1010$DbResult = $System->Database->select('NetworkConfiguration', '*, UNIX_TIMESTAMP(`LastTime`)', '(`Changed` = 1) AND (`Enabled` = 1)');
    11 while($Service = $DbResult->fetch_assoc())
     11while ($Service = $DbResult->fetch_assoc())
    1212{
    13   if($Service['UNIX_TIMESTAMP(LastTime)'] < (time() - $Service['Period']))
     13  if ($Service['UNIX_TIMESTAMP(LastTime)'] < (time() - $Service['Period']))
    1414  {
    1515    $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 2));
     
    1919    $ExecuteParts = explode('|', $Service['Execute']);
    2020    $Output = array();
    21     foreach($ExecuteParts as $Command)
    22       if($Command != '')
     21    foreach ($ExecuteParts as $Command)
     22      if ($Command != '')
    2323      {
    2424        exec($Command, $Output);
Note: See TracChangeset for help on using the changeset viewer.