Updated with frontend and added new features
This commit is contained in:
63
index.php
63
index.php
@@ -1,45 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright 2010 Pieter Iserbyt
|
||||
<?php
|
||||
$auto_reload = true;
|
||||
include('header-inc.php');
|
||||
|
||||
This file is part of Pamela.
|
||||
|
||||
Pamela is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
$result = http_parse_message(http_get("http://localhost/pamela/data.php"));
|
||||
$result = preg_replace("/\s/","",$result->body); // get rid of linebreaks
|
||||
|
||||
Pamela is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
$decode = json_decode($result);
|
||||
$decode = preg_replace("/^([0-9a-f]{2}([:]|$)){6}$/i",'{$0}',$decode);
|
||||
sort($decode,SORT_STRING | SORT_FLAG_CASE);
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
$array = preg_grep("/^(?!\.)/",$decode);
|
||||
|
||||
require_once("config.php");
|
||||
?><html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Pamela</title>
|
||||
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
|
||||
<script src="js/pamela-conf.php" type="text/javascript"></script>
|
||||
<script src="js/pamela-buttons.js" type="text/javascript"></script>
|
||||
<script src="js/pamela-nodes.js" type="text/javascript"></script>
|
||||
<script src="js/pamela-matrices.js" type="text/javascript"></script>
|
||||
<script src="js/pamela.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: <?php echo PAM_BGCOLOR; ?>;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="pamela"></canvas>
|
||||
</body>
|
||||
echo "<h2>Who's here right now?</h2>";
|
||||
echo "<ul>";
|
||||
foreach($array as $entry) {
|
||||
if(substr($entry,0,1) == "{") {
|
||||
echo "<li class='macaddr'>".$entry."</li>";
|
||||
}
|
||||
else{
|
||||
echo "<li>".$entry."</li>";
|
||||
}
|
||||
}
|
||||
echo "</ul>";
|
||||
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user