minor bugfix: rebuild picture of fht on every entry in the log (not only on change of measured-temp. Changes in fht.php
logrotate: better warning if there are wrong rights for the pgm3-logrotate git-svn-id: https://svn.fhem.de/fhem/trunk@117 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -152,3 +152,6 @@ It is not necessary to tell fhem that there are other logs.
|
|||||||
2007-11-30 (071130)
|
2007-11-30 (071130)
|
||||||
-- feature: RSS-Feeds added
|
-- feature: RSS-Feeds added
|
||||||
|
|
||||||
|
2007-12-03 (071203)
|
||||||
|
-- minor: rebuild picture of fht on every entry in the log (not only on change of measured-temp.
|
||||||
|
|
||||||
|
|||||||
@@ -52,3 +52,7 @@
|
|||||||
- Martin 2007-11-30
|
- Martin 2007-11-30
|
||||||
- feature: RSS-Feeds added. New include/rssfeeds.php. Changes in index.php and config.php
|
- feature: RSS-Feeds added. New include/rssfeeds.php. Changes in index.php and config.php
|
||||||
|
|
||||||
|
- Martin 2007-12-03
|
||||||
|
-- minor bugfix: rebuild picture of fht on every entry in the log (not only on change of measured-temp. Changes in fht.php
|
||||||
|
-- logrotate: better warning if there are wrong rights for the pgm3-logrotate
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
# this is only possible, if the webserver (e.g.wwwrun) has the rights ro write the
|
# this is only possible, if the webserver (e.g.wwwrun) has the rights ro write the
|
||||||
# files from fh1000.pl. If you want that then run fhz1000.pl as wwwrun too.
|
# files from fh1000.pl. If you want that then run fhz1000.pl as wwwrun too.
|
||||||
# if 'yes' then only the needed lines are in the logfiles, the rest will be deleted.
|
# if 'yes' then only the needed lines are in the logfiles, the rest will be deleted.
|
||||||
$logrotate='yes'; # yes/no default='no'
|
$logrotate='yes'; # yes/no default='yes'
|
||||||
|
|
||||||
|
|
||||||
## Kioskmode. Only show but don't switch anything. Values: on/off
|
## Kioskmode. Only show but don't switch anything. Values: on/off
|
||||||
|
|||||||
@@ -20,6 +20,34 @@ setlocale (LC_ALL, 'de_DE.utf8');
|
|||||||
|
|
||||||
if (! file_exists($file)) show_error($file,$drawfht,$imgmaxxfht,$imgmaxyfht);
|
if (! file_exists($file)) show_error($file,$drawfht,$imgmaxxfht,$imgmaxyfht);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## do we really need a new graphic??
|
||||||
|
$execorder=$tailpath.' -1 '.$file;
|
||||||
|
exec($execorder,$tail1);
|
||||||
|
$parts = explode(" ", $tail1[0]);
|
||||||
|
$date=$parts[0];
|
||||||
|
|
||||||
|
#if the expected graphic already exist then do not redraw the picture
|
||||||
|
|
||||||
|
$savefile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.".$parts[0].".png";
|
||||||
|
if (file_exists($savefile)) {
|
||||||
|
|
||||||
|
$im2 = @ImageCreateFromPNG($savefile);
|
||||||
|
header("Content-type: image/png");
|
||||||
|
imagePng($im2);
|
||||||
|
exit; # ;-)))
|
||||||
|
}
|
||||||
|
else #delete old pngs
|
||||||
|
{
|
||||||
|
$delfile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.*.png";
|
||||||
|
foreach (glob($delfile) as $filename) {
|
||||||
|
unlink($filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$_SESSION["arraydata"] = array();
|
$_SESSION["arraydata"] = array();
|
||||||
|
|
||||||
|
|
||||||
@@ -63,23 +91,23 @@ setlocale (LC_ALL, 'de_DE.utf8');
|
|||||||
$resultreverse = array_reverse($_SESSION["arraydata"]);
|
$resultreverse = array_reverse($_SESSION["arraydata"]);
|
||||||
|
|
||||||
|
|
||||||
#if the expected graphic alreay exist then do not redraw the picture
|
#if the expected graphic already exist then do not redraw the picture
|
||||||
|
|
||||||
$savefile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.".$resultreverse[0][0].".png";
|
# $savefile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.".$resultreverse[0][0].".png";
|
||||||
if (file_exists($savefile)) {
|
# if (file_exists($savefile)) {
|
||||||
|
#
|
||||||
$im2 = @ImageCreateFromPNG($savefile);
|
# $im2 = @ImageCreateFromPNG($savefile);
|
||||||
header("Content-type: image/png");
|
# header("Content-type: image/png");
|
||||||
imagePng($im2);
|
# imagePng($im2);
|
||||||
exit; # ;-)))
|
# exit; # ;-)))
|
||||||
}
|
# }
|
||||||
else #delete old pngs
|
# else #delete old pngs
|
||||||
{
|
# {
|
||||||
$delfile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.*.png";
|
# $delfile=$AbsolutPath."/tmp/FHT.".$drawfht.".log.*.png";
|
||||||
foreach (glob($delfile) as $filename) {
|
# foreach (glob($delfile) as $filename) {
|
||||||
unlink($filename);
|
# unlink($filename);
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
|
||||||
$im = ImageCreateTrueColor($imgmaxxfht,$imgmaxyfht);
|
$im = ImageCreateTrueColor($imgmaxxfht,$imgmaxyfht);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function LogRotate($array,$file,$logrotatelines)
|
|||||||
$filename=$file;
|
$filename=$file;
|
||||||
|
|
||||||
if (!$handle = fopen($filename, "w")) {
|
if (!$handle = fopen($filename, "w")) {
|
||||||
print "Logrotate: cannot open $filename -- correct rights??";
|
print "Logrotate: cannot open $filename -- correct rights?? Read the chapter in the config.php!";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
for ($x = $counter-$logrotatelines; $x < $counter; $x++)
|
for ($x = $counter-$logrotatelines; $x < $counter; $x++)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ include "include/gnuplot.php";
|
|||||||
include "include/functions.php";
|
include "include/functions.php";
|
||||||
|
|
||||||
|
|
||||||
$pgm3version='071130';
|
$pgm3version='071203';
|
||||||
|
|
||||||
|
|
||||||
$Action = $_POST['Action'];
|
$Action = $_POST['Action'];
|
||||||
|
|||||||
Reference in New Issue
Block a user