$table = '<table cellspacing="0"><tr> <th>Noise Intensity</th></tr>'; foreach ($this->arrayOfAreas as $area) { $table .= "\n" . '<tr>' . "<td data-x=\"{$area->x}\" data-y=\"{$area->y}\" data-width=\"{$area->width}\"" . "data-height=\"{$area->height}\" >{$area->noiseavg}</td>" . '</tr>'; } $table .= '</table>'; echo $table; } } $db = new FFDB(); $aps = simplexml_load_file('aps.xml'); if ($db->open("noisepoints")) { $bssid = "bssid"; $noise = "noise"; $timestamp = "timestamp"; $arrayofareas = new Areas(); $unknowns = array(); // 369235 = 2 hours // time()*1000 list($usec, $sec) = explode(" ", microtime()); $now = round(((double) $usec + (double) $sec) * 1000); $hours2ago = $now - 1000 * 60 * 60 * 2; $nothing = true; /// empty($_GET) || ($item[$timestamp] > $_GET['min'] && $item[$timestamp] < $_GET['max']) foreach ($db->getall(NULL) as $item) { // -40dB is considered as silence, -20dB is considered too loud //if($item[$timestamp] > $hours2ago){ foreach ($aps->entry as $entry) { if ($entry->string == $item[$bssid]) { foreach ($entry->area as $routerarea) { list($areaid, $height, $width, $x, $y) = $routerarea->attributes(); if ($x != 0 && $y != 0) {