Skip to content
Permalink
Browse files

Update magichome.class.php

  • Loading branch information...
directman66 committed Sep 14, 2018
1 parent 7507a07 commit 6be0373098dd41bebbbefac8c3325a0f314343b1
Showing with 15 additions and 0 deletions.
  1. +15 −0 modules/magichome/magichome.class.php
@@ -237,7 +237,15 @@ function admin(&$out) {
$this->getinfo2($this->id, $debug);
}
if (substr($this->view_mode,0,11)=='set_favorit') {
$color=substr($this->view_mode,12);
$ar = hexdec(str_split($color, 2));
$this->set_favorit($this->id, $color);
$this->getinfo2($this->id, $debug);
}
sg('test.bra', $this->view_mode);
@@ -467,6 +475,12 @@ function delete_once($id) {
}
function set_favorit($id, $color) {
SQLExec("update magichome_devices set FAVORITCOLOR='$color' WHERE id=".$id);
$this->redirect("?");
}
function turnon($id) {
$cmd_rec = SQLSelectOne("SELECT IP, PORT FROM magichome_devices WHERE id=".$id);
@@ -845,6 +859,7 @@ function dbInstall($data = '') {
magichome_devices: MAC varchar(100) NOT NULL DEFAULT ''
magichome_devices: ONLINE varchar(100) NOT NULL DEFAULT ''
magichome_devices: LASTPING varchar(100) NOT NULL DEFAULT ''
magichome_devices: FAVORITCOLOR varchar(100) NOT NULL DEFAULT ''
magichome_devices: CURRENTCOLOR varchar(100) NOT NULL DEFAULT ''
magichome_devices: FIND varchar(100) NOT NULL DEFAULT ''
magichome_devices: LINKED_OBJECT varchar(100) NOT NULL DEFAULT ''

0 comments on commit 6be0373

Please sign in to comment.
You can’t perform that action at this time.