Changeset 738 for trunk/Modules/Network/Subnet.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Subnet.php
r548 r738 15 15 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `NetworkSubnet`'); 16 16 $DbRow = $DbResult->fetch_row(); 17 $PageList = GetPageList($DbRow[0]); 17 $PageList = GetPageList($DbRow[0]); 18 18 19 19 $Output = $PageList['Output']; 20 20 $Output .= '<table class="WideTable" style="font-size: small;">'; 21 21 22 22 $TableColumns = array( 23 array('Name' => 'Name', 'Title' => 'Název'), 24 array('Name' => 'AddressRange', 'Title' => 'IP rozsah'), 25 array('Name' => 'DHCP', 'Title' => 'Adresa DHCP'), 26 array('Name' => 'Gateway', 'Title' => 'Výchozí brána'), 27 array('Name' => '', 'Title' => 'Max. adres'), 28 array('Name' => '', 'Title' => 'Registrovaných adres'), 29 array('Name' => '', 'Title' => 'Využití'), 30 array('Name' => 'SubjectName', 'Title' => 'Účastník'), 23 array('Name' => 'Name', 'Title' => 'Název'), 24 array('Name' => 'AddressRange', 'Title' => 'IP rozsah'), 25 array('Name' => 'DHCP', 'Title' => 'Adresa DHCP'), 26 array('Name' => 'Gateway', 'Title' => 'Výchozí brána'), 27 array('Name' => '', 'Title' => 'Max. adres'), 28 array('Name' => '', 'Title' => 'Registrovaných adres'), 29 array('Name' => '', 'Title' => 'Využití'), 30 array('Name' => 'SubjectName', 'Title' => 'Účastník'), 31 31 ); 32 32 $Order = GetOrderTableHeader($TableColumns, 'AddressRange', 0); … … 34 34 35 35 $Query = 'SELECT NetworkSubnet.*, Subject.Name AS SubjectName FROM NetworkSubnet LEFT JOIN Member ON Member.Id = NetworkSubnet.Member LEFT JOIN Subject ON Subject.Id = Member.Subject '.$Order['SQL'].$PageList['SQLLimit']; 36 36 37 37 $DbResult = $this->Database->query($Query); 38 while($Subnet = $DbResult->fetch_assoc()) 39 { 38 while($Subnet = $DbResult->fetch_assoc()) 39 { 40 40 $DbResult2 = $this->Database->query('SELECT COUNT(*) FROM NetworkInterface WHERE CompareNetworkPrefix(INET_ATON("'.$Subnet['AddressRange'].'"), INET_ATON(LocalIP), '.$Subnet['Mask'].')'); 41 41 $DbRow = $DbResult2->fetch_row();
Note:
See TracChangeset
for help on using the changeset viewer.