Permalink
Browse files

Merge pull request #251 from tarasfrompir/master

Подправлено кнопка модуля
  • Loading branch information...
T-REX-XP committed Aug 21, 2018
2 parents c6b53f4 + 5be3669 commit 0cf52a33159a338e3ec4b3221e9e2a1d51233363
Showing with 8 additions and 8 deletions.
  1. +7 −7 modules/ssdp_finder/ssdp_devices_scan.inc.php
  2. +1 −1 templates/ssdp_finder/ssdp_devices_scan.html
@@ -58,7 +58,7 @@ function Scan(){
$existed = SQLSelectOne("SELECT * FROM $table_name WHERE UUID='".$uuid."'");
// проверяем на наличие модуля в системе
$mod_cheked = SQLSelectOne("SELECT * FROM plugins WHERE MODULE_NAME='".$modules['YeelightSmartBulb']."'");
$mod_cheked = SQLSelectOne("SELECT * FROM plugins WHERE MODULE_NAME LIKE '".$modules['YeelightSmartBulb']."'");
if (!array_search_result($result, 'UUID', $uuid) && !is_null($uuid) && !($existed)) {
@@ -78,8 +78,8 @@ function Scan(){
"MANUFACTURER" => 'Yeelight',//Manufacturer
"SERVICES"=> 'RGBWSmartLight',//list services of device
"CONTROLADDRESS"=> $control_url,//list services of device
"EXTENDED_MODULES"=>$modules['YeelightSmartBulb'],// проверка на наличие модуля
"MODULE_INSTALLED"=>$mod_cheked, //chek the installed module
"EXTENDED_MODULES"=>$modules['YeelightSmartBulb'],// проверка на наличие модуля
"MODULE_INSTALLED"=>$mod_cheked, //chek the installed module
];
$_SESSION[$uuid] = $logo;
//session_write_close();
@@ -128,8 +128,8 @@ function Scan(){
// need for chek device type
$device_type = explode(":", $device["deviceType"])[3];//DeviceType
// проверяем на наличие модуля в системе
$mod_cheked = SQLSelectOne("SELECT * FROM plugins WHERE MODULE_NAME='".$modules[$device_type]."'");
// проверяем на наличие модуля в системе
$mod_cheked = SQLSelectOne("SELECT * FROM plugins WHERE MODULE_NAME LIKE '".$modules[$device_type]."'");
if (!array_search_result($result, 'UUID', $uuid) && !is_null($uuid) && !($existed)) {
@@ -149,8 +149,8 @@ function Scan(){
"MANUFACTURER" => $device["manufacturer"],//Manufacturer
"SERVICES"=> getServices($device),//list services of device
"CONTROLADDRESS"=> $control_url,//list services of device
"EXTENDED_MODULES"=>$modules[$device_type],
"MODULE_INSTALLED"=>$mod_cheked, //chek the installed module
"EXTENDED_MODULES"=>$modules[$device_type],
"MODULE_INSTALLED"=>$mod_cheked, //chek the installed module
];
$_SESSION[$uuid] = $logo;
//session_write_close();
@@ -102,7 +102,7 @@ <h4 class="list-group-item-heading">
<div class="btn-group">[#if ID=""#]
[#if EXTENDED_MODULES!=""#]
<a onClick="return confirm('Are you sure? Please confirm.')"
[#if MODULE_INSTALLED!=""#] disabled="disabled" [#endif#]
[#if MODULE_INSTALLED!=""#] disabled="disabled" style="color:LightGrey" [#endif#]
href="?md=market&inst=adm&mode=iframe&mode2=install&name=[#EXTENDED_MODULES#]"
class="btn btn-success" title="Добавить Модуль для этого устройства">
<i class="glyphicon glyphicon-compressed"></i>

0 comments on commit 0cf52a3

Please sign in to comment.