Changeset 873 for trunk/Modules/NetworkConfig/Generate.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfig/Generate.php
r848 r873 1 1 <?php 2 2 3 if (isset($_SERVER['REMOTE_ADDR'])) die();3 if (isset($_SERVER['REMOTE_ADDR'])) die(); 4 4 include_once(dirname(__FILE__).'/../../Application/System.php'); 5 5 $System = new Core(); … … 9 9 $Now = time(); 10 10 $DbResult = $System->Database->select('NetworkConfiguration', '*, UNIX_TIMESTAMP(`LastTime`)', '(`Changed` = 1) AND (`Enabled` = 1)'); 11 while ($Service = $DbResult->fetch_assoc())11 while ($Service = $DbResult->fetch_assoc()) 12 12 { 13 if ($Service['UNIX_TIMESTAMP(LastTime)'] < (time() - $Service['Period']))13 if ($Service['UNIX_TIMESTAMP(LastTime)'] < (time() - $Service['Period'])) 14 14 { 15 15 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 2)); … … 19 19 $ExecuteParts = explode('|', $Service['Execute']); 20 20 $Output = array(); 21 foreach ($ExecuteParts as $Command)22 if ($Command != '')21 foreach ($ExecuteParts as $Command) 22 if ($Command != '') 23 23 { 24 24 exec($Command, $Output);
Note:
See TracChangeset
for help on using the changeset viewer.