Changeset 738 for trunk/Modules/Network


Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
Location:
trunk/Modules/Network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Network/HostList.php

    r717 r738  
    88  var $ShortTitle = 'Seznam počítačů';
    99  var $ParentClass = 'PageNetwork';
    10  
     10
    1111  function Show()
    1212  {
     
    4545          if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
    4646          $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.$InterfaceName.'</td><td>'.$Interface['LocalIP'].'</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
    47         }     
     47        }
    4848      }
    49     } 
     49    }
    5050    $Output .= '</table></div>';
    5151    return($Output);
  • trunk/Modules/Network/Network.php

    r736 r738  
    6565          $Output .= '<td style="background-color: '.$Color.';">&nbsp;</td>';
    6666        }
    67                    
    68         $Output .= '</tr>';       
     67
     68        $Output .= '</tr>';
    6969      }
    7070    }
     
    186186        'Online' => array('Type' => 'TOnlineState', 'Caption' => 'Běží', 'Default' => '0', 'ReadOnly' => true),
    187187        'LastOnline' => array('Type' => 'DateTime', 'Caption' => 'Naposledy běželo', 'Default' => '', 'ReadOnly' => true),
    188         'Links' => array('Type' => 'TNetworkLinkListInterface', 'Caption' => 'Propojení', 'Default' => ''),
     188        'Links' => array('Type' => 'TNetworkLinkListInterface', 'Caption' => 'Propojení', 'Default' => ''),
    189189        'UpDown' => array('Type' => 'TNetworkInterfaceUpDown', 'Caption' => 'Změny stavu', 'Default' => ''),
    190190        'Signal' => array('Type' => 'TNetworkSignalListInterface', 'Caption' => 'Signál', 'Default' => ''),
     
    192192
    193193      ),
    194     ));   
     194    ));
    195195    $this->System->FormManager->RegisterClass('NetworkInterfaceType', array(
    196196      'Title' => 'Typ síťového rozhraní',
     
    235235    $this->System->FormManager->RegisterClass('NetworkLinkUnion', array(
    236236      'Title' => 'Síťové propojení',
    237         'BaseTable' => 'NetworkLink',
     237      'BaseTable' => 'NetworkLink',
    238238      'SQL' => '(SELECT `Id`, `Type`, `Interface1` AS `Interface`, `Interface2` AS `InterfaceOther` FROM `NetworkLink`) '.
    239                 'UNION (SELECT `Id`, `Type`, `Interface2` AS `Interface`, `Interface1` AS `InterfaceOther` FROM `NetworkLink`)',
     239        'UNION (SELECT `Id`, `Type`, `Interface2` AS `Interface`, `Interface1` AS `InterfaceOther` FROM `NetworkLink`)',
    240240      'Items' => array(
    241241        'Type' => array('Type' => 'TNetworkLinkType', 'Caption' => 'Typ', 'Default' => '1', 'ReadOnly' => true),
    242242        'Interface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 1', 'Default' => '', 'ReadOnly' => true),
    243                 'InterfaceOther' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => '', 'ReadOnly' => true),
    244       ),
    245     ));
    246    
     243        'InterfaceOther' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => '', 'ReadOnly' => true),
     244      ),
     245    ));
     246
    247247    $this->System->FormManager->RegisterClass('NetworkLinkType', array(
    248248      'Title' => 'Typ síťového propojení',
     
    371371    ));
    372372    $this->System->FormManager->RegisterFormType('TNetworkDevice', array(
    373         'Type' => 'Reference',
    374         'Table' => 'NetworkDevice',
    375         'Id' => 'Id',
    376         'Name' => 'Name',
    377         'Filter' => '1',
     373      'Type' => 'Reference',
     374      'Table' => 'NetworkDevice',
     375      'Id' => 'Id',
     376      'Name' => 'Name',
     377      'Filter' => '1',
    378378    ));
    379379    $this->System->FormManager->RegisterFormType('TNetworkDeviceType', array(
    380         'Type' => 'Reference',
    381         'Table' => 'NetworkDeviceType',
    382         'Id' => 'Id',
    383         'Name' => 'Name',
    384         'Filter' => '1',
     380      'Type' => 'Reference',
     381      'Table' => 'NetworkDeviceType',
     382      'Id' => 'Id',
     383      'Name' => 'Name',
     384      'Filter' => '1',
    385385    ));
    386386    $this->System->FormManager->RegisterFormType('TNetworkInterface', array(
    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',
     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',
    394394    ));
    395395    $this->System->FormManager->RegisterFormType('TNetworkInterfaceType', array(
    396         'Type' => 'Reference',
    397         'Table' => 'NetworkInterfaceType',
    398         'Id' => 'Id',
    399         'Name' => 'Name',
    400         'Filter' => '1',
     396      'Type' => 'Reference',
     397      'Table' => 'NetworkInterfaceType',
     398      'Id' => 'Id',
     399      'Name' => 'Name',
     400      'Filter' => '1',
    401401    ));
    402402    $this->System->FormManager->RegisterFormType('TDeviceList', array(
     
    416416    $this->System->FormManager->RegisterFormType('TNetworkLinkType', array(
    417417      'Type' => 'Reference',
    418         'Table' => 'NetworkLinkType',
    419         'Id' => 'Id',
    420         'Name' => 'Name',
    421         'Filter' => '1',
    422     ));   
     418      'Table' => 'NetworkLinkType',
     419      'Id' => 'Id',
     420      'Name' => 'Name',
     421      'Filter' => '1',
     422    ));
    423423    $this->System->FormManager->RegisterFormType('TDeviceAPIType', array(
    424424      'Type' => 'Reference',
    425         'Table' => 'DeviceAPIType',
    426         'Id' => 'Id',
    427         'Name' => 'Name',
    428         'Filter' => '1',
    429     ));   
     425      'Table' => 'DeviceAPIType',
     426      'Id' => 'Id',
     427      'Name' => 'Name',
     428      'Filter' => '1',
     429    ));
    430430    $this->System->FormManager->RegisterFormType('TNetworkInterfaceWirelessListInterface', array(
    431431      'Type' => 'ManyToOne',
     
    445445      'Type' => 'ManyToOne',
    446446      'Table' => 'NetworkLinkUnion',
    447         'Id' => 'Id',
    448         'Ref' => 'Interface',
    449         'Filter' => '1',
     447      'Id' => 'Id',
     448      'Ref' => 'Interface',
     449      'Filter' => '1',
    450450    ));
    451451    $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface1', array(
    452         'Type' => 'ManyToOne',
    453         'Table' => 'NetworkLink',
    454         'Id' => 'Id',
    455         'Ref' => 'Interface1',
    456         'Filter' => '1',
     452      'Type' => 'ManyToOne',
     453      'Table' => 'NetworkLink',
     454      'Id' => 'Id',
     455      'Ref' => 'Interface1',
     456      'Filter' => '1',
    457457    ));
    458458    $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface2', array(
    459         'Type' => 'ManyToOne',
    460         'Table' => 'NetworkLink',
    461         'Id' => 'Id',
    462         'Ref' => 'Interface2',
    463         'Filter' => '1',
     459      'Type' => 'ManyToOne',
     460      'Table' => 'NetworkLink',
     461      'Id' => 'Id',
     462      'Ref' => 'Interface2',
     463      'Filter' => '1',
    464464    ));
    465465    $this->System->FormManager->RegisterFormType('TNetworkInterfaceUpDown', array(
    466         'Type' => 'ManyToOne',
    467         'Table' => 'NetworkInterfaceUpDown',
    468         'Id' => 'Id',
    469         'Ref' => 'Interface',
    470         'Filter' => '1',
    471     ));
    472    
     466      'Type' => 'ManyToOne',
     467      'Table' => 'NetworkInterfaceUpDown',
     468      'Id' => 'Id',
     469      'Ref' => 'Interface',
     470      'Filter' => '1',
     471    ));
     472
    473473  }
    474474
  • trunk/Modules/Network/Subnet.php

    r548 r738  
    1515    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `NetworkSubnet`');
    1616    $DbRow = $DbResult->fetch_row();
    17     $PageList = GetPageList($DbRow[0]);   
     17    $PageList = GetPageList($DbRow[0]);
    1818
    1919    $Output = $PageList['Output'];
    2020    $Output .= '<table class="WideTable" style="font-size: small;">';
    21    
     21
    2222    $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'),
    3131    );
    3232    $Order = GetOrderTableHeader($TableColumns, 'AddressRange', 0);
     
    3434
    3535    $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
    3737    $DbResult = $this->Database->query($Query);
    38     while($Subnet = $DbResult->fetch_assoc()) 
    39     { 
     38    while($Subnet = $DbResult->fetch_assoc())
     39    {
    4040      $DbResult2 = $this->Database->query('SELECT COUNT(*) FROM NetworkInterface WHERE CompareNetworkPrefix(INET_ATON("'.$Subnet['AddressRange'].'"), INET_ATON(LocalIP), '.$Subnet['Mask'].')');
    4141      $DbRow = $DbResult2->fetch_row();
  • trunk/Modules/Network/UserHosts.php

    r558 r738  
    1414  {
    1515    global $Config;
    16    
     16
    1717    if($this->System->User->User['Id'] == '') return($this->SystemMessage('Nepovolený přístup', 'Nemáte oprávnění pro tuto operaci'));
    1818    $Output = '<div align="center" style="font-size: small;"><table class="WideTable">';
     
    3636          NotBlank($Interface['ExternalIP']).'</td><td>'.
    3737          NotBlank($Interface['MAC']).'</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
    38       }     
     38      }
    3939    }
    4040    $Output .= '</table></div>';
Note: See TracChangeset for help on using the changeset viewer.