mirror of
https://github.com/ShaYmez/xlxd.git
synced 2024-11-04 23:21:16 -05:00
v2.3.8
add support for network traffic statistics via vnstat.
This commit is contained in:
parent
1e0ef79ffd
commit
8ea9385d56
@ -1,6 +1,16 @@
|
||||
xlx db v2.3.8
|
||||
|
||||
add support for network traffic statistics via vnstat.
|
||||
|
||||
- "config.inc.php"
|
||||
- "index.php"
|
||||
- "functions.php"
|
||||
|
||||
add traffic.php
|
||||
|
||||
xlx db v2.3.7
|
||||
|
||||
add background button color change on active page.
|
||||
add background color change on active page.
|
||||
|
||||
- "config.inc.php"
|
||||
- "layout.css"
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
session_start();
|
||||
|
||||
if (file_exists("./pgs/functions.php")) { require_once("./pgs/functions.php"); } else { die("functions.php does not exist."); }
|
||||
if (file_exists("./pgs/config.inc.php")) { require_once("./pgs/config.inc.php"); } else { die("config.inc.php does not exist."); }
|
||||
if (file_exists("./pgs/functions.php")) { require_once("./pgs/functions.php"); } else { die("functions.php does not exist."); }
|
||||
if (file_exists("./pgs/config.inc.php")) { require_once("./pgs/config.inc.php"); } else { die("config.inc.php does not exist."); }
|
||||
|
||||
if (!class_exists('ParseXML')) require_once("./pgs/class.parsexml.php");
|
||||
if (!class_exists('Node')) require_once("./pgs/class.node.php");
|
||||
@ -12,6 +12,8 @@ if (!class_exists('Station')) require_once("./pgs/class.station.php");
|
||||
if (!class_exists('Peer')) require_once("./pgs/class.peer.php");
|
||||
if (!class_exists('Interlink')) require_once("./pgs/class.interlink.php");
|
||||
|
||||
setlocale(LC_ALL, $VNStat['Locale']);
|
||||
|
||||
$Reflector = new xReflector();
|
||||
$Reflector->SetFlagFile("./pgs/country.csv");
|
||||
$Reflector->SetPIDFile($Service['PIDFile']);
|
||||
@ -19,38 +21,23 @@ $Reflector->SetXMLFile($Service['XMLFile']);
|
||||
|
||||
$Reflector->LoadXML();
|
||||
|
||||
if ($CallingHome['Active']) {
|
||||
|
||||
if ($CallingHome['Active']) {
|
||||
|
||||
$CallHomeNow = false;
|
||||
if (!file_exists($CallingHome['HashFile'])) {
|
||||
$Hash = CreateCode(16);
|
||||
$LastSync = 0;
|
||||
$Ressource = @fopen($CallingHome['HashFile'],"w");
|
||||
if ($Ressource) {
|
||||
@fwrite($Ressource, "<?php\n");
|
||||
@fwrite($Ressource, "\n".'$LastSync = 0;');
|
||||
@fwrite($Ressource, "\n".'$Hash = "'.$Hash.'";');
|
||||
@fwrite($Ressource, "\n\n".'?>');
|
||||
@fclose($Ressource);
|
||||
@exec("chmod 777 ".$CallingHome['HashFile']);
|
||||
$CallHomeNow = true;
|
||||
}
|
||||
UpdateHashFile($CallingHome['HashFile'], $LastSync, $Hash);
|
||||
$CallHomeNow = true;
|
||||
}
|
||||
else {
|
||||
include($CallingHome['HashFile']);
|
||||
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
|
||||
$Ressource = @fopen($CallingHome['HashFile'],"w");
|
||||
if ($Ressource) {
|
||||
@fwrite($Ressource, "<?php\n");
|
||||
@fwrite($Ressource, "\n".'$LastSync = '.time().';');
|
||||
@fwrite($Ressource, "\n".'$Hash = "'.$Hash.'";');
|
||||
@fwrite($Ressource, "\n\n".'?>');
|
||||
@fclose($Ressource);
|
||||
}
|
||||
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
|
||||
UpdateHashFile($CallingHome['HashFile'], time(), $Hash);
|
||||
$CallHomeNow = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($CallHomeNow || isset($_GET['callhome'])) {
|
||||
$Reflector->SetCallingHome($CallingHome, $Hash);
|
||||
$Reflector->ReadInterlinkFile();
|
||||
@ -58,14 +45,13 @@ if ($CallingHome['Active']) {
|
||||
$Reflector->PrepareReflectorXML();
|
||||
$Reflector->CallHome();
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$Hash = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?><!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@ -76,7 +62,7 @@ else {
|
||||
<meta name="author" content="<?php echo $PageOptions['MetaAuthor']; ?>" />
|
||||
<meta name="revisit" content="<?php echo $PageOptions['MetaRevisit']; ?>" />
|
||||
<meta name="robots" content="<?php echo $PageOptions['MetaAuthor']; ?>" />
|
||||
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php echo $Reflector->GetReflectorName(); ?> Reflector Dashboard</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/layout.css">
|
||||
@ -85,8 +71,8 @@ else {
|
||||
if ($PageOptions['PageRefreshActive']) {
|
||||
echo '
|
||||
<script>
|
||||
var PageRefresh;
|
||||
|
||||
var PageRefresh;
|
||||
|
||||
function ReloadPage() {
|
||||
document.location.href = "./index.php';
|
||||
if (isset($_GET['show'])) {
|
||||
@ -106,7 +92,7 @@ else {
|
||||
}
|
||||
</script>';
|
||||
}
|
||||
|
||||
|
||||
if (!isset($_GET['show'])) $_GET['show'] = "";
|
||||
?>
|
||||
</head>
|
||||
@ -118,7 +104,21 @@ else {
|
||||
<div id="menu">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td><a href="./index.php" class="menulink<?php if ($_GET['show'] == '') { echo 'active'; } ?>">Users / Modules</a></td><td><a href="./index.php?show=repeaters" class="menulink<?php if ($_GET['show'] == 'repeaters') { echo 'active'; } ?>">Repeaters / Nodes (<?php echo $Reflector->NodeCount(); ?>)</a></td><td><a href="./index.php?show=peers" class="menulink<?php if ($_GET['show'] == 'peers') { echo 'active'; } ?>">Peers (<?php echo $Reflector->PeerCount(); ?>)</a></td><td><a href="./index.php?show=reflectors" class="menulink<?php if ($_GET['show'] == 'reflectors') { echo 'active'; } ?>">Reflectorlist</a></td><td><a href="./index.php?show=liveircddb" class="menulink<?php if ($_GET['show'] == 'liveircddb') { echo 'active'; } ?>">D-Star live</a></td>
|
||||
<td><a href="./index.php" class="menulink<?php if ($_GET['show'] == '') { echo 'active'; } ?>">Users / Modules</a></td>
|
||||
<td><a href="./index.php?show=repeaters" class="menulink<?php if ($_GET['show'] == 'repeaters') { echo 'active'; } ?>">Repeaters / Nodes (<?php echo $Reflector->NodeCount(); ?>)</a></td>
|
||||
<td><a href="./index.php?show=peers" class="menulink<?php if ($_GET['show'] == 'peers') { echo 'active'; } ?>">Peers (<?php echo $Reflector->PeerCount(); ?>)</a></td>
|
||||
<td><a href="./index.php?show=reflectors" class="menulink<?php if ($_GET['show'] == 'reflectors') { echo 'active'; } ?>">Reflectorlist</a></td>
|
||||
<td><a href="./index.php?show=liveircddb" class="menulink<?php if ($_GET['show'] == 'liveircddb') { echo 'active'; } ?>">ircDDB live</a></td>
|
||||
<?php
|
||||
|
||||
if ($PageOptions['Traffic']['Show']) {
|
||||
echo '
|
||||
<td><a href="./index.php?show=traffic" class="menulink';
|
||||
if ($_GET['show'] == 'traffic') { echo 'active'; }
|
||||
echo '">Traffic</a></td>';
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -141,6 +141,7 @@ else {
|
||||
case 'liveircddb' : require_once("./pgs/liveircddb.php"); break;
|
||||
case 'peers' : require_once("./pgs/peers.php"); break;
|
||||
case 'reflectors' : require_once("./pgs/reflectors.php"); break;
|
||||
case 'traffic' : require_once("./pgs/traffic.php"); break;
|
||||
default : require_once("./pgs/users.php");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user