<form action="" method="post">
<table>
<tr><td>MAC Address :</td>
- <td><input id="mac" name="mac" type="text" class="rounded" value="<? echo $_GET['mac']; ?>"></td></tr>
+ <td><input id="mac" name="mac" type="text" class="rounded" value="<?php echo $_GET['mac']; ?>"></td></tr>
<tr><td><label>Client Name :</td>
- <td><input id="user" name="user" type="text" class="rounded" value="<? echo mysql_result($query,0,"USER") ?>"></td></tr>
+ <td><input id="user" name="user" type="text" class="rounded" value="<?php echo mysql_result($query,0,"USER") ?>"></td></tr>
<tr><td colspan=2 align="right">
<input name="submit" type="submit" value=" Update MAC ">
</td>
</table>
</form>
- <?
+ <?php
} elseif (isset($_POST['submit'])) {
$mac=$_POST['mac'];
$user=$_POST['user'];
<tr><td colspan=4>DEVICES</td></tr>
<tr><td><b>SSID</b></td><td><b>BSSID</b></td><td><b>MAC Address</b></td><td><b>Last Seen</b></td></tr>
<?php
- $query=open_database("select BSSID, MAC, from_unixtime(LASTSEEN) as LASTSEEN from clients order by BSSID desc, LASTSEEN desc");
+ $query=open_database("select BSSID, MAC, from_unixtime(LASTSEEN) as LASTSEEN from probe order by BSSID desc, LASTSEEN desc");
$num=mysql_numrows($query);
while ($num>0) {
$num--;
- $query2=open_database("select SSID from ssid where MAC='".mysql_result($query,$num,"BSSID")."'");
+ $query2=open_database("select SSID from beacon where BSSID='".mysql_result($query,$num,"BSSID")."'");
echo "<tr><td>";
$num2=mysql_numrows($query2);
if ($num2==0) {
+-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
+--
+-- Host: localhost Database: wireless
+-- ------------------------------------------------------
+-- Server version 5.5.41-0+wheezy1
+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+--
+-- Table structure for table `beacon`
+--
+
+DROP TABLE IF EXISTS `beacon`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `beacon` (
+ `SSID` varchar(32) NOT NULL DEFAULT '<CLOKED>',
+ `BSSID` varchar(17) NOT NULL DEFAULT '00:00:00:00:00:00',
+ `CHANNEL` varchar(4) DEFAULT NULL,
+ `RSSI` int(11) DEFAULT NULL,
+ `LASTSEEN` int(11) DEFAULT NULL,
+ PRIMARY KEY (`SSID`,`BSSID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `bssid`
--
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `probe`
+--
+
+DROP TABLE IF EXISTS `probe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `probe` (
+ `SSID` varchar(32) NOT NULL DEFAULT '<CLOKED>',
+ `MAC` varchar(17) NOT NULL DEFAULT '00:00:00:00:00:00',
+ `BSSID` varchar(17) NOT NULL DEFAULT '00:00:00:00:00:00',
+ `CHANNEL` varchar(4) DEFAULT NULL,
+ `RSSI` int(11) DEFAULT NULL,
+ `LASTSEEN` int(11) DEFAULT NULL,
+ PRIMARY KEY (`SSID`,`MAC`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `ssid`
--
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+-- Dump completed on 2016-03-01 22:40:22
<?php
-include("config.php");
include("includes.php");
?>
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form action="" method="post">
<table>
<tr><td>MAC Address :</td>
- <td><input id="mac" name="mac" type="text" class="rounded" value="<? echo $_GET['mac']; ?>"></td></tr>
+ <td><input id="mac" name="mac" type="text" class="rounded" value="<?php echo $_GET['mac']; ?>"></td></tr>
<tr><td><label>Client Name :</td>
- <td><input id="user" name="user" type="text" class="rounded" value="<? echo mysql_result($query,0,"USER") ?>"></td></tr>
+ <td><input id="user" name="user" type="text" class="rounded" value="<?php echo mysql_result($query,0,"USER") ?>"></td></tr>
<tr><td colspan=2 align="right">
<input name="submit" type="submit" value=" Update MAC ">
</td>
</table>
</form>
- <?
+ <?php
} elseif (isset($_POST['submit'])) {
$mac=$_POST['mac'];
$user=$_POST['user'];
<form action="" method="post">
<table>
<tr><td>MAC Address :</td>
- <td><input id="mac" name="mac" type="text" class="rounded" value="<? echo $_GET['mac']; ?>"></td></tr>
+ <td><input id="mac" name="mac" type="text" class="rounded" value="<?php echo $_GET['mac']; ?>"></td></tr>
<tr><td><label>Client Name :</td>
- <td><input id="user" name="user" type="text" class="rounded" value="<? echo mysql_result($query,0,"USER") ?>"></td></tr>
+ <td><input id="user" name="user" type="text" class="rounded" value="<?php echo mysql_result($query,0,"USER") ?>"></td></tr>
<tr><td colspan=2 align="right">
<input name="submit" type="submit" value=" Update MAC ">
</td>
</table>
</form>
- <?
+ <?php
} elseif (isset($_POST['submit'])) {
$mac=$_POST['mac'];
$user=$_POST['user'];
<div id='admin' class='admin'>
<table>
<tr><td colspan=4>DEVICES</td></tr>
- <tr><td><b>SSID</b></td><td><b>MAC Address</b></td><td><b>Last Seen</b></td></tr>
+ <tr><td><b>SSID</b></td><td><b>BSSID Address</b></td><td><b>Last Seen</b></td></tr>
<?php
- $query=open_database("select SSID, MAC, from_unixtime(LASTSEEN) as LASTSEEN from ssid order by SSID desc");
+ $query=open_database("select SSID, BSSID, from_unixtime(LASTSEEN) as LASTSEEN from beacon order by SSID desc");
$num=mysql_numrows($query);
while ($num>0) {
$num--;
- echo "<tr><td>".htmlspecialchars(mysql_result($query,$num,"SSID"))."</td><td>".mysql_result($query,$num,"MAC")."</td><td>".htmlspecialchars(mysql_result($query,$num,"LASTSEEN"))."</td></tr>";
+ echo "<tr><td>".htmlspecialchars(mysql_result($query,$num,"SSID"))."</td><td>".mysql_result($query,$num,"BSSID")."</td><td>".htmlspecialchars(mysql_result($query,$num,"LASTSEEN"))."</td></tr>";
}
?>
</table>