mirror of
https://github.com/ShaYmez/xlxd.git
synced 2024-09-28 15:56:34 -04:00
db v2.3.9
redesign for the callinghome.php
This commit is contained in:
parent
8b52495cf2
commit
74cede01af
@ -17,7 +17,7 @@ $VNStat = array();
|
|||||||
|
|
||||||
$PageOptions['ContactEmail'] = 'your_email'; // Support E-Mail address
|
$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['PageRefreshActive'] = true; // Activate automatic refresh
|
||||||
$PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds
|
$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['MetaRobots'] = 'index,follow'; // Meta Tag Values, usefull for Search Engine
|
||||||
|
|
||||||
$PageOptions['UserPage']['ShowFilter'] = true; // Show Filter on Users page
|
$PageOptions['UserPage']['ShowFilter'] = true; // Show Filter on Users page
|
||||||
|
|
||||||
$PageOptions['Traffic']['Show'] = false; // Enable vnstat traffic statistics
|
$PageOptions['Traffic']['Show'] = false; // Enable vnstat traffic statistics
|
||||||
|
|
||||||
$Service['PIDFile'] = '/var/log/xlxd.pid';
|
$Service['PIDFile'] = '/var/log/xlxd.pid';
|
||||||
@ -60,6 +59,7 @@ $CallingHome['PushDelay'] = 600;
|
|||||||
$CallingHome['Country'] = "your_country"; // Country
|
$CallingHome['Country'] = "your_country"; // Country
|
||||||
$CallingHome['Comment'] = "your_comment"; // Comment. Max 100 character
|
$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['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['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
|
$CallingHome['InterlinkFile'] = "/xlxd/xlxd.interlink"; // Path to interlink file
|
||||||
|
|
||||||
@ -68,14 +68,4 @@ $VNStat['Interfaces'][0]['Name'] = 'eth0';
|
|||||||
$VNStat['Interfaces'][0]['Address'] = 'eth0';
|
$VNStat['Interfaces'][0]['Address'] = 'eth0';
|
||||||
$VNStat['Binary'] = '/usr/bin/vnstat';
|
$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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -60,42 +60,6 @@ function CreateCode ($laenge) {
|
|||||||
return $out;
|
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) {
|
function VNStatLocalize($str) {
|
||||||
global $L;
|
global $L;
|
||||||
if (isset($L[$str])) {
|
if (isset($L[$str])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user