Changeset 620


Ignore:
Timestamp:
Dec 26, 2013, 11:01:38 PM (11 years ago)
Author:
chronos
Message:
  • Přidáno: V seznamu bezdrátových zažízení lze upřesnit také šířku postranních kanálů a režim.
  • Upraveno: Zobrazení mapy obsazení frekvencí se nyní načítá ze seznamu bezdrátových zařízení.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/FormClasses.php

    r615 r620  
    187187    'States' => array('add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'),
    188188  ),   
     189  'TWirelessMode' => array(
     190    'Type' => 'Enumeration',
     191    'States' => array('Přístupový bod (AP)', 'Klient'),
     192  ),   
    189193  'TService' => array(
    190194    'Type' => 'Reference',
  • trunk/Application/Version.php

    r619 r620  
    11<?php
    22
    3 $Revision = 619; // Subversion revision
    4 $DatabaseRevision = 619; // SQL structure revision
     3$Revision = 620; // Subversion revision
     4$DatabaseRevision = 620; // SQL structure revision
    55$ReleaseTime = '2013-12-26';
  • trunk/Common/Setup/Updates.php

    r619 r620  
    516516    'ADD CONSTRAINT `NewsImport_ibfk_1` FOREIGN KEY (`Category`) '.
    517517    ' REFERENCES `NewsCategory` (`Id`);');
    518   $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Product` INT NULL AFTER `AntennaPolarity` ,
     518  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Antenna` INT NULL AFTER `AntennaPolarity` ,
    519519ADD INDEX ( `Product` ) ;');
    520   $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD FOREIGN KEY ( `Product` ) REFERENCES `Product` (
     520  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD FOREIGN KEY ( `Antenna` ) REFERENCES `Product` (
    521521`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;');
    522522  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `MAC` VARCHAR( 17 ) NOT NULL ;');
     
    526526{
    527527  $Manager->Execute('ALTER TABLE `UserOnline` ADD `StayLogged` INT NOT NULL ;');
     528}
     529
     530function UpdateTo620($Manager)
     531{
     532  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `ChannelWidthLower` INT NOT NULL ,
     533ADD `ChannelWidthUpper` INT NOT NULL ;');
     534  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Mode` INT NOT NULL ;');
     535  $Manager->Execute('DROP TABLE `NetworkAP`');
    528536}
    529537
     
    560568      601 => array('Revision' => 615, 'Function' => 'UpdateTo615'),
    561569      615 => array('Revision' => 619, 'Function' => 'UpdateTo619'),
     570      620 => array('Revision' => 620, 'Function' => 'UpdateTo620'),
    562571    ));
    563572  }
  • trunk/Modules/Network/Network.php

    r619 r620  
    4848        }
    4949        $Output .= '</tr>';
    50         $DbResult = $this->Database->query('SELECT Frequency FROM NetworkAP WHERE '.$Where.' GROUP BY Frequency');
     50        $DbResult = $this->Database->query('SELECT `Frequency` FROM `NetworkInterfaceWireless` WHERE '.$Where.' AND (`Mode`=0) GROUP BY `Frequency`');
    5151        while($DbRow = $DbResult->fetch_assoc())
    5252        {
    53           $DbResult2 = $this->Database->query('SELECT * FROM NetworkAP WHERE Frequency='.$DbRow['Frequency'].' AND '.$Where);
     53          $DbResult2 = $this->Database->query('SELECT * FROM `NetworkInterfaceWireless` WHERE (`Frequency`='.$DbRow['Frequency'].') AND '.$Where);
    5454          while($DbRow2 = $DbResult2->fetch_assoc())
    5555          {
    56             $LowFrequency = $DbRow['Frequency'] - $DbRow2['ChannelWidth'] / 2;
    57             $HighFrequency = $DbRow['Frequency'] + $DbRow2['ChannelWidth'] / 2;
     56            $LowFrequency = $DbRow['Frequency'] - $DbRow2['ChannelWidth'] / 2 + $DbRow2['ChannelWidthLower'];
     57            $HighFrequency = $DbRow['Frequency'] + $DbRow2['ChannelWidth'] / 2 + $DbRow2['ChannelWidthUpper'];
    5858            $Output .= '<tr><td>'.$DbRow2['SSID'].'</td>';
    5959            foreach($ChannelList as $Frequency)       
    6060            {
    61               if(($LowFrequency <= ($Frequency - 2.5)) and ($HighFrequency >= ($Frequency + 2.5))) $Color = '#808080';
     61              if(($DbRow2['Frequency'] == $Frequency)) $Color = '#000000';
     62                else if(($LowFrequency <= ($Frequency - 2.5)) and ($HighFrequency >= ($Frequency + 2.5))) $Color = '#808080';
    6263                else if(($LowFrequency == $Frequency) or ($HighFrequency == $Frequency)) $Color = '#c0c0c0';
     64               
    6365                else $Color = '#ffffff';
    6466              $Output .= '<td style="background-color: '.$Color.';">&nbsp;</td>';
     
    288290        'AntennaPolarity' => array('Type' => 'TAntennaPolarity', 'Caption' => 'Polarizace antény', 'Default' => '0'),
    289291        'Frequency' => array('Type' => 'Float', 'Caption' => 'Frekvence', 'Default' => '5600', 'Suffix' => 'MHz'),
     292        'ChannelWidthLower' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu dolního', 'Default' => '0', 'Suffix' => 'MHz'),
    290293        'ChannelWidth' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu', 'Default' => '20', 'Suffix' => 'MHz'),
     294        'ChannelWidthUpper' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu horního', 'Default' => '0', 'Suffix' => 'MHz'),
     295        'Mode' => array('Type' => 'TWirelessMode', 'Caption' => 'Režim', 'Default' => '0', 'Suffix' => ''),
    291296        'TotalPower' => array('Type' => 'Integer', 'Caption' => 'Celkový výkon', 'Default' => '20', 'Suffix' => 'dBm',
    292297          'SQL' => '(`TxPower` - `CableAttenuation` + `AntenaGain`)', 'ReadOnly' => true),
Note: See TracChangeset for help on using the changeset viewer.