1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2025-08-09 08:42:25 -04:00

db v2.3.9

redesign for the callinghome.php
This commit is contained in:
LX1IQ 2018-01-19 10:15:04 +01:00 committed by GitHub
parent 6d5055a927
commit 8b52495cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 20 deletions

View File

@ -1,3 +1,11 @@
xlx db v2.3.9
redesign for the callinghome.php
- "config.inc.php"
- "index.php"
- "functions.php"
xlx db v2.3.8
add support for network traffic statistics via vnstat.

View File

@ -22,17 +22,43 @@ $Reflector->LoadXML();
if ($CallingHome['Active']) {
$CallHomeNow = false;
if (!file_exists($CallingHome['HashFile'])) {
$Hash = CreateCode(16);
$LastSync = 0;
UpdateHashFile($CallingHome['HashFile'], $LastSync, $Hash);
$CallHomeNow = true;
$Hash = "";
if (!file_exists($CallingHome['HashFile'])) {
$Ressource = fopen($CallingHome['HashFile'], "w+");
if ($Ressource) {
$Hash = CreateCode(16);
@fwrite($Ressource, "<?php\n");
@fwrite($Ressource, "\n".'$Hash = "'.$Hash.'";');
@fwrite($Ressource, "\n\n".'?>');
@fflush($Ressource);
@fclose($Ressource);
@chmod($HashFile, 0777);
}
}
else {
include($CallingHome['HashFile']);
require_once($CallingHome['HashFile']);
}
if (@file_exists($CallingHome['LastCallHomefile'])) {
if (@is_readable($CallingHome['LastCallHomefile'])) {
$tmp = @file($CallingHome['LastCallHomefile']);
if (isset($tmp[0])) {
$LastSync = $tmp[0];
}
unset($tmp);
}
}
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
UpdateHashFile($CallingHome['HashFile'], time(), $Hash);
$CallHomeNow = true;
$Ressource = @fopen($CallingHome['LastCallHomefile'], "w+");
if ($Ressource) {
@fwrite($Ressource, time());
@fflush($Ressource);
@fclose($Ressource);
@chmod($HashFile, 0777);
}
}
@ -106,14 +132,14 @@ else {
<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>
<td><a href="./index.php?show=liveircddb" class="menulink<?php if ($_GET['show'] == 'liveircddb') { echo 'active'; } ?>">D-Star 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>';
echo '">Traffic statistics</a></td>';
}
?>