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í.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.