Changeset 620
- Timestamp:
- Dec 26, 2013, 11:01:38 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/FormClasses.php
r615 r620 187 187 'States' => array('add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'), 188 188 ), 189 'TWirelessMode' => array( 190 'Type' => 'Enumeration', 191 'States' => array('Přístupový bod (AP)', 'Klient'), 192 ), 189 193 'TService' => array( 190 194 'Type' => 'Reference', -
trunk/Application/Version.php
r619 r620 1 1 <?php 2 2 3 $Revision = 6 19; // Subversion revision4 $DatabaseRevision = 6 19; // SQL structure revision3 $Revision = 620; // Subversion revision 4 $DatabaseRevision = 620; // SQL structure revision 5 5 $ReleaseTime = '2013-12-26'; -
trunk/Common/Setup/Updates.php
r619 r620 516 516 'ADD CONSTRAINT `NewsImport_ibfk_1` FOREIGN KEY (`Category`) '. 517 517 ' 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` , 519 519 ADD 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` ( 521 521 `Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;'); 522 522 $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `MAC` VARCHAR( 17 ) NOT NULL ;'); … … 526 526 { 527 527 $Manager->Execute('ALTER TABLE `UserOnline` ADD `StayLogged` INT NOT NULL ;'); 528 } 529 530 function UpdateTo620($Manager) 531 { 532 $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `ChannelWidthLower` INT NOT NULL , 533 ADD `ChannelWidthUpper` INT NOT NULL ;'); 534 $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Mode` INT NOT NULL ;'); 535 $Manager->Execute('DROP TABLE `NetworkAP`'); 528 536 } 529 537 … … 560 568 601 => array('Revision' => 615, 'Function' => 'UpdateTo615'), 561 569 615 => array('Revision' => 619, 'Function' => 'UpdateTo619'), 570 620 => array('Revision' => 620, 'Function' => 'UpdateTo620'), 562 571 )); 563 572 } -
trunk/Modules/Network/Network.php
r619 r620 48 48 } 49 49 $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`'); 51 51 while($DbRow = $DbResult->fetch_assoc()) 52 52 { 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); 54 54 while($DbRow2 = $DbResult2->fetch_assoc()) 55 55 { 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']; 58 58 $Output .= '<tr><td>'.$DbRow2['SSID'].'</td>'; 59 59 foreach($ChannelList as $Frequency) 60 60 { 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'; 62 63 else if(($LowFrequency == $Frequency) or ($HighFrequency == $Frequency)) $Color = '#c0c0c0'; 64 63 65 else $Color = '#ffffff'; 64 66 $Output .= '<td style="background-color: '.$Color.';"> </td>'; … … 288 290 'AntennaPolarity' => array('Type' => 'TAntennaPolarity', 'Caption' => 'Polarizace antény', 'Default' => '0'), 289 291 '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'), 290 293 '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' => ''), 291 296 'TotalPower' => array('Type' => 'Integer', 'Caption' => 'Celkový výkon', 'Default' => '20', 'Suffix' => 'dBm', 292 297 'SQL' => '(`TxPower` - `CableAttenuation` + `AntenaGain`)', 'ReadOnly' => true),
Note:
See TracChangeset
for help on using the changeset viewer.