Changeset 522 for trunk/Modules/NetworkConfigRouterOS/Generators/DNS.php
- Timestamp:
- Apr 15, 2013, 11:08:49 PM (12 years ago)
- Location:
- trunk/Modules/NetworkConfigRouterOS
- Files:
-
- 2 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/DNS.php
r521 r522 2 2 3 3 if(isset($_SERVER['REMOTE_ADDR'])) die(); 4 include('../../Common/Global.php'); 5 $Database = &$System->Database; 4 include_once(dirname(__FILE__).'/../../../Common/Global.php'); 6 5 7 6 $BaseDomain = 'zdechov.net'; … … 122 121 123 122 // Local records 124 $DbResult = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP <> ""');123 $DbResult = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP <> ""'); 125 124 while($Interface = $DbResult->fetch_assoc()) 126 125 { … … 131 130 132 131 // External records in internal server 133 $DbResult = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.ExternalIP <> ""');132 $DbResult = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.ExternalIP <> ""'); 134 133 while($Interface = $DbResult->fetch_assoc()) 135 134 { … … 151 150 152 151 // Domain aliases 153 $DbResult = $ Database->select('NetworkDomainAlias', '*');152 $DbResult = $System->Database->select('NetworkDomainAlias', '*'); 154 153 while($Alias = $DbResult->fetch_assoc()) 155 154 { … … 177 176 ); 178 177 179 $DbResult = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.ExternalIP != ""');178 $DbResult = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.ExternalIP != ""'); 180 179 while($Interface = $DbResult->fetch_assoc()) 181 180 { … … 186 185 187 186 // Domain alias 188 $DbResult = $ Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`');187 $DbResult = $System->Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`'); 189 188 // JOIN `NetworkDevice` ON NetworkDomainAlias.Target LIKE NetworkDevice.Name AND NetworkInterface.ExternalIP != ""'); 190 189 while($Alias = $DbResult->fetch_assoc()) … … 215 214 216 215 // Hosts 217 $DbResult = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""');216 $DbResult = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""'); 218 217 while($Interface = $DbResult->fetch_assoc()) 219 218 { … … 224 223 225 224 // Domain alias 226 $DbResult = $ Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`');225 $DbResult = $System->Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`'); 227 226 // JOIN `hosts` ON NetworkDomainAlias.Target LIKE hosts.name AND hosts.czfree_ip != ""'); 228 227 while($Alias = $DbResult->fetch_assoc()) … … 252 251 253 252 // Hosts 254 $DbResult = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""');253 $DbResult = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""'); 255 254 while($Interface = $DbResult->fetch_assoc()) 256 255 { … … 262 261 263 262 // Domain alias 264 $DbResult = $ Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`');263 $DbResult = $System->Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias`'); 265 264 // JOIN `hosts` ON NetworkDomainAlias.Target LIKE hosts.name AND hosts.czfree_ip != ""'); 266 265 while($Alias = $DbResult->fetch_assoc())
Note:
See TracChangeset
for help on using the changeset viewer.