testing for Chris
authorRuss Handorf <rhandorf@handorf.org>
Wed, 2 Mar 2016 03:41:46 +0000 (22:41 -0500)
committerRuss Handorf <rhandorf@handorf.org>
Wed, 2 Mar 2016 03:41:46 +0000 (22:41 -0500)
server/clientdevices.soho
server/database.sql
server/index.php
server/index.soho
server/wirelessnetworks.soho

index 28e03a2..a5ce3bb 100644 (file)
@@ -6,15 +6,15 @@ if (isset($_GET['mac']) && empty($_POST['submit'])) {
   <form action="" method="post">
   <table>
   <tr><td>MAC Address :</td>
   <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>
   <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>
   <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'];  
 } elseif (isset($_POST['submit'])) {
   $mac=$_POST['mac'];
   $user=$_POST['user'];  
@@ -42,11 +42,11 @@ function print_devs() {
       <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
       <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--;
   $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) {
     echo "<tr><td>";
     $num2=mysql_numrows($query2);
     if ($num2==0) {
index 681bc9f..3cb69c4 100644 (file)
@@ -1,3 +1,9 @@
+-- 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_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
@@ -9,6 +15,23 @@
 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 
 /*!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`
 --
 --
 -- Table structure for table `bssid`
 --
@@ -103,6 +126,24 @@ CREATE TABLE `knownclients` (
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 ) 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`
 --
 --
 -- Table structure for table `ssid`
 --
@@ -127,3 +168,4 @@ CREATE TABLE `ssid` (
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
+-- Dump completed on 2016-03-01 22:40:22
index 72ce911..c77a55c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
 <?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">
 include("includes.php");
 ?>
 <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
index ba003b5..e4c06ff 100644 (file)
@@ -6,15 +6,15 @@ if (isset($_GET['mac']) && empty($_POST['submit'])) {
   <form action="" method="post">
   <table>
   <tr><td>MAC Address :</td>
   <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>
   <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>
   <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'];  
 } elseif (isset($_POST['submit'])) {
   $mac=$_POST['mac'];
   $user=$_POST['user'];  
index 4e932a2..b459c76 100644 (file)
@@ -6,15 +6,15 @@ if (isset($_GET['mac']) && empty($_POST['submit'])) {
   <form action="" method="post">
   <table>
   <tr><td>MAC Address :</td>
   <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>
   <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>
   <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'];  
 } elseif (isset($_POST['submit'])) {
   $mac=$_POST['mac'];
   $user=$_POST['user'];  
@@ -40,13 +40,13 @@ function print_devs() {
     <div id='admin' class='admin'>
       <table>
       <tr><td colspan=4>DEVICES</td></tr>
     <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
   <?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--;
   $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>
   }
   ?>
       </table>