Свойства класса:
Методы класса:
$object; $metod; $object = $this->getProperty('object'); $metod = $this->getProperty('metod'); if ($this->getProperty('signal') == 1) { callMethod($object.'.'.$metod); }
Объекты класса:
Свойства класса:
Методы класса:
Объекты класса:
/* begin injection of {Alarmclock} */ /* end injection of {Alarmclock} */
Свойства класса:
Методы класса:
$set; $vol; $set = $this->getProperty('set10k1'); $vol = $set / 10; $this->setProperty('volume', $vol);
$vol1; $vol2; $vol1 = $this->getProperty('set10k1'); $vol2 = $vol1 - 1; $this->setProperty('set10k1', $vol2);
$vol1; $vol2; $vol1 = $this->getProperty('set10k1'); $vol2 = $vol1 + 1; $this->setProperty('set10k1', $vol2);
$vol=getGlobal("stantion1.volume"); callAPI('/api/module/yadevices','GET',array('station'=>1,'command'=>'setVolume','volume'=>$vol));
Объекты класса:
Свойства класса:
Методы класса:
$my_1; $my_1 = $this->getProperty('davlenie') * 0.7500638; $this->setProperty('mmrtst ', $my_1);
$ulica; $t; $bu; $ulica = getGlobal('minimaltempulica'.'.'.'temperatura'); $t = $this->getProperty('temperatura'); if ($ulica > $t) { $bu = $ulica - $t; $this->setProperty('gister', $bu); } else { $bu = $t - $ulica; $this->setProperty('gister', $bu); }
if ($this->getProperty('vlajnosty') <= 25) { $this->setProperty('colorvlajn', 'red'); } if ($this->getProperty('vlajnosty') > 26) { $this->setProperty('colorvlajn', 'green'); } if ($this->getProperty('vlajnosty') > 65) { $this->setProperty('colorvlajn', 'red'); }
if ($this->getProperty('temperatura') > 30) { $this->setProperty('color', 'red');} elseif ($this->getProperty('temperatura') > 20) { $this->setProperty('color', 'green');} elseif ($this->getProperty('temperatura') <= 20) { $this->setProperty('color', 'white');}
Объекты класса:
Свойства класса:
Методы класса:
$value=getGlobal("ThisComputer.volMaster"); safe_exec('amixer -c 0 set Master $value %');
$volume=round(65535*$params['VALUE']/100); $this->setProperty('volumeLevel',$params['VALUE']); safe_exec('..\\apps\\nircmd\\nircmdc setsysvolume '.$volume); say("Изменилась громкость до ".$params['VALUE']." процентов");
Объекты класса:
say("Отключено питание");
Свойства класса:
Методы класса:
$name='Cron_'.$this->object_title; SQLExec("DELETE FROM jobs WHERE title='".$name."'");
$this->setProperty('LastRun',date('Y-m-d H:i:s'));
Объекты класса:
runScript('alertKuhnyaclimat');
$ds; $mi; $r; $ds = getGlobal('ds18b20kuhnya'.'.'.'temperatura'); $mi = getGlobal('kuhnyaKsyaomi'.'.'.'temperatura'); $r = $ds - $mi; setGlobal('kuhnyaControl'.'.'.'temperatura', $r); if (getGlobal('kuhnyaControl'.'.'.'temperatura') <= 5) { setGlobal('razicaTempKuhnya'.'.'.'value', '0'); } if (getGlobal('kuhnyaControl'.'.'.'temperatura') >= 5) { setGlobal('razicaTempKuhnya'.'.'.'value', '1'); }
setGlobal('spalynya'.'.'.'resetschetchik', '1'); setGlobal('kuhnyapow'.'.'.'resetschetchik', '1'); setGlobal('electrozall'.'.'.'resetschetchik', '1'); $timerCode=<<<EOT setGlobal('electrozall'.'.'.'resetschetchik', '0'); setGlobal('kuhnyapow'.'.'.'resetschetchik', '0'); setGlobal('spalynya'.'.'.'resetschetchik', '0'); EOT; setTimeOut('reset01', $timerCode, (int)('5'));
$kuhnyapow; $zallpow; $spaynyapow; $_; $kuhnyapow = getGlobal('electrozall'.'.'.'pokazvsego'); $zallpow = getGlobal('kuhnyapow'.'.'.'pokazvsego'); $spaynyapow = getGlobal('spalynya'.'.'.'pokazvsego'); $_ = $kuhnyapow + $spaynyapow + $zallpow; setGlobal('fullelectro'.'.'.'pokazvsego', $_);
$kuhnyapow; $zallpow; $spaynyapow; $_; $kuhnyapow = getGlobal('electrozall'.'.'.'pokazsegodnya'); $zallpow = getGlobal('kuhnyapow'.'.'.'pokazsegodnya'); $spaynyapow = getGlobal('spalynya'.'.'.'pokazsegodnya'); $_ = $kuhnyapow + $spaynyapow + $zallpow; setGlobal('fullelectro'.'.'.'pokazsegodnya', $_);
$my_1; $my_3; $my_2; $my_4; $my_1 = getGlobal('electrozall'.'.'.'pokazvchera') + getGlobal('kuhnyapow'.'.'.'pokazvchera'); $my_2 = $my_1 + getGlobal('spalynya'.'.'.'pokazvchera'); setGlobal('fullelectro'.'.'.'pokazvchera', $my_2); $my_3 = getGlobal('electrozall'.'.'.'pokazsegodnya') + getGlobal('kuhnyapow'.'.'.'pokazsegodnya'); $my_4 = $my_3 + getGlobal('spalynya'.'.'.'pokazsegodnya'); setGlobal('fullelectro'.'.'.'pokazsegodnya', $my_4);
say('Делаю полный бекап системы', 2); include(DIR_MODULES . 'backup/backup.class.php'); set_time_limit(0); $backup_module = new backup(); $backup_module->create_backup($out);
if (getGlobal('pingVPN'.'.'.'Vvalue') == 2) { runScript('VPN'); }
$day; $vay; $my_12; $my_132; $day = getGlobal('spalynya'.'.'.'pokazsegodnya'); $vay = getGlobal('electrozall'.'.'.'pokazsegodnya'); $my_12 = getGlobal('fullelectro'.'.'.'pokazsegodnya'); $my_132 = getGlobal('kuhnyapow'.'.'.'pokazsegodnya'); setGlobal('spalynya'.'.'.'day', $day); setGlobal('electrozall'.'.'.'day', $vay); setGlobal('fullelectro'.'.'.'day', $my_12); setGlobal('kuhnyapow'.'.'.'day', $my_132);
$tempsapln; $tempbalc; $tempsapln = getGlobal('ds18b20ulicaspalynya'.'.'.'temperatura'); $tempbalc = getGlobal('ulicaAM2301'.'.'.'temperatura'); if (getGlobal('ds18b20ulicaspalynya'.'.'.'temperatura') < getGlobal('ulicaAM2301'.'.'.'temperatura')) { setGlobal('minimaltempulica'.'.'.'temperatura', $tempsapln); } else { setGlobal('minimaltempulica'.'.'.'temperatura', $tempbalc); }
$value=getGlobal("ppmspalynya.value"); setGlobal('ppmspalynya.timevalue',$value);
Свойства класса:
Объекты класса:
Свойства класса:
Методы класса:
if ($this->getProperty('dist') > 0.5) { $this->setProperty('status', '1'); } else { $this->setProperty('status', '0'); }
Объекты класса:
Свойства класса:
Методы класса:
$tariff; $valoik; $tariff = getGlobal('fullelectro'.'.'.'cenaKWT'); $valoik = $this->getProperty('pokazvsego') * $tariff; $this->setProperty('denygivsego', $valoik);
$value = $this->getProperty('denygivsego'); $value = round($value, 1); $this->setProperty('rounddenygivsego', $value);
$value = $this->getProperty('denygideny'); $value = round($value, 1); $this->setProperty('roundcenazadeny', $value);
$value = $this->getProperty('summfinance'); $value = round($value, 1); $this->setProperty('roundsummfinance', $value);
$tarif; $rasch; $tarif = getGlobal('fullelectro'.'.'.'cenaKWT'); $rasch = $this->getProperty('pokazsegodnya') * $tarif; $this->setProperty('denygiDeny', $rasch);
if ($this->getProperty('ECOround') >= 10) { $this->setProperty('disp1', '1'); } if ($this->getProperty('ECOround') >= 20) { $this->setProperty('disp1', '2'); } if ($this->getProperty('ECOround') >= 30) { $this->setProperty('disp1', '3'); } if ($this->getProperty('ECOround') >= 40) { $this->setProperty('disp1', '4'); } if ($this->getProperty('ECOround') >= 50) { $this->setProperty('disp1', '5'); } if ($this->getProperty('ECOround') >= 60) { $this->setProperty('disp1', '6'); } if ($this->getProperty('ECOround') >= 70) { $this->setProperty('disp1', '7'); } if ($this->getProperty('ECOround') >= 80) { $this->setProperty('disp1', '8'); } if ($this->getProperty('ECOround') >= 90) { $this->setProperty('disp1', '9'); } if ($this->getProperty('ECOround') >= 99) { $this->setProperty('disp1', '10'); }
$value = $this->getProperty('ECO'); $value = round($value, 0); $this->setProperty('ECOround', $value);
$Vchera; $procent; $segod; $rasch; $tarif; $rasch1; $Vchera = $this->getProperty('pokazvchera'); $procent = $Vchera / 100; $segod = $this->getProperty('pokazsegodnya'); $rasch = $segod / $procent; $this->setProperty('ECO', $rasch); $tarif = getGlobal('fullelectro'.'.'.'cenaKWT'); $rasch1 = $this->getProperty('pokazsegodnya') * $tarif; $this->setProperty('denygiDeny', $rasch1);
Объекты класса:
Свойства класса:
Методы класса:
//$params["USER_OBJECT"]
//$params["USER_OBJECT"]
Объекты класса:
Свойства класса:
Методы класса:
$my_1; $val; $my_1 = $this->getProperty('value'); $val = $my_1 / 2.55; $this->setProperty('procent', $val);
$value = $this->getProperty('procent'); $value = round($value, 0); $this->setProperty('roundlink', $value);
Объекты класса:
Свойства класса:
Методы класса:
$this->setProperty("updated",time()); $this->setProperty("updatedTime",date('H:i')); if ($this->getProperty('active'))
$this->setProperty('active',1);
$this->setProperty('active',0);
Объекты класса:
setGlobal('minMsgLevel','1');
setGlobal('minMsgLevel','2'); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nightmode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/darknessmode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/darknessmode_deactivate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_injects.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_injects.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nobodyhomemode_deactivate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nobodyhomemode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/econommode_deactivate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/econommode_activate.php'); /* end injection of {SDevices} */
Методы класса:
Объекты класса:
/* begin injection of {app_radio} */ include_once(DIR_MODULES.'app_radio/app_radio.class.php'); $app_radio = new app_radio(); if(is_array($params)) { foreach($params as $key=>$value) { switch((string)$key) { case 'sta': $app_radio->change_station($params['sta'], $app_radio); break; case 'cmd': $app_radio->control($params['cmd']); break; case 'vol': $app_radio->set_volume($params['vol'], $app_radio); break; default: if($value == 'play' || $value == 'stop') $app_radio->control($value); elseif(strpos($value, 'vol') === 0) $app_radio->set_volume((int)substr($value, 3), $app_radio); elseif(strpos($value, 'sta:') === 0) $app_radio->change_station(substr($value, 4), $app_radio); } } } /* end injection of {app_radio} */
Свойства класса:
Методы класса:
if ($this->getProperty('status') == '1') { $this->setProperty('rusresult1 ', 'включен'); $this->setProperty('rusKratk1', 'вкл'); $this->setProperty('color1', '#00FF00'); } if ($this->getProperty('status') == 'OFF') { $this->setProperty('rusresult1', 'Выключен'); $this->setProperty('rusKratk1', 'Выкл'); $this->setProperty('color1', '#FF0000'); }
if ($this->getProperty('knopka') == 1) { $this->callMethod('switcsh'); } $timerCode=<<<EOT $this->setProperty('0', 'knoka'); EOT; setTimeOut('1', $timerCode, (int)('2'));
$this->callMethod('switcsh');
if ($this->getProperty('status ') == 1) { $this->setProperty('value', 'ON'); $this->setProperty(' rusresult1', 'вкл'); $this->setProperty('color1', '#00FF00'); } if ($this->getProperty('status ') == 0) { $this->setProperty('value', 'OFF'); $this->setProperty(' rusresult1', 'выкл'); $this->setProperty('color1', '#FF0000'); }
$this->setProperty("status",1);
if ($this->getProperty('value') == 'ON') { $this->setProperty('rusresult ', 'включен'); $this->setProperty('rusKratk', 'вкл'); $this->setProperty('color', '#00FF00'); } if ($this->getProperty('value') == 'OFF') { $this->setProperty('rusresult ', 'Выключен'); $this->setProperty('rusKratk', 'Выкл'); $this->setProperty('color', '#FF0000'); }
$status=$this->getProperty("status"); if ($status) { $this->callMethod('turnOff'); } else { $this->callMethod('turnOn'); }
$this->setProperty("status",0);
$status=$this->getProperty("status"); if ($status) { $this->callMethod('turnOn'); } else { $this->callMethod('turnOff'); }
Объекты класса:
Свойства класса:
Методы класса:
$rooms=getObjectsByClass("Rooms"); $total=count($rooms); for($i=0;$i<$total;$i++) { $rooms[$i]['room']=getGlobal($rooms[$i]['TITLE'].'.Title'); if (!$rooms[$i]['room']) { $rooms[$i]['room']=$rooms[$i]['TITLE']; } $rooms[$i]['active']=getGlobal($rooms[$i]['TITLE'].'.SomebodyHere'); $rooms[$i]['time']=getGlobal($rooms[$i]['TITLE'].'.LatestActivity'); $rooms[$i]['diff']=time()-$rooms[$i]['time']; } function rooms_cmp($a, $b) { if ($a['diff'] == $b['diff']) { return 0; } return ($a['diff'] < $b['diff']) ? -1 : 1; } usort($rooms,"rooms_cmp"); if (!$rooms[0]['active']) { $somebodyHomeText="Никого нет дома. Были в ".date('H:i',$rooms[0]['time'])." (".$rooms[0]['room'].")"; } else { $res_rooms=array(); for($i=0;$i<$total;$i++) { if ($rooms[$i]['active']) { $res_rooms[]=$rooms[$i]['room']; } } $somebodyHomeText="Кто-то дома: ".implode(", ",$res_rooms); } setGlobal('somebodyHomeText',$somebodyHomeText); //echo "Updated"; /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php'); /* end injection of {SDevices} */
$latestActivity=$this->getProperty('LatestActivity'); $this->setProperty('LatestActivity',time()); $this->setProperty('LatestActivityTime',date('H:i')); $this->setProperty('SomebodyHere',1); $ot=$this->object_title; if ($this->getProperty("IdleDelay")) { $activity_timeout=(int)$this->getProperty("IdleDelay"); } else { $activity_timeout=10*60; } clearTimeOut($ot."_activity_timeout"); setTimeOut($ot."_activity_timeout","callMethod('".$ot.".onIdle');",$activity_timeout); $this->callMethod("updateActivityStatus"); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onActivity.php'); /* end injection of {SDevices} */
$this->setProperty('SomebodyHere',0); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onIdle.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_batteryLevelUpdated.php'); /* end injection of {SDevices} */
$time; $time = getGlobal('ThisComputer'.'.'.'timeNow'); $this->setProperty('uptime', $time);
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_keepAlive.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_logicAction.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_setUpdatedText.php'); /* end injection of {SDevices} */
$time; $time = getGlobal('ThisComputer'.'.'.'timeNow'); $this->setProperty('uptime', $time); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_statusUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SButtons_pressed.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_takeSeries.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_motionDetected.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_updatePreview.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_takeSnapshot.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SControllers_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SControllers_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SControllers_turnOn.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_tempDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_tempUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_configUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_fanSpeedUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_thermostatUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setThermostatMode.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setFanSpeedMode.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setTargetTemperature.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_stopLevelMove.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_startLevelDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_startLevelUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_levelWorkUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_levelUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_setLevel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_statusUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_statusUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_pause.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setSource.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setChannel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setVolume.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_colorUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_setColor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_turnOn.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_checkWindows.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_enable.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_disable.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_tempDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_switchEnable.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_tempUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_setTargetTemperature.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_relay_statusUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_pause.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setSource.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setVolume.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setChannel.php'); /* end injection of {SDevices} */
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SVacuums_pause.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_paramsUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_stateUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_colorUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleSwitch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_getInfo.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_presetUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_addPreset.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_delPreset.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleProc.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_brightnessUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_action.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_colorUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_pulseDetected.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_refreshStats.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_valueWorkUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroupStates_restore.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroupStates_save.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_alert.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_unblockSensor.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
$time; $time = getGlobal('ThisComputer'.'.'.'timeNow'); $this->setProperty('uptime', $time);
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_motionDetected.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_unblockSensor.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_levelUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_setLevel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_open.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_close.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_blockSensor.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_alert.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_unblockSensor.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SBatterySensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SBatterySensors_valueWorkVoltageUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SBatterySensors_valueVoltageUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLightSensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLightSensors_periodMinValueUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SPowerSensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SPowerSensors_loadStatusChanged.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STempHumSensors_valueUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
Объекты класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_alert.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Scontrollee_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Scontrollee_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Scontrollee_turnOn.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
if (getGlobal('security1'.'.'.'onOff') == 1) { setGlobal('security1'.'.'.'alarm', '1'); }
setGlobal('security1'.'.'.'onOff', '0'); setGlobal('security1'.'.'.'indicatorarmed', '0');
if ($this->getProperty('MesageONoff') == 1 && $this->getProperty('onOff') == 1) { $this->setProperty('status', 'включена'); } if ($this->getProperty('MesageONoff') == 1 && $this->getProperty('onOff') == 0) { $this->setProperty('status', 'выключена'); } if ($this->getProperty('onOff') == 0) { $this->setProperty('alarm', '0'); }
if ($this->getProperty('onOff') == 0) { $this->callMethod('on'); } else { $this->callMethod('off'); }
$this->setProperty('triger', '1'); $timerCode=<<<EOT setGlobal('security1'.'.'.'triger', '0'); EOT; setTimeOut('security', $timerCode, (int)('5'));
$timer; $timer = getGlobal('security1'.'.'.' timerarmed'); setGlobal('security1'.'.'.'indicatorarmed', '1'); $timerCode=<<<EOT setGlobal('security1'.'.'.'onOff', '1'); EOT; setTimeOut('armedtimer', $timerCode, (int)($timer));
Объекты класса:
Свойства класса:
Методы класса:
$timemin; $sec; $timemin = $this->getProperty('time'); $sec = $timemin * 60; $this->setProperty('timesec', $sec);
$this->setProperty("status",1);
$this->setProperty("status",0);
$status=$this->getProperty("status"); if ($status) { $this->callMethod('turnOff'); } else { $this->callMethod('turnOn'); }
Объекты класса:
Свойства класса:
Методы класса:
if ($this->getProperty('value') < $this->getProperty('>')) { $this->setProperty('>value', '1'); } if ($this->getProperty('value') > $this->getProperty('>')) { $this->setProperty('>value', '0'); }
if ($this->getProperty('value') >= 10) { $this->setProperty('timevalue', '1'); } if ($this->getProperty('value') >= 20) { $this->setProperty('timevalue', '2'); } if ($this->getProperty('value') >= 30) { $this->setProperty('timevalue', '3'); } if ($this->getProperty('value') >= 40) { $this->setProperty('timevalue', '4'); } if ($this->getProperty('value') >= 50) { $this->setProperty('timevalue', '5'); } if ($this->getProperty('value') >= 60) { $this->setProperty('timevalue', '6'); } if ($this->getProperty('value') >= 70) { $this->setProperty('timevalue', '7'); } if ($this->getProperty('value') >= 80) { $this->setProperty('timevalue', '8'); } if ($this->getProperty('value') >= 90) { $this->setProperty('timevalue', '9'); } if ($this->getProperty('value') >= 99) { $this->setProperty('timevalue', '10'); } if ($this->getProperty('value') < $this->getProperty('>')) { $this->setProperty('Kvalue', '1'); } if ($this->getProperty('value') > $this->getProperty('>')) { $this->setProperty('Kvalue', '0'); }
Объекты класса:
Свойства класса:
Методы класса:
Объекты класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_injects.php'); /* end injection of {SDevices} */
$details=array(); $red_state=0; $yellow_state=0; if (!isOnline('Internet')) { $yellow_state=1; $details[]=LANG_GENERAL_NO_INTERNET_ACCESS; } if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_COMMUNICATION_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_COMMUNICATION_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); }
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SXiGatewayRGB_injects.php'); /* end injection of {SDevices} */
$details=array(); $red_state=0; $yellow_state=0; $cycles=array('states'=>'states','main'=>'main','execs'=>'exec','scheduler'=>'scheduler'); foreach($cycles as $k=>$v) { $tm=getGlobal('ThisComputer.cycle_'.$k.'Run'); if (time()-$tm>5*60) { $red_state=1; $details[]=$v." ".LANG_GENERAL_CYCLE." ".LANG_GENERAL_STOPPED."."; } } $cycles=array('ping'=>'ping'); foreach($cycles as $k=>$v) { $tm=getGlobal('ThisComputer.cycle_'.$k.'Run'); if (time()-$tm>10*60) { $yellow_state=1; $details[]=$v." ".LANG_GENERAL_CYCLE." ".LANG_GENERAL_STOPPED."."; } } if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_SYSTEM_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_SYSTEM_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); } /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/system_checkstate.php'); /* end injection of {SDevices} */
$details=array(); $red_state=0; $yellow_state=0; if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_SECURITY_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_SECURITY_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); }
Свойства класса:
Методы класса:
$sec; $min; $sec = $this->getProperty('minut'); $min = $sec * 60; $this->setProperty('time', $min);
Объекты класса:
Свойства класса:
Методы класса:
Объекты класса:
$h=(int)date('G',time()); $m=date('i',time()); if (isWeekDay()) { } if (($h>=8) && getGlobal('clockChimeEnabled')) { if ($m=="00") { say(timeNow(),1); } } setGlobal('timeNow',date('H:i')); $homeStatus=date('H:i'); if (getGlobal('NobodyHomeMode.active')) { $homeStatus.=' Дома никого'; } else { $homeStatus.=' Дома кто-то есть'; } $homeStatus.=' '.getGlobal('Security.stateDetails'); $homeStatus.=' '.getGlobal('System.stateDetails'); $homeStatus.=' '.getGlobal('Communication.stateDetails'); setGlobal('HomeStatus',$homeStatus); if (timeBetween(getGlobal('SunRiseTime'),getGlobal('SunSetTime')) && getGlobal('isDark')=="1") { setGlobal("isDark",0); callMethod('DarknessMode.deactivate'); } elseif (!timeBetween(getGlobal('SunRiseTime'),getGlobal('SunSetTime')) && getGlobal('isDark')!="1") { setGlobal("isDark",1); callMethod('DarknessMode.activate'); } if (timeIs("23:30") && (gg("EconomMode.active")!="1") && (gg("NobodyHomeMode.active")=="1")) { callMethod('EconomMode.activate'); } if (timeIs('20:00')) { callMethod('NightMode.activate'); setGlobal('stantion1'.'.'.'set10k1', '5'); } elseif (timeIs('08:00')) { callMethod('NightMode.deactivate'); setGlobal('stantion1'.'.'.'set10k1', '10'); } if (timeIs("03:00")) { runScript("systemMaintenance"); } if (gg('ThisComputer.AlarmStatus') && timeIs(gg('ThisComputer.AlarmTime'))) { runScript('MorningAlarm'); } runScript('минимал климат улица');
Свойства класса:
Методы класса:
Свойства класса:
Методы класса:
if ($this->getProperty('BattLevel') > 50) { $this->setProperty('batform', '5'); } if ($this->getProperty('BattLevel') > 80) { $this->setProperty('batform', '8'); } if ($this->getProperty('BattLevel') > 99) { $this->setProperty('batform', '10'); }
//$params["LOCATION_OBJECT"], $params["LOCATION"]
//$params["LOCATION_OBJECT"], $params["LOCATION"]
Объекты класса:
Свойства класса:
Методы класса:
include_once(DIR_MODULES . "yandexweather/yandexweather.class.php"); $yw = new yandexweather(); $yw->sayweather();
include_once(DIR_MODULES . "yandexweather/yandexweather.class.php"); $yw = new yandexweather(); $yw->sayweather();
include_once(DIR_MODULES . "yandexweather/yandexweather.class.php"); $yw = new yandexweather(); $yw->sayforecast();
include_once(DIR_MODULES . "yandexweather/yandexweather.class.php"); $yw = new yandexweather(); $yw->sayforecast();
$sqlQuery = "SELECT pvalues.*, objects.TITLE as OBJECT_TITLE, properties.TITLE as PROPERTY_TITLE FROM pvalues JOIN objects ON pvalues.OBJECT_ID = objects.id JOIN properties ON pvalues.PROPERTY_ID = properties.id WHERE pvalues.PROPERTY_NAME != CONCAT_WS('.', objects.TITLE, properties.TITLE)"; $data = SQLSelect($sqlQuery); $total = count($data); for ($i = 0; $i < $total; $i++) { $objectProperty = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; $sqlQuery = "SELECT * FROM pvalues WHERE ID =".$data[$i]['ID'] ; $rec = SQLSelectOne($sqlQuery); $rec['PROPERTY_NAME'] = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; SQLUpdate("pvalues", $rec); } $data = SQLSelect($sqlQuery); $total = count($data); for ($i = 0; $i < $total; $i++) { $objectProperty = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; $sqlQuery = "SELECT * FROM pvalues WHERE ID =".$data[$i]["ID"] ; $rec = SQLSelectOne($sqlQuery); $rec["PROPERTY_NAME"] = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; SQLUpdate("pvalues", $rec); }
require(DIR_MODULES."yandexweather/changetemp.php");
$sqlQuery = "SELECT pvalues.*, objects.TITLE as OBJECT_TITLE, properties.TITLE as PROPERTY_TITLE FROM pvalues JOIN objects ON pvalues.OBJECT_ID = objects.id JOIN properties ON pvalues.PROPERTY_ID = properties.id WHERE pvalues.PROPERTY_NAME != CONCAT_WS('.', objects.TITLE, properties.TITLE)"; $data = SQLSelect($sqlQuery); $total = count($data); for ($i = 0; $i < $total; $i++) { $objectProperty = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; $sqlQuery = "SELECT * FROM pvalues WHERE ID =".$data[$i]['ID'] ; $rec = SQLSelectOne($sqlQuery); $rec['PROPERTY_NAME'] = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; SQLUpdate("pvalues", $rec); } $data = SQLSelect($sqlQuery); $total = count($data); for ($i = 0; $i < $total; $i++) { $objectProperty = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; $sqlQuery = "SELECT * FROM pvalues WHERE ID =".$data[$i]["ID"] ; $rec = SQLSelectOne($sqlQuery); $rec["PROPERTY_NAME"] = $data[$i]["OBJECT_TITLE"] . "." . $data[$i]["PROPERTY_TITLE"]; SQLUpdate("pvalues", $rec); }
///
require(DIR_MODULES."yandexweather/changetemp.php");
SQLUpdate("objects", array("ID"=>$this->id, "DESCRIPTION"=>gg("sysdate")." ".gg("timenow")));
SQLUpdate("objects", array("ID"=>$this->id, "DESCRIPTION"=>gg("sysdate")." ".gg("timenow")));
Объекты класса:
if(($this->object_title=="yw_mycity") and ($this->getProperty("condition")<>"")) { //require(DIR_MODULES."yandexweather/ywext.inc.php"); include_once(DIR_MODULES."yandexweather/ywext.inc.php"); $lastcondition=gg("yw_mycity.lastcondition"); $conditioneng=gg("yw_mycity.condition"); $condition1eng=gg("yw_mycity.forecast_0_daycondition"); $condition2eng=gg("yw_mycity.forecast_1_daycondition"); $condition3eng=gg("yw_mycity.forecast_2_daycondition"); $condition=getconditionrusincl($conditioneng); $condition1=getconditionrusincl($condition1eng); $condition2=getconditionrusincl($condition2eng); $condition3=getconditionrusincl($condition3eng); sg("yw_mycity.conditionrus",$condition); sg("yw_mycity.condition1rus",$condition1) ; sg("yw_mycity.condition2rus",$condition2) ; sg("yw_mycity.condition3rus",$condition3) ; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='ENABLE_EVENTS'"); $ee=$cmd_rec['VALUE']; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='MSG_LEVEL'"); $msglevel=$cmd_rec['VALUE']; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='LASTCONDITION'"); $lastcondition=$cmd_rec['VALUE']; //say($ee.":".$this->getProperty("condition").':'.$lastcondition,$msglevel); //say($ee.":".getObject('yw_mycity')->getProperty('condition').':'.$lastcondition,$msglevel); // say($ee.":".$params['NEW_VALUE'].':'.$lastcondition,$msglevel); //getObject('yw_mycity')->getProperty('condition'); //if (($ee=="1") && ($this->getProperty("condition")!=$lastcondition)) { if (($ee=="1") && ($params['NEW_VALUE']!=$lastcondition) && ($condition!="0")) { say(" На улице ".$condition,$msglevel); } } sg("yw_mycity.lastcondition",$this->getProperty("condition")); //$cmd_rec = SQLSelectOne("update yaweather_config set value='".$this->getProperty("condition")."' where parametr='LASTCONDITION'"); SQLexec("update yaweather_config set value='".$params['NEW_VALUE']."' where parametr='LASTCONDITION'");
if(($this->object_title=="yw_mycity") and ($this->getProperty("condition")<>"")) { //require(DIR_MODULES."yandexweather/ywext.inc.php"); include_once(DIR_MODULES."yandexweather/ywext.inc.php"); $lastcondition=gg("yw_mycity.lastcondition"); $conditioneng=gg("yw_mycity.condition"); $condition1eng=gg("yw_mycity.forecast_0_daycondition"); $condition2eng=gg("yw_mycity.forecast_1_daycondition"); $condition3eng=gg("yw_mycity.forecast_2_daycondition"); $condition=getconditionrusincl($conditioneng); $condition1=getconditionrusincl($condition1eng); $condition2=getconditionrusincl($condition2eng); $condition3=getconditionrusincl($condition3eng); sg("yw_mycity.conditionrus",$condition); sg("yw_mycity.condition1rus",$condition1) ; sg("yw_mycity.condition2rus",$condition2) ; sg("yw_mycity.condition3rus",$condition3) ; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='ENABLE_EVENTS'"); $ee=$cmd_rec['VALUE']; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='MSG_LEVEL'"); $msglevel=$cmd_rec['VALUE']; $cmd_rec = SQLSelectOne("SELECT VALUE FROM yaweather_config where parametr='LASTCONDITION'"); $lastcondition=$cmd_rec['VALUE']; //say($ee.":".$this->getProperty("condition").':'.$lastcondition,$msglevel); //say($ee.":".getObject('yw_mycity')->getProperty('condition').':'.$lastcondition,$msglevel); // say($ee.":".$params['NEW_VALUE'].':'.$lastcondition,$msglevel); //getObject('yw_mycity')->getProperty('condition'); //if (($ee=="1") && ($this->getProperty("condition")!=$lastcondition)) { if (($ee=="1") && ($params['NEW_VALUE']!=$lastcondition) && ($condition!="0")) { say(" На улице ".$condition,$msglevel); } } sg("yw_mycity.lastcondition",$this->getProperty("condition")); //$cmd_rec = SQLSelectOne("update yaweather_config set value='".$this->getProperty("condition")."' where parametr='LASTCONDITION'"); SQLexec("update yaweather_config set value='".$params['NEW_VALUE']."' where parametr='LASTCONDITION'");
Методы класса:
include_once(DIR_MODULES."app_yatraffic/app_yatraffic.class.php"); $app_yatraffic=new app_yatraffic(); $app_yatraffic->get_traffic(gg("yt_settings.reg_id"));
Объекты класса:
, Беларусь
© 2025 - Site Built By SergeJey | Реквизиты: Курицын С. С. ИНН 762001394609 | Контакты | Публичный договор
SmartLiving