Feature, new version with homematic and different Buttons fuer FS20
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1546 2b470e98-0d58-463d-a4d8-8e2adae1ed80
16
webfrontend/pgm3/include/dblog.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
##DB-Functions for pgm3
|
||||
|
||||
include "config.php";
|
||||
|
||||
|
||||
|
||||
### If DB-query is used, this is the only point of connect. ###
|
||||
if ($DBUse=="1") {
|
||||
@mysql_connect($DBNode, $DBUser, $DBPass) or die("Can't connect");
|
||||
@mysql_select_db($DBName) or die("No database found");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,121 +1,161 @@
|
||||
<?php
|
||||
|
||||
################# Creates graphics for pgm3
|
||||
################
|
||||
|
||||
include "../config.php";
|
||||
|
||||
|
||||
$drawfs20=$_GET['drawfs20'];
|
||||
$statefs20=$_GET['statefs20'];
|
||||
$datefs20=$_GET['datefs20'];
|
||||
$room=$_GET['room'];
|
||||
|
||||
|
||||
## do we really need a new graphic??
|
||||
#$execorder=$tailpath.' -1 '.$file;
|
||||
#exec($execorder,$tail1);
|
||||
#$parts = explode(" ", $tail1[0]);
|
||||
#$date=$parts[0];
|
||||
|
||||
|
||||
$savefile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.".$datefs20.".png";
|
||||
if (file_exists($savefile)) {
|
||||
|
||||
$im2 = @ImageCreateFromPNG($savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im2);
|
||||
exit; # ;-)))
|
||||
}
|
||||
else #delete old pngs
|
||||
{
|
||||
$delfile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.*.png";
|
||||
foreach (glob($delfile) as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$im = ImageCreateTrueColor($imgmaxxfs20,$imgmaxyfs20);
|
||||
$black = ImageColorAllocate($im, 0, 0, 0);
|
||||
$bg1p = ImageColorAllocate($im, $bg1_R,$bg1_G,$bg1_B);
|
||||
$bg2p = ImageColorAllocate($im, $buttonBg_R,$buttonBg_G,$buttonBg_B);
|
||||
$bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B);
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray= ImageColorAllocate($im, 133, 133, 133);
|
||||
$red = ImageColorAllocate($im, 255, 0, 0);
|
||||
$green = ImageColorAllocate($im, 0, 255, 0);
|
||||
$yellow= ImageColorAllocate($im, 255, 255, 0);
|
||||
$orange= ImageColorAllocate($im, 255, 230, 25);
|
||||
|
||||
|
||||
ImageFill($im, 0, 0, $bg2p);
|
||||
ImageRectangle($im, 0, 0, $imgmaxxfs20-1, $imgmaxyfs20-1, $white);
|
||||
|
||||
if ((rtrim($statefs20)=="on" ) or (rtrim($statefs20)=="dimup") or (rtrim($statefs20)=="thermo-on"))
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.on.gif");
|
||||
}
|
||||
else
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.off.gif");
|
||||
};
|
||||
$w = imagesx($im2);
|
||||
$h = imagesy($im2);
|
||||
|
||||
$datefs20sep=explode(" ",$datefs20);
|
||||
if ((substr($statefs20,0,12)=="on-for-timer" )
|
||||
or
|
||||
($statefs20=="toggle"))
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.on.gif");
|
||||
$im3 = ImageCreateFromGIF("FS20.off.gif");
|
||||
Imagecopy($im,$im3,($imgmaxxfs20/2)-12,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-2,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
}
|
||||
else
|
||||
{
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-8,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
};
|
||||
###ttf
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
$text=$statefs20;
|
||||
$fontsize=7;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttfb,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+20;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttfb, $text);
|
||||
|
||||
$text=$datefs20sep[0];
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+30;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$text=$datefs20sep[1];
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+40;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
|
||||
ImageTTFText ($im, $fs20fontsizetitel, 0, 5, 15, $txtcolor, $fontttfb, $drawfs20);
|
||||
if ($room != '') {ImageTTFText ($im, 7, 0, 5, 26, $txtcolor, $fontttf, $txtroom.$room);};
|
||||
|
||||
|
||||
imagePng($im,$savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im);
|
||||
?>
|
||||
<?php
|
||||
|
||||
################# Creates graphics for pgm3
|
||||
################
|
||||
|
||||
include "../config.php";
|
||||
|
||||
|
||||
$drawfs20=$_GET['drawfs20'];
|
||||
$statefs20=$_GET['statefs20'];
|
||||
$datefs20=$_GET['datefs20'];
|
||||
$icon=$_GET['icon'];
|
||||
$emap=$_GET['emap'];
|
||||
$subType=$_GET['subType'];
|
||||
$room=$_GET['room'];
|
||||
|
||||
$img_path=$AbsolutPath."/include/img/";
|
||||
|
||||
## do we really need a new graphic??
|
||||
#$execorder=$tailpath.' -1 '.$file;
|
||||
#exec($execorder,$tail1);
|
||||
#$parts = explode(" ", $tail1[0]);
|
||||
#$date=$parts[0];
|
||||
|
||||
|
||||
$savefile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.".$datefs20.".png";
|
||||
if (file_exists($savefile)) {
|
||||
|
||||
$im2 = @ImageCreateFromPNG($savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im2);
|
||||
exit; # ;-)))
|
||||
}
|
||||
else #delete old pngs
|
||||
{
|
||||
$delfile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.*.png";
|
||||
foreach (glob($delfile) as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$im = ImageCreateTrueColor($imgmaxxfs20,$imgmaxyfs20);
|
||||
$black = ImageColorAllocate($im, 0, 0, 0);
|
||||
$bg1p = ImageColorAllocate($im, $bg1_R,$bg1_G,$bg1_B);
|
||||
$bg2p = ImageColorAllocate($im, $buttonBg_R,$buttonBg_G,$buttonBg_B);
|
||||
$bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B);
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray= ImageColorAllocate($im, 133, 133, 133);
|
||||
$red = ImageColorAllocate($im, 255, 0, 0);
|
||||
$green = ImageColorAllocate($im, 0, 255, 0);
|
||||
$yellow= ImageColorAllocate($im, 255, 255, 0);
|
||||
$orange= ImageColorAllocate($im, 255, 230, 25);
|
||||
|
||||
|
||||
ImageFill($im, 0, 0, $bg2p);
|
||||
ImageRectangle($im, 0, 0, $imgmaxxfs20-1, $imgmaxyfs20-1, $white);
|
||||
|
||||
$datefs20sep=explode(" ",$datefs20);
|
||||
$statefs20sep=explode(" ",$statefs20);
|
||||
|
||||
if (($icon!='')) {
|
||||
if ((substr($statefs20sep[0],0,3)=='dim')) {
|
||||
$statefs20tmp = 'on';
|
||||
}
|
||||
else {
|
||||
$statefs20tmp = $statefs20sep[0];
|
||||
}
|
||||
$im2 = ImageCreateFromPNG($img_path.$icon.".".$statefs20tmp.".png");
|
||||
}
|
||||
else {
|
||||
$im2 = ImageCreateFromPNG($img_path.$statefs20sep[0].".png");
|
||||
}
|
||||
|
||||
$w = imagesx($im2);
|
||||
$h = imagesy($im2);
|
||||
|
||||
if ($roomname=='0') {
|
||||
$roomc=$roomcorr;
|
||||
}
|
||||
else {
|
||||
$roomc='0';
|
||||
}
|
||||
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-20,($imgmaxyfs20/2)-7-$roomc,0,0,$w,$h);
|
||||
|
||||
|
||||
$datefs20sep_1=explode(" ",$datefs20);
|
||||
if (($dategerman == '1')) {
|
||||
$datefs20_tmp_1 = $datefs20sep_1[0];
|
||||
$datefs20sep_2=explode("-",$datefs20_tmp_1);
|
||||
$date_button = $datefs20sep_2[2].".".$datefs20sep_2[1].".".$datefs20sep_2[0];
|
||||
}
|
||||
else {
|
||||
$date_button = $datefs20sep_1[0];
|
||||
}
|
||||
$time_button = $datefs20sep_1[1];
|
||||
|
||||
|
||||
if ($namesortbutton == '1') {
|
||||
$pos_1 = strpos($drawfs20,$namesortbuttonsign);
|
||||
if ($pos_1 > 0) {
|
||||
$drawfs20=substr($drawfs20,$pos_1+1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($namereplacebutton == '1') {
|
||||
$drawfs20=str_replace($namereplacebuttonsign, " ", $drawfs20);
|
||||
}
|
||||
|
||||
|
||||
|
||||
###ttf
|
||||
|
||||
if ($emap=='') {
|
||||
$text=$statefs20;
|
||||
}
|
||||
else {
|
||||
$text=$emap;
|
||||
}
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
$fontsize=7;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttfb,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+23;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttfb, $text);
|
||||
|
||||
$text=$date_button;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
#$xcord = ($imgmaxxfs20/2)-($textwidth/2)+53;
|
||||
$xcord = ($imgmaxxfs20)-($textwidth)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+33;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$text=$time_button;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
#$xcord = ($imgmaxxfs20/2)-($textwidth/2)-58;
|
||||
$xcord = 3;
|
||||
$ycord = ($imgmaxyfs20/2)+33;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
|
||||
|
||||
ImageTTFText ($im, $fs20fontsizetitel, 0, 5, 15, $txtcolor, $fontttfb, $drawfs20);
|
||||
if ($room != '' and $roomname=='1') {
|
||||
ImageTTFText ($im, 7, 0, 5, 26, $txtcolor, $fontttf, $txtroom.$room);
|
||||
};
|
||||
|
||||
|
||||
imagePng($im,$savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im);
|
||||
?>
|
||||
|
||||
@@ -1,80 +1,138 @@
|
||||
<?php
|
||||
|
||||
##Pulldown for FS20-Devices
|
||||
|
||||
|
||||
$orders=array("on","off","dimup","dimdown","on-for-timer","off-for-timer","dim06%","dim12%",
|
||||
"dim18%","dim25%","dim31%","dim37%","dim43%","dim50%","dim56%","dim62%","dim68%",
|
||||
"dim75%","dim81%","dim87%","dim93%","dim100%","dimupdown","on-old-for-timer","reset",
|
||||
"sendstate","timer","toggle");
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec2>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=fs20dev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($fs20devs); $m++)
|
||||
{
|
||||
echo $fs20dev;
|
||||
if ($fs20dev==$fs20devs[$m])
|
||||
{
|
||||
echo "<option selected>$fs20devs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$fs20devs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
echo "</select>
|
||||
<select name=valuetime size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < 6000; $m++)
|
||||
{if ( $m > 20) $m = $m+4;
|
||||
if ( $m > 60) $m = $m+55;
|
||||
echo "<option>$m</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
##Pulldown for FS20-Devices
|
||||
|
||||
|
||||
$orders=array("on","off","dimup","dimdown","on-for-timer","off-for-timer","dim06%","dim12%",
|
||||
"dim18%","dim25%","dim31%","dim37%","dim43%","dim50%","dim56%","dim62%","dim68%",
|
||||
"dim75%","dim81%","dim87%","dim93%","dim100%","dimupdown","on-old-for-timer","reset",
|
||||
"sendstate","timer","toggle");
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec2>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=fs20dev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($fs20devs); $m++)
|
||||
{
|
||||
echo $fs20dev;
|
||||
if ($fs20dev==$fs20devs[$m])
|
||||
{
|
||||
echo "<option selected>$fs20devs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$fs20devs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
function mknullfs20($zahl,$stellen) {
|
||||
for($i=strlen($zahl);$i<$stellen;$i++){
|
||||
$zahl="0" . $zahl;
|
||||
}
|
||||
return $zahl;
|
||||
}
|
||||
|
||||
echo "</select>
|
||||
<select name=valuetime size=1> ### <------ valuetime mu<6D> eindeutig werden !!!
|
||||
<option></option>";
|
||||
echo "<option value=0>HH:MM:SS:MS</option>";
|
||||
echo "<option value=0>00:00:00:00</option>";
|
||||
echo "<option value=0.25>00:00:00:25</option>";
|
||||
echo "<option value=0.5>00:00:00:50</option>";
|
||||
echo "<option value=0.75>00:00:00:75</option>";
|
||||
echo "<option value=1>00:00:01:00</option>";
|
||||
echo "<option value=1.25>00:00:01:25</option>";
|
||||
echo "<option value=1.5>00:00:01:50</option>";
|
||||
echo "<option value=1.75>00:00:01:75</option>";
|
||||
echo "<option value=2>00:00:02:00</option>";
|
||||
echo "<option value=2.25>00:00:02:25</option>";
|
||||
echo "<option value=2.5>00:00:02:50</option>";
|
||||
echo "<option value=2.75>00:00:02:75</option>";
|
||||
echo "<option value=3>00:00:03:00</option>";
|
||||
echo "<option value=3.25>00:00:03:25</option>";
|
||||
echo "<option value=3.5>00:00:03:50</option>";
|
||||
echo "<option value=3.75>00:00:03:75</option>";
|
||||
echo "<option value=4>00:00:04:00</option>";
|
||||
echo "<option value=4.5>00:00:04:50</option>";
|
||||
echo "<option value=5>00:00:05:00</option>";
|
||||
echo "<option value=5.5>00:00:05:50</option>";
|
||||
echo "<option value=6>00:00:06:00</option>";
|
||||
echo "<option value=6.5>00:00:06:50</option>";
|
||||
echo "<option value=7>00:00:07:00</option>";
|
||||
echo "<option value=7.5>00:00:07:50</option>";
|
||||
for ($m=8; $m < 15360; $m++) {
|
||||
if ( $m > 16) $m = $m+1;
|
||||
if ( $m > 32) $m = $m+2;
|
||||
if ( $m > 64) $m = $m+4;
|
||||
if ( $m > 128) $m = $m+8;
|
||||
if ( $m > 256) $m = $m+16;
|
||||
if ( $m > 512) $m = $m+32;
|
||||
if ( $m > 1024) $m = $m+64;
|
||||
if ( $m > 2048) $m = $m+128;
|
||||
if ( $m > 4096) $m = $m+256;
|
||||
if ( $m > 8192) $m = $m+512;
|
||||
if ( $m > 7)
|
||||
$sek=$m;
|
||||
$std=floor($sek/3600);
|
||||
$min=floor(($sek-$std*3600)/60);
|
||||
$sec=$sek-$std*3600-$min*60;
|
||||
$std=mknullfs20($std,2);
|
||||
$min=mknullfs20($min,2);
|
||||
$sec=mknullfs20($sec,2);
|
||||
echo "<option value=$m>$std:$min:$sec</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
# <select name=valuetime size=1>
|
||||
# <option></option>";
|
||||
# for ($m=0; $m < 6000; $m++)
|
||||
# {if ( $m > 20) $m = $m+4;
|
||||
# if ( $m > 60) $m = $m+55;
|
||||
# echo "<option>$m</option>";}
|
||||
#
|
||||
# echo"</select>
|
||||
|
||||
?>
|
||||
|
||||
@@ -51,7 +51,7 @@ function drawgnuplot($gnudraw,$gnutyp,$gnuplot,$pictype,$logpath,$FHTyrange,$FHT
|
||||
$OUT2="set output 'tmp/$gnudraw1.$pictype'";
|
||||
|
||||
$gplothdr="
|
||||
set terminal $pictype
|
||||
set terminal $pictype crop
|
||||
set xdata time
|
||||
set timefmt '%Y-%m-%d_%H:%M:%S'
|
||||
set xlabel ' '
|
||||
|
||||
131
webfrontend/pgm3/include/hmpulldown.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
##Pulldown for HomeMatic-Devices
|
||||
|
||||
|
||||
$order1=array("on","off","toggle","on-for-timer");
|
||||
$order2=range(0, 100, 1);
|
||||
$order3=array("pair","unpair","statusRequest","sign","raw","reset");
|
||||
$order8=array("-- Dim in % --");
|
||||
$order9=array("---------------");
|
||||
$orders=array_merge($order1, $order9, $order8, $order2, $order9, $order3);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>HomeMatic: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec4>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=culhmdev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($culhmdevs); $m++)
|
||||
{
|
||||
echo $culhmdev;
|
||||
if ($culhmdev==$culhmdevs[$m])
|
||||
{
|
||||
echo "<option selected>$culhmdevs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$culhmdevs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
function mknullhm($zahl,$stellen) {
|
||||
for($i=strlen($zahl);$i<$stellen;$i++){
|
||||
$zahl="0" . $zahl;
|
||||
}
|
||||
return $zahl;
|
||||
}
|
||||
|
||||
echo "</select>
|
||||
<select name=valuetime size=1> ### <------ valuetime mu<6D> eindeutig werden !!!
|
||||
<option></option>";
|
||||
echo "<option value=0>HH:MM:SS:MS</option>";
|
||||
echo "<option value=0>00:00:00:00</option>";
|
||||
echo "<option value=0.25>00:00:00:25</option>";
|
||||
echo "<option value=0.5>00:00:00:50</option>";
|
||||
echo "<option value=0.75>00:00:00:75</option>";
|
||||
echo "<option value=1>00:00:01:00</option>";
|
||||
echo "<option value=1.25>00:00:01:25</option>";
|
||||
echo "<option value=1.5>00:00:01:50</option>";
|
||||
echo "<option value=1.75>00:00:01:75</option>";
|
||||
echo "<option value=2>00:00:02:00</option>";
|
||||
echo "<option value=2.25>00:00:02:25</option>";
|
||||
echo "<option value=2.5>00:00:02:50</option>";
|
||||
echo "<option value=2.75>00:00:02:75</option>";
|
||||
echo "<option value=3>00:00:03:00</option>";
|
||||
echo "<option value=3.25>00:00:03:25</option>";
|
||||
echo "<option value=3.5>00:00:03:50</option>";
|
||||
echo "<option value=3.75>00:00:03:75</option>";
|
||||
echo "<option value=4>00:00:04:00</option>";
|
||||
echo "<option value=4.5>00:00:04:50</option>";
|
||||
echo "<option value=5>00:00:05:00</option>";
|
||||
echo "<option value=5.5>00:00:05:50</option>";
|
||||
echo "<option value=6>00:00:06:00</option>";
|
||||
echo "<option value=6.5>00:00:06:50</option>";
|
||||
echo "<option value=7>00:00:07:00</option>";
|
||||
echo "<option value=7.5>00:00:07:50</option>";
|
||||
for ($m=8; $m < 15360; $m++) {
|
||||
if ( $m > 16) $m = $m+1;
|
||||
if ( $m > 32) $m = $m+2;
|
||||
if ( $m > 64) $m = $m+4;
|
||||
if ( $m > 128) $m = $m+8;
|
||||
if ( $m > 256) $m = $m+16;
|
||||
if ( $m > 512) $m = $m+32;
|
||||
if ( $m > 1024) $m = $m+64;
|
||||
if ( $m > 2048) $m = $m+128;
|
||||
if ( $m > 4096) $m = $m+256;
|
||||
if ( $m > 8192) $m = $m+512;
|
||||
if ( $m > 7)
|
||||
$sek=$m;
|
||||
$std=floor($sek/3600);
|
||||
$min=floor(($sek-$std*3600)/60);
|
||||
$sec=$sek-$std*3600-$min*60;
|
||||
$std=mknullhm($std,2);
|
||||
$min=mknullhm($min,2);
|
||||
$sec=mknullhm($sec,2);
|
||||
echo "<option value=$m>$std:$min:$sec</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
?>
|
||||
BIN
webfrontend/pgm3/include/img/FS20.off.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
webfrontend/pgm3/include/img/FS20.on.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
webfrontend/pgm3/include/img/dim06%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim100%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim12%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim18%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim25%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim31%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim37%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim43%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim50%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim56%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim62%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim68%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim75%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim81%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim87%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dim93%.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
webfrontend/pgm3/include/img/dimdown.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
webfrontend/pgm3/include/img/dimup.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
webfrontend/pgm3/include/img/off-for-timer.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
webfrontend/pgm3/include/img/off.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
webfrontend/pgm3/include/img/on-for-timer.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
webfrontend/pgm3/include/img/on-till.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
webfrontend/pgm3/include/img/on.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
webfrontend/pgm3/include/img/switch.off.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
webfrontend/pgm3/include/img/switch.on.png
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
webfrontend/pgm3/include/img/switch_gn.off-for-timer.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
webfrontend/pgm3/include/img/switch_gn.off.png
Normal file
|
After Width: | Height: | Size: 359 B |
BIN
webfrontend/pgm3/include/img/switch_gn.on-for-timer.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
webfrontend/pgm3/include/img/switch_gn.on.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
webfrontend/pgm3/include/img/switch_rt.off-for-timer.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
webfrontend/pgm3/include/img/switch_rt.off.png
Normal file
|
After Width: | Height: | Size: 359 B |
BIN
webfrontend/pgm3/include/img/switch_rt.on.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
webfrontend/pgm3/include/img/toggle.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |