Changeset 317 for trunk/system/generators/firewall_nat.php
- Timestamp:
- Jul 15, 2011, 8:26:28 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/firewall_nat.php
r315 r317 36 36 //$Items[] = array('chain' => 'inet-in', 'dst-address' => '172.16.1.1/30', 'action' => 'accept', 'comment' => 'Local_subnet'); 37 37 38 $DbResult = $Database->query('SELECT Member.*, Subject.Name FROM Member JOIN Subject ON Member.Subject = Subject.Id');38 $DbResult = $Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` JOIN `Subject` ON `Member`.`Subject` = `Subject`.`Id`'); 39 39 while($Member = $DbResult->fetch_assoc()) 40 40 { 41 41 echo($Member['Name'].': '); 42 42 // Hosts 43 $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName, NetworkDevice.InboundNATPriority FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.ExternalIP <> "") AND (NetworkDevice.Member = '.$Member['Id'].') AND (NetworkInterface.LocalIP != NetworkInterface.ExternalIP) ORDER BY id DESC'); 43 $DbResult2 = $Database->query('SELECT `NetworkInterface`.*, `NetworkDevice`.`Name` AS `DeviceName`, `NetworkDevice`.`InboundNATPriority` FROM `NetworkInterface`'. 44 ' LEFT JOIN `NetworkDevice` ON `NetworkDevice`.`Id` = `NetworkInterface`.`Device` WHERE (`NetworkInterface`.`ExternalIP` <> "")'. 45 ' AND (`NetworkDevice`.`Member` = '.$Member['Id'].') AND (`NetworkInterface`.`LocalIP` != `NetworkInterface`.`ExternalIP`) ORDER BY `id` DESC'); 44 46 while($Interface = $DbResult2->fetch_assoc()) 45 47 { … … 60 62 61 63 // Subnets 62 $DbResult2 = $Database->select('NetworkSubnet', '*', ' Member='.$Member['Id']);64 $DbResult2 = $Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']); 63 65 while($Subnet = $DbResult2->fetch_assoc()) 64 66 {
Note:
See TracChangeset
for help on using the changeset viewer.