$labels .= ',' . "'{$capabilities}'"; } } $out .= '<script type="text/javascript"> var sec = new AwesomeChart(\'secCanvas\'); sec.chartType = "horizontal bars"; sec.title = "8 Most Popular Security Settings"; sec.data = [' . $datas . ']; sec.labels = [' . $labels . ']; sec.draw(); </script>'; $out .= "<hr/>"; $out .= '<div class="charts_container"> <canvas id="openCanvas" width="500" height="500"> Your web-browser does not support the HTML 5 canvas element. </canvas> </div>'; $out .= '<script type="text/javascript"> var open = new AwesomeChart(\'openCanvas\'); open.title = "Open wifi vs Protected"; open.data = [' . $stats['totalopen'] . ',' . ($stats['totalwifi'] - $stats['totalopen']) . ']; open.labels = [\'Open\',\'Protected\']; open.draw(); </script>'; $out .= '<p><strong>' . number_format($stats['totalopen'] / $stats['totalwifi'] * 100, 3, '.', '') . '%</strong> totaly unprotected wifis</p>'; $out .= Template::contentEnd(); $out .= Template::footer(); $file = fopen($cache, 'w'); fwrite($file, $out); fclose($file); echo file_get_contents($cache);
<?php require_once 'templates/template.php'; echo Template::header("Index"); echo Template::contentStart(); ?> <h1>Open Wifi Statistics</h1> <p>This is Open Wifi Statistics project Web Interface.</p> <h2>Interesting Links</h2> <p> <a href="https://github.com/uberspot/OpenWifiStatistics-web">Web Interface @ Github</a><br/> <a href="https://github.com/uberspot/OpenWifiStatistics">Android Client @ Github</a><br/> <a href="https://play.google.com/store/apps/details?id=com.ows.OpenWifiStatistics#?t=W251bGwsMSwxLDUwMSwiY29tLm93cy5PcGVuV2lmaVN0YXRpc3RpY3MiXQ..">Android Client @ Google Play</a><br/> </p> <?php echo Template::contentEnd(); echo Template::footer();