Changeset 229 for trunk/network.php


Ignore:
Timestamp:
Jun 21, 2009, 12:04:00 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Funkce pro přidávání předpon násobků jednotek čísel.
  • Upraveno: Seznam dostupných AP a obsazených kanálů se nyní načítá z databáze z tabulky NetworkAP.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/network.php

    r195 r229  
    9898        break;
    9999      case 'obsazeni_wifi_kanalu':
    100         $Output .= '<br /><strong>Obsazení wifi kanálů:</strong><br />
    101 <table style="font-size: small;"  border="1" cellspacing="0" cellpadding="3">
    102 <tr><th>Kanál</th><th>Frekvence [GHz]</th><th>Zařízení</th></tr>
    103 <tr><td>1</td><td>2,412</td><td>AP-RUDO, AP-HAJDIKOVI, ptp-skarpa</td></tr>
    104 <tr><td>2</td><td>2,417</td><td>&nbsp;</td></tr>
    105 <tr><td>3</td><td>2,422</td><td>ap-markytan, ap-zvonicek, ap-hrbacek</td></tr>
    106 <tr><td>4</td><td>2,427</td><td>ap-george</td></tr>
    107 <tr><td>5</td><td>2,432</td><td>AP-MARON, ap-janicata</td></tr>
    108 <tr><td>6</td><td>2,437</td><td>ap-sekula</td></tr>
    109 <tr><td>7</td><td>2,442</td><td>ap-chaty</td></tr>
    110 <tr><td>8</td><td>2,447</td><td>ap-bytovky</td></tr>
    111 <tr><td>9</td><td>2,452</td><td>ap-kopecek</td></tr>
    112 <tr><td>10</td><td>2,457</td><td>ap-skarpa, AP-HAJDIKOVI2, AP-NAVRATIL</td></tr>
    113 <tr><td>11</td><td>2,462</td><td>&nbsp;</td></tr>
    114 <tr><td>12</td><td>2,467</td><td>&nbsp;</td></tr>
    115 <tr><td>13</td><td>2,472</td><td>ap-hajda, zbranek</td></tr>
    116 <tr><td>100</td><td>5,500</td><td>ptp-markytan</td></tr>
    117 <tr><td>104</td><td>5,520</td><td>ptp-smutny</td></tr>
    118 <tr><td>108</td><td>5,540</td><td>&nbsp;</td></tr>
    119 <tr><td>112</td><td>5,560</td><td>&nbsp;</td></tr>
    120 <tr><td>116</td><td>5,580</td><td>ptp-janicata</td></tr>
    121 <tr><td>120</td><td>5,600</td><td>ptp-hajdova</td></tr>
    122 <tr><td>124</td><td>5,620</td><td>&nbsp;</td></tr>
    123 <tr><td>128</td><td>5,640</td><td>ptp-bytovky</td></tr>
    124 <tr><td>132</td><td>5,660</td><td>ptp-chaty</td></tr>
    125 <tr><td>136<td>5,700</td></td><td>ptp-sekula</td></tr>
    126 <tr><td>140<td>5,720</td></td><td>&nbsp;</td></tr>
    127 </table>';
    128         $Output .= 'Aktualizováno: 10.8.2008';
     100        $Output .= '<br/><div align="center"><strong>Seznam AP a obsazení wifi kanálů:</strong></div>
     101<table class="WideTable">
     102<tr><th>Kanál</th><th>Frekvence [GHz]</th><th>SSID</th></tr>'; 
     103        // http://en.wikipedia.org/wiki/List_of_WLAN_channels
     104        $ChannelList = array(2412 => 1, 2417 => 2, 2422 => 3, 2427 => 4, 2432 => 5, 2437 => 6, 2442 => 7, 2447 => 8, 2452 => 9, 2457 => 10, 2462 => 11, 2467 => 12, 2472 => 13, 5210 => 42, 5250 => 50, 5290 => 48, 5500 => 100, 5520 => 104, 5540 => 108, 5560 => 112, 5580 => 116, 5600 => 120, 5620 => 124, 5640 => 128, 5660 => 132, 5700 => 140, 5720 => 144);
     105        $DbResult = $this->Database->query('SELECT Frequency FROM NetworkAP GROUP BY Frequency');
     106        while($DbRow = $DbResult->fetch_assoc())
     107        {
     108          $SSID = '';
     109          $DbResult2 = $this->Database->query('SELECT * FROM NetworkAP WHERE Frequency='.$DbRow['Frequency']);
     110          while($DbRow2 = $DbResult2->fetch_assoc())
     111            $SSID .= ', '.$DbRow2['SSID'];
     112          $SSID = substr($SSID, 2);
     113          $Output .= '<tr><td>'.$ChannelList[$DbRow['Frequency']].'</td><td>'.$DbRow['Frequency'].'</td><td>'.$SSID.'</td></tr>';
     114        }
     115        $Output .= '</table>';
    129116        break;
    130117      default:
Note: See TracChangeset for help on using the changeset viewer.