Changeset 874 for trunk/Modules/NetworkConfigRouterOS
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- Location:
- trunk/Modules/NetworkConfigRouterOS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/AddressPortability.php
r873 r874 11 11 { 12 12 $TimeParts = explode(':', $Time); 13 return ($TimeParts[0] * 3600 + $TimeParts[1] * 60 + $TimeParts[2]);13 return $TimeParts[0] * 3600 + $TimeParts[1] * 60 + $TimeParts[2]; 14 14 } 15 15 -
trunk/Modules/NetworkConfigRouterOS/Generators/Common.php
r873 r874 9 9 { 10 10 $DbRow = $DbResult->fetch_assoc(); 11 return ($DbRow['Id']);11 return $DbRow['Id']; 12 12 } else 13 13 { 14 14 $DbResult = $Database->query('INSERT INTO `NetworkMark` (`Comment`) VALUES ("'.$Comment.'")'); 15 return ($Database->insert_id);15 return $Database->insert_id; 16 16 } 17 17 } … … 25 25 { 26 26 $DbRow = $DbResult->fetch_assoc(); 27 return ($DbRow['Id']);27 return $DbRow['Id']; 28 28 } else 29 29 { 30 30 $DbResult = $Database->query('INSERT INTO `NetworkMangleSubgroup` (`AddressRange`) VALUES ("'.$AddressRange.'")'); 31 return ($Database->insert_id);31 return $Database->insert_id; 32 32 } 33 33 } -
trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
r873 r874 74 74 if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit 75 75 if (substr($Value, -1, 1) == "M") $Value = substr($Value, 0, -1); // without M unit 76 return ($Value);76 return $Value; 77 77 } 78 78 -
trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php
r873 r874 72 72 if (IsInternetAddr($IPAddress)) { 73 73 $Output .= '<p>Internet zdarma je dostupný pouze z vnitřní sítě.</p>'; 74 return ($Output);74 return $Output; 75 75 } 76 76 $Time = time(); … … 111 111 else $Output .= '<a href="?a=activate">Aktivovat</a>'; 112 112 113 return ($Output);113 return $Output; 114 114 } 115 115 } … … 135 135 $Routerboard->ExecuteBatch(implode(';', $Commands)); 136 136 137 return ($Output);137 return $Output; 138 138 } 139 139 } -
trunk/Modules/NetworkConfigRouterOS/Routerboard.php
r873 r874 41 41 } else 42 42 $Output = array_merge($Output, $this->ExecuteBatch($Commands)); 43 return ($Output);43 return $Output; 44 44 } 45 45 … … 62 62 } else $Output = ''; 63 63 if ($this->Debug) print_r($Output); 64 return ($Output);64 return $Output; 65 65 } 66 66 … … 79 79 } else $List[substr($ResultLineParts[0], 0, -1)] = ''; 80 80 } 81 return ($List);81 return $List; 82 82 } 83 83 … … 113 113 $List[] = $ListItem; 114 114 } 115 return ($List);115 return $List; 116 116 } 117 117 … … 148 148 if (count($ListItem) > 0) $List[] = $ListItem; 149 149 } 150 return ($List);150 return $List; 151 151 } 152 152 … … 244 244 } 245 245 if ($this->Debug) print_r($Commands); 246 return ($this->Execute($Commands));246 return $this->Execute($Commands); 247 247 } 248 248 } -
trunk/Modules/NetworkConfigRouterOS/Routerboard2.php
r873 r874 14 14 { 15 15 if (is_array($Commands)) $Commands = implode(';', $Commands); 16 return (parent::Execute($Commands));16 return parent::Execute($Commands); 17 17 } 18 18 … … 28 28 $List[substr($ResultLineParts[0], 0, -1)] = $ResultLineParts[1]; 29 29 } 30 return ($List);30 return $List; 31 31 } 32 32 … … 52 52 $List[] = $ListItem; 53 53 } 54 return ($List);54 return $List; 55 55 } 56 56 57 57 function GetSystemResource() 58 58 { 59 return ($this->GetItem('/system resource print'));59 return $this->GetItem('/system resource print'); 60 60 } 61 61 62 62 function GetFirewallFilterList() 63 63 { 64 return ($this->GetList('/ip firewall nat', array('src-address', 'dst-address', 'bytes')));64 return $this->GetList('/ip firewall nat', array('src-address', 'dst-address', 'bytes')); 65 65 } 66 66 67 67 function GetDHCPServerLeasesList() 68 68 { 69 return ($this->GetList('/ip dhcp-server lease', array('address', 'active-address', 'comment', 'lease-time', 'status', 'host-name')));69 return $this->GetList('/ip dhcp-server lease', array('address', 'active-address', 'comment', 'lease-time', 'status', 'host-name')); 70 70 } 71 71 } -
trunk/Modules/NetworkConfigRouterOS/RouterboardAPI.php
r873 r874 40 40 } else if ($Length >= 0x10000000) 41 41 $Length = chr(0xF0).chr(($Length >> 24) & 0xFF).chr(($Length >> 16) & 0xFF).chr(($Length >> 8) & 0xFF).chr($Length & 0xFF); 42 return ($Length);42 return $Length; 43 43 } 44 44 … … 71 71 sleep($this->Delay); 72 72 } 73 return ($this->Connected);73 return $this->Connected; 74 74 } 75 75 … … 234 234 $this->Write($el, $Last); 235 235 } 236 return ($this->Read());236 return $this->Read(); 237 237 } 238 238 } -
trunk/Modules/NetworkConfigRouterOS/SSH.php
r873 r874 54 54 } 55 55 echo($Response); 56 return (explode("\n", substr($Response, 0, -1)));56 return explode("\n", substr($Response, 0, -1)); 57 57 } 58 58 }
Note:
See TracChangeset
for help on using the changeset viewer.