Changeset 738 for trunk/Modules/Network
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- Location:
- trunk/Modules/Network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/HostList.php
r717 r738 8 8 var $ShortTitle = 'Seznam počítačů'; 9 9 var $ParentClass = 'PageNetwork'; 10 10 11 11 function Show() 12 12 { … … 45 45 if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name']; 46 46 $Output .= '<tr><td style="text-align: left; '.$Style.'"> '.$InterfaceName.'</td><td>'.$Interface['LocalIP'].'</td><td> </td><td> </td><td> </td><td> </td></tr>'; 47 } 47 } 48 48 } 49 } 49 } 50 50 $Output .= '</table></div>'; 51 51 return($Output); -
trunk/Modules/Network/Network.php
r736 r738 65 65 $Output .= '<td style="background-color: '.$Color.';"> </td>'; 66 66 } 67 68 $Output .= '</tr>'; 67 68 $Output .= '</tr>'; 69 69 } 70 70 } … … 186 186 'Online' => array('Type' => 'TOnlineState', 'Caption' => 'Běží', 'Default' => '0', 'ReadOnly' => true), 187 187 'LastOnline' => array('Type' => 'DateTime', 'Caption' => 'Naposledy běželo', 'Default' => '', 'ReadOnly' => true), 188 188 'Links' => array('Type' => 'TNetworkLinkListInterface', 'Caption' => 'Propojení', 'Default' => ''), 189 189 'UpDown' => array('Type' => 'TNetworkInterfaceUpDown', 'Caption' => 'Změny stavu', 'Default' => ''), 190 190 'Signal' => array('Type' => 'TNetworkSignalListInterface', 'Caption' => 'Signál', 'Default' => ''), … … 192 192 193 193 ), 194 )); 194 )); 195 195 $this->System->FormManager->RegisterClass('NetworkInterfaceType', array( 196 196 'Title' => 'Typ síťového rozhraní', … … 235 235 $this->System->FormManager->RegisterClass('NetworkLinkUnion', array( 236 236 'Title' => 'Síťové propojení', 237 237 'BaseTable' => 'NetworkLink', 238 238 'SQL' => '(SELECT `Id`, `Type`, `Interface1` AS `Interface`, `Interface2` AS `InterfaceOther` FROM `NetworkLink`) '. 239 239 'UNION (SELECT `Id`, `Type`, `Interface2` AS `Interface`, `Interface1` AS `InterfaceOther` FROM `NetworkLink`)', 240 240 'Items' => array( 241 241 'Type' => array('Type' => 'TNetworkLinkType', 'Caption' => 'Typ', 'Default' => '1', 'ReadOnly' => true), 242 242 'Interface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 1', 'Default' => '', 'ReadOnly' => true), 243 244 ), 245 )); 246 243 'InterfaceOther' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => '', 'ReadOnly' => true), 244 ), 245 )); 246 247 247 $this->System->FormManager->RegisterClass('NetworkLinkType', array( 248 248 'Title' => 'Typ síťového propojení', … … 371 371 )); 372 372 $this->System->FormManager->RegisterFormType('TNetworkDevice', array( 373 374 375 376 377 373 'Type' => 'Reference', 374 'Table' => 'NetworkDevice', 375 'Id' => 'Id', 376 'Name' => 'Name', 377 'Filter' => '1', 378 378 )); 379 379 $this->System->FormManager->RegisterFormType('TNetworkDeviceType', array( 380 381 382 383 384 380 'Type' => 'Reference', 381 'Table' => 'NetworkDeviceType', 382 'Id' => 'Id', 383 'Name' => 'Name', 384 'Filter' => '1', 385 385 )); 386 386 $this->System->FormManager->RegisterFormType('TNetworkInterface', array( 387 388 389 390 391 392 393 387 'Type' => 'Reference', 388 'Table' => 'NetworkInterface', 389 'View' => '(SELECT NetworkInterface.*, CONCAT_WS("-", NetworkDevice.Name, NULLIF(NetworkInterface.Name, "")) AS DeviceName FROM NetworkInterface '. 390 'LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device) AS T', 391 'Id' => 'Id', 392 'Name' => 'DeviceName', 393 'Filter' => '1', 394 394 )); 395 395 $this->System->FormManager->RegisterFormType('TNetworkInterfaceType', array( 396 397 398 399 400 396 'Type' => 'Reference', 397 'Table' => 'NetworkInterfaceType', 398 'Id' => 'Id', 399 'Name' => 'Name', 400 'Filter' => '1', 401 401 )); 402 402 $this->System->FormManager->RegisterFormType('TDeviceList', array( … … 416 416 $this->System->FormManager->RegisterFormType('TNetworkLinkType', array( 417 417 'Type' => 'Reference', 418 419 420 421 422 )); 418 'Table' => 'NetworkLinkType', 419 'Id' => 'Id', 420 'Name' => 'Name', 421 'Filter' => '1', 422 )); 423 423 $this->System->FormManager->RegisterFormType('TDeviceAPIType', array( 424 424 'Type' => 'Reference', 425 426 427 428 429 )); 425 'Table' => 'DeviceAPIType', 426 'Id' => 'Id', 427 'Name' => 'Name', 428 'Filter' => '1', 429 )); 430 430 $this->System->FormManager->RegisterFormType('TNetworkInterfaceWirelessListInterface', array( 431 431 'Type' => 'ManyToOne', … … 445 445 'Type' => 'ManyToOne', 446 446 'Table' => 'NetworkLinkUnion', 447 448 449 447 'Id' => 'Id', 448 'Ref' => 'Interface', 449 'Filter' => '1', 450 450 )); 451 451 $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface1', array( 452 453 454 455 456 452 'Type' => 'ManyToOne', 453 'Table' => 'NetworkLink', 454 'Id' => 'Id', 455 'Ref' => 'Interface1', 456 'Filter' => '1', 457 457 )); 458 458 $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface2', array( 459 460 461 462 463 459 'Type' => 'ManyToOne', 460 'Table' => 'NetworkLink', 461 'Id' => 'Id', 462 'Ref' => 'Interface2', 463 'Filter' => '1', 464 464 )); 465 465 $this->System->FormManager->RegisterFormType('TNetworkInterfaceUpDown', array( 466 467 468 469 470 471 )); 472 466 'Type' => 'ManyToOne', 467 'Table' => 'NetworkInterfaceUpDown', 468 'Id' => 'Id', 469 'Ref' => 'Interface', 470 'Filter' => '1', 471 )); 472 473 473 } 474 474 -
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(); -
trunk/Modules/Network/UserHosts.php
r558 r738 14 14 { 15 15 global $Config; 16 16 17 17 if($this->System->User->User['Id'] == '') return($this->SystemMessage('Nepovolený přístup', 'Nemáte oprávnění pro tuto operaci')); 18 18 $Output = '<div align="center" style="font-size: small;"><table class="WideTable">'; … … 36 36 NotBlank($Interface['ExternalIP']).'</td><td>'. 37 37 NotBlank($Interface['MAC']).'</td><td> </td><td> </td></tr>'; 38 } 38 } 39 39 } 40 40 $Output .= '</table></div>';
Note:
See TracChangeset
for help on using the changeset viewer.