db v2.3.9

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

View File

@ -17,7 +17,7 @@ $VNStat = array();
$PageOptions['ContactEmail'] = 'your_email'; // Support E-Mail address
$PageOptions['DashboardVersion'] = '2.3.8'; // Dashboard Version
$PageOptions['DashboardVersion'] = '2.3.9'; // Dashboard Version
$PageOptions['PageRefreshActive'] = true; // Activate automatic refresh
$PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds
@ -47,7 +47,6 @@ $PageOptions['MetaRevisit'] = 'After 30 Days';
$PageOptions['MetaRobots'] = 'index,follow'; // Meta Tag Values, usefull for Search Engine
$PageOptions['UserPage']['ShowFilter'] = true; // Show Filter on Users page
$PageOptions['Traffic']['Show'] = false; // Enable vnstat traffic statistics
$Service['PIDFile'] = '/var/log/xlxd.pid';
@ -60,6 +59,7 @@ $CallingHome['PushDelay'] = 600;
$CallingHome['Country'] = "your_country"; // Country
$CallingHome['Comment'] = "your_comment"; // Comment. Max 100 character
$CallingHome['HashFile'] = "/tmp/callinghome.php"; // Make sure the apache user has read and write permissions in this folder.
$CallingHome['LastCallHomefile'] = "/tmp/lastcallhome.php"; // lastcallhome.php can remain in the tmp folder
$CallingHome['OverrideIPAddress'] = ""; // Insert your IP address here. Leave blank for autodetection. No need to enter a fake address.
$CallingHome['InterlinkFile'] = "/xlxd/xlxd.interlink"; // Path to interlink file
@ -68,14 +68,4 @@ $VNStat['Interfaces'][0]['Name'] = 'eth0';
$VNStat['Interfaces'][0]['Address'] = 'eth0';
$VNStat['Binary'] = '/usr/bin/vnstat';
/*
include an extra config file for people who dont like to mess with shipped config.ing.php
this makes updating dashboard from git a little bit easier
*/
if (file_exists("../config.inc.php")) {
include ("../config.inc.php");
}
?>
?>

View File

@ -60,42 +60,6 @@ function CreateCode ($laenge) {
return $out;
}
function UpdateHashFile($HashFile, $newLastSync, $newHash) {
if (version_compare(phpversion(), "5.6", ">=")) {
$Ressource = @fopen($HashFile, "c");
if ($Ressource) {
if (flock($Ressource, LOCK_EX)) {
@fwrite($Ressource, "<?php\n");
@fwrite($Ressource, "\n".'$LastSync = '.$newLastSync.';');
@fwrite($Ressource, "\n".'$Hash = "'.$newHash.'";');
@fwrite($Ressource, "\n\n".'?>');
@fflush($Ressource);
@ftruncate($Ressource, ftell($Ressource));
@flock($Ressource, LOCK_UN);
}
@fclose($Ressource);
@chmod($HashFile, 0777);
return true;
}
}
else {
$Ressource = @fopen($HashFile, "w");
if ($Ressource) {
@fwrite($Ressource, "<?php\n");
@fwrite($Ressource, "\n".'$LastSync = 0;');
@fwrite($Ressource, "\n".'$Hash = "'.$newHash.'";');
@fwrite($Ressource, "\n\n".'?>');
@fclose($Ressource);
@exec("chmod 777 ".$CallingHome['HashFile']);
$CallHomeNow = true;
}
}
return false;
}
function VNStatLocalize($str) {
global $L;
if (isset($L[$str])) {