Add files via upload
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"elements":
|
||||||
|
[
|
||||||
|
{ "type": "SelectCategory", "name": "PropertyCategoryID", "caption": "Target" },
|
||||||
|
{ "type": "SelectInstance", "name": "PropertyArchiveID", "caption": "Archiver" }
|
||||||
|
],
|
||||||
|
"actions":
|
||||||
|
[
|
||||||
|
|
||||||
|
{ "type": "Button", "label": "Set Logging", "onClick": "VTLS_setLogging($id);" }
|
||||||
|
],
|
||||||
|
"status":
|
||||||
|
[
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"id": "{C4E5FD62-B7D1-453D-1A9D-CC21592702B6}",
|
||||||
|
"name": "LogSetter",
|
||||||
|
"type": 3,
|
||||||
|
"vendor": "J.H. Artworks",
|
||||||
|
"aliases":
|
||||||
|
[
|
||||||
|
],
|
||||||
|
"url": "https://jh-artworks.com",
|
||||||
|
"parentRequirements": [],
|
||||||
|
"childRequirements": [],
|
||||||
|
"implemented": [],
|
||||||
|
"prefix": "VTLS"
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?
|
||||||
|
// Klassendefinition
|
||||||
|
class LogSetter extends IPSModule {
|
||||||
|
// Überschreibt die interne IPS_Create($id) Funktion
|
||||||
|
public function Create() {
|
||||||
|
// Diese Zeile nicht löschen.
|
||||||
|
parent::Create();
|
||||||
|
|
||||||
|
$this->RegisterPropertyInteger("PropertyCategoryID",0);
|
||||||
|
$this->RegisterPropertyInteger("PropertyArchiveID",0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Überschreibt die intere IPS_ApplyChanges($id) Funktion
|
||||||
|
public function ApplyChanges() {
|
||||||
|
// Diese Zeile nicht löschen
|
||||||
|
parent::ApplyChanges();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Die folgenden Funktionen stehen automatisch zur Verfügung, wenn das Modul über die "Module Control" eingefügt wurden.
|
||||||
|
* Die Funktionen werden, mit dem selbst eingerichteten Prefix, in PHP und JSON-RPC wiefolgt zur Verfügung gestellt:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function setLogging() {
|
||||||
|
|
||||||
|
$idKat = $this->ReadPropertyInteger("PropertyCategoryID");
|
||||||
|
$idArch = $this->ReadPropertyInteger("PropertyArchiveID");
|
||||||
|
|
||||||
|
$katChilds = IPS_GetChildrenIDs($idKat);
|
||||||
|
|
||||||
|
foreach ($katChilds as $katChild) {
|
||||||
|
$chilid = IPS_GetChildrenIDs($katChild)[0];
|
||||||
|
AC_SetLoggingStatus($idArch,$chilid,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user