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:
parent
6d5055a927
commit
8b52495cf2
@ -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
|
xlx db v2.3.8
|
||||||
|
|
||||||
add support for network traffic statistics via vnstat.
|
add support for network traffic statistics via vnstat.
|
||||||
|
@ -22,17 +22,43 @@ $Reflector->LoadXML();
|
|||||||
if ($CallingHome['Active']) {
|
if ($CallingHome['Active']) {
|
||||||
|
|
||||||
$CallHomeNow = false;
|
$CallHomeNow = false;
|
||||||
if (!file_exists($CallingHome['HashFile'])) {
|
|
||||||
$Hash = CreateCode(16);
|
|
||||||
$LastSync = 0;
|
$LastSync = 0;
|
||||||
UpdateHashFile($CallingHome['HashFile'], $LastSync, $Hash);
|
$Hash = "";
|
||||||
$CallHomeNow = true;
|
|
||||||
|
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 {
|
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'])) {
|
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
|
||||||
UpdateHashFile($CallingHome['HashFile'], time(), $Hash);
|
|
||||||
$CallHomeNow = true;
|
$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=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=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=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
|
<?php
|
||||||
|
|
||||||
if ($PageOptions['Traffic']['Show']) {
|
if ($PageOptions['Traffic']['Show']) {
|
||||||
echo '
|
echo '
|
||||||
<td><a href="./index.php?show=traffic" class="menulink';
|
<td><a href="./index.php?show=traffic" class="menulink';
|
||||||
if ($_GET['show'] == 'traffic') { echo 'active'; }
|
if ($_GET['show'] == 'traffic') { echo 'active'; }
|
||||||
echo '">Traffic</a></td>';
|
echo '">Traffic statistics</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user