source: devel/www/is/wlan.php@ 89

Last change on this file since 89 was 89, checked in by george, 17 years ago

Přidáno: Chybějící soubory nového webu centrály.

File size: 1016 bytes
Line 
1<?php
2
3echo('<table border="1" cellspacing="0" cellpadding="2" style="font-sze: small;">');
4exec('iwlist scan', $Output);
5echo('<tr><th>ESSID</th><th>Kanál</th><th>Signál</th><th>MAC</th></tr>');
6foreach($Output as $Line)
7{
8 while(strpos($Line, ' ') !== false) $Line = str_replace(' ', ' ', $Line);
9 $LineParts = explode(' ', $Line);
10 $Item = explode(':', $LineParts[1]);
11 if($LineParts[0] != '') echo('<tr><td colspan="4">'.$LineParts[0].'</td></tr>');
12 //$Device = $LineParts[0];
13 if($Item[0] == 'ESSID') $ESSID = substr($Item[1], 1, -1);
14 if($LineParts[2] == 'GHz') $Channel = substr($LineParts[4], 0, -1);
15 if($LineParts[2] == 'Signal')
16 {
17 $Item = explode(':', $LineParts[3]);
18 $SignalLevel = $Item[1];
19 }
20 if($LineParts[1] == 'Cell')
21 {
22 echo('<tr><td>'.$ESSID.'</td><td>'.$Channel.'</td><td>'.$SignalLevel.'</td><td>'.$MAC.'</td></tr>');
23 $MAC = $LineParts[5];
24 }
25
26// foreach($LineParts as $LinePart)
27// echo($LinePart.',');
28// echo('<br>');
29}
30echo('</table>');
31
32?>
Note: See TracBrowser for help on using the repository browser.