当前位置: 首页>>代码示例>>PHP>>正文


PHP anyC::addAssocV3方法代码示例

本文整理汇总了PHP中anyC::addAssocV3方法的典型用法代码示例。如果您正苦于以下问题:PHP anyC::addAssocV3方法的具体用法?PHP anyC::addAssocV3怎么用?PHP anyC::addAssocV3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在anyC的用法示例。


在下文中一共展示了anyC::addAssocV3方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getNav

 private function getNav($parentID, $domain)
 {
     $mNav = new anyC();
     $mNav->setCollectionOf("Navigation");
     $mNav->addAssocV3("parentID", "=", $parentID);
     $mNav->addAssocV3("DomainID", "=", $domain);
     $mNav->addOrderV3("sort");
     $mNav->lCV3();
     if ($mNav->numLoaded() == 0) {
         return;
     }
     $html = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\" id=\"sortable_{$parentID}\">";
     while ($n = $mNav->getNextEntry()) {
         $B = new Button("Element bearbeiten", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','Navigation','" . $n->getID() . "');");
         $B->style("float:left;margin-right:10px;");
         $D = new Button("Element löschen", "./images/i2/delete.gif");
         $D->type("icon");
         $D->onclick("deleteClass('Navigation','" . $n->getID() . "', function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' &amp;&amp; lastLoadedLeft == '1') \$('contentLeft').update(''); },'Element und alle Unterelemente wirklich löschen?');");
         $D->style("float:right;margin-right:10px;");
         $html .= "<li id=\"NavigationElementID_" . $n->getID() . "\" style=\"" . ($n->A("hidden") == "1" ? "text-decoration:line-through;" : "") . "\">{$D}<img src=\"./images/i2/topdown.png\" class=\"navigationHandler_sortable_{$parentID}\"\" style=\"cursor:pointer;float:right;margin-right:10px;\" />{$B}" . ($n->A("name") == "" ? "&lt;kein Name&gt;" : $n->A("name")) . $this->getNav($n->getID(), $domain) . "</li>";
     }
     #
     $html .= "\n\t\t</ul>\n\t\t<script type=\"text/javascript\">Website.add('sortable_{$parentID}');</script>";
     return $html;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:27,代码来源:mWebsiteGUI.class.php

示例2: getCalendarData

 public static function getCalendarData($firstDay, $lastDay)
 {
     $K = new Kalender();
     $AC = new anyC();
     $AC->setCollectionOf("Adresse");
     $AC->addAssocV3("type", "=", "default");
     $AC->addAssocV3("AuftragID", "=", "-1");
     $AC->addAssocV3("geb", "!=", "0");
     while ($t = $AC->getNextEntry()) {
         $K->addEvent(self::getCalendarDetails("mFAdresseGUI", $t->getID(), $t));
     }
     return $K;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:13,代码来源:mFAdresseGUI.class.php

示例3: activate

 public function activate()
 {
     /*$ac = new anyC();
     		$ac->setCollectionOf("FhemPreset");
     		$ac->addJoinV3("FhemServer","FhemPresetServerID","=","FhemServerID");
     		$ac->addAssocV3("FhemPresetID", "=", $PresetID);
     		$S = $ac->getNextEntry();*/
     $S = new FhemServer($this->A("FhemPresetServerID"));
     switch ($S->A("FhemServerType")) {
         case "0":
             try {
                 $T = new Telnet($S->A("FhemServerIP"), $S->A("FhemServerPort"));
             } catch (NoServerConnectionException $e) {
                 die("error:'The connection to the server with IP-address " . $S->A("FhemServerIP") . " could not be established!'");
             }
             $c = "set " . $this->A("FhemPresetName") . " on";
             $T->fireAndForget($c);
             $T->disconnect();
             break;
         case "1":
             $ac = new anyC();
             $ac->setCollectionOf("FhemEvent");
             $ac->addAssocV3("FhemEventPresetID", "=", $this->ID);
             $ac->lCV3();
             while ($E = $ac->getNextEntry()) {
                 $S->setDevice($E->A("FhemEventFhemID"), $E->A("FhemEventAction"));
             }
             break;
     }
 }
开发者ID:nemiah,项目名称:fheME,代码行数:30,代码来源:FhemPreset.class.php

示例4: get

 /**
  * @param string $collectionOf
  * @param string $field
  * @param string $value
  * @return anyC
  */
 public static function get($collectionOf, $field = "", $value = "")
 {
     $AC = new anyC();
     $AC->setCollectionOf($collectionOf);
     if ($field != "") {
         $AC->addAssocV3($field, "=", $value);
     }
     return $AC;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:15,代码来源:anyC.class.php

示例5: setPreset

 function setPreset($PresetName)
 {
     $AC = new anyC();
     $AC->setCollectionOf("FhemPreset");
     $AC->addAssocV3("FhemPresetName", "=", $PresetName);
     $P = $AC->getNextEntry();
     $S = new FhemPreset($P->getID());
     $S->activate();
     return true;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:10,代码来源:ExtConnFhem.class.php

示例6: getHTML

 function getHTML($id)
 {
     $this->customize();
     #if($this->A == null AND $id != -1) $this->loadMe();
     #if($id == -1) $this->A = new UserAttributes();
     $this->loadMeOrEmpty();
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $this->A->password = ";;;-1;;;";
     $gui = new HTMLGUIX($this);
     #$gui->setObject();
     $gui->name("Benutzer");
     $gui->attributes(array("name", "username", "password", "SHApassword", "language", "UserPosition", "isAdmin", "UserEmail", "UserICQ", "UserJabber", "UserSkype", "UserTel"));
     $gui->label("name", "Name");
     $gui->label("username", "Benutzername");
     $gui->label("password", "Passwort");
     $gui->label("SHApassword", "Passwort");
     $gui->label("language", "Sprache");
     $gui->label("isAdmin", "Admin-Rechte?");
     $gui->label("UserEmail", "E-Mail");
     $gui->label("UserICQ", "ICQ");
     $gui->label("UserJabber", "Jabber");
     $gui->label("UserSkype", "Skype");
     $gui->label("UserTel", "Telefon");
     $gui->type("language", "select", array("de_DE" => "Deutsch (Deutschland) €", "de_DE_EUR" => "Deutsch (Deutschland) EUR", "de_CH" => "Deutsch (Schweiz) sFr", "de_CH_CHF" => "Deutsch (Schweiz) CHF", "en_GB" => "English (United Kingdom)"));
     #$gui->setOptions("language",);
     $gui->descriptionField("SHApassword", "Zum Ändern eingeben.");
     $gui->type("password", "hidden");
     $gui->type("SHApassword", "password");
     $gui->type("isAdmin", "radio");
     $gui->descriptionField("isAdmin", "<span style=\"color:red;\">Achtung: als Admin sehen Sie nur diese Admin-Oberfläche und NICHT das Programm selbst!</span>");
     #$gui->translate($this->loadTranslation());
     $gui->space("UserEmail", isset($this->texts["Kontaktdaten"]) ? $this->texts["Kontaktdaten"] : "Kontaktdaten");
     $gui->type("isAdmin", "checkbox");
     #$gui->setOptions("isAdmin",array("1","0"),array("ja ","nein"));
     #$gui->setStandardSaveButton($this);
     $gui->customize($this->customizer);
     $mUD = new mUserdataGUI();
     $mUD->addAssocV3("UserID", "=", $this->ID);
     $mUD->addAssocV3("typ", "=", "uRest", "AND", "1");
     $mUD->addAssocV3("typ", "=", "relab", "OR", "1");
     $mUD->addAssocV3("typ", "=", "hideF", "OR", "1");
     $mUD->addAssocV3("typ", "=", "pSpec", "OR", "1");
     $mUD->addAssocV3("typ", "=", "pHide", "OR", "1");
     $html = "<div>" . $mUD->getHTML(-1) . "</div>";
     if ($id == -1) {
         $html = "<table><tr><td class=\"backgroundColor3\">Sie können Einschränkungen erst anlegen, wenn der Benutzer angelegt wurde.</td></tr></table>";
     }
     return $gui->getEditHTML() . ($this->A->isAdmin != 1 ? $html : "");
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:55,代码来源:UserGUI.class.php

示例7: testDownloaded

 public static function testDownloaded($link)
 {
     $AC = new anyC();
     $AC->setCollectionOf("JDownload");
     $AC->addAssocV3("JDownloadURL", "=", $link);
     $L = $AC->getNextEntry();
     if ($L == null) {
         return false;
     }
     return true;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:11,代码来源:JDownload.class.php

示例8: getHTML

 public function getHTML($id)
 {
     $bps = $this->getMyBPSData();
     $t = new HTMLTable(1);
     $t->setTableStyle("width:160px;float:right;margin-right:10px;");
     if (!isset($bps["ID"])) {
         $F = new mFhemGUI();
         $F->addAssocV3("FhemType", "!=", "FHZ");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemName, "./fheME/Fhem/fhem.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:D;name:" . $f->getA()->FhemName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         $t->addRow("");
         $t->addRowClass("backgroundColor1");
         $F = new anyC();
         $F->setCollectionOf("FhemPreset");
         $F->addAssocV3("FhemPresetHide", "=", "0");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemPresetName, "./fheME/Fhem/events.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:P;name:" . $f->getA()->FhemPresetName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         return $t;
     }
     if (isset($bps["ID"])) {
         if ($bps["type"] == "D") {
             $F = new Fhem($bps["ID"]);
             $F->loadMe();
             $FF = new Fhem("timer");
             $FF->setA($F->getA());
             $C = new FhemControlGUI();
             $control = $C->getControl($FF);
         } else {
             $control = "";
         }
         $rand = rand(10, 10000000);
         $B = new Button("set timer", "okCatch");
         $B->rme("FhemControl", '', 'setTimer', array($bps["ID"], "'setBPSValue'", "'{$bps['type']}'", "parent.clock4Timer{$rand}.stunden", "parent.clock4Timer{$rand}.minuten", "'{$bps['name']}'"), "contentManager.loadFrame(\\'contentRight\\',\\'mFhem\\',-1,0,\\'\\');");
         $B->style("float:right;");
         $t->addRow("<iframe name=\"clock4Timer{$rand}\" style=\"width:240px;height:330px;border:0px;\" src=\"./libraries/ClockGUI.class.php\"></iframe>");
         $t->addRowClass("backgroundColor0");
         $t->addRow($B);
         $t->addRowClass("backgroundColor0");
         return $control . $t;
     }
 }
开发者ID:nemiah,项目名称:fheME,代码行数:49,代码来源:mFhemTimerGUI.class.php

示例9: runRules

 public function runRules()
 {
     $AC = new anyC();
     $AC->setCollectionOf("IncomingPrettify");
     $AC->addAssocV3("IncomingPrettifyIsActive", "=", "1");
     $I = new mIncoming();
     $files = $I->getNewFiles();
     echo "<div style=\"max-height:400px;overflow:auto;font-size:10px;padding:5px;\">";
     $run = mUserdata::getUDValueS("trinityDBPrettifyExecute", "0") == "1";
     if (!$run) {
         echo "<p style=\"color:red;margin-bottom:10px;\">The following operations are NOT executed, this is only a preview!<br />To execute the operations, you'll have to enable it in the options.</p>";
     }
     foreach ($files as $path) {
         $newName = basename($path);
         if (strpos(strtolower($newName), ".part") == strlen($newName) - 5) {
             continue;
         }
         if (strpos(strtolower($newName), ".mkv") != strlen($newName) - 4 and strpos(strtolower($newName), ".mp4") != strlen($newName) - 4) {
             continue;
         }
         while ($P = $AC->getNextEntry()) {
             $newName = preg_replace("/" . str_replace(".", "\\.", $P->A("IncomingPrettifyFind")) . "/e" . ($P->A("IncomingPrettifyCaseSensitive") == "1" ? "" : "i"), str_replace(array("//", "."), array("\\", "\\."), $P->A("IncomingPrettifyReplace")), $newName);
         }
         $newName = str_replace("\\", "", $newName);
         $AC->resetPointer();
         if ($newName != basename($path)) {
             $color = "";
             if ($run) {
                 $renamed = str_replace(basename($path), $newName, $path);
                 if (file_exists($renamed)) {
                     $color = "color:red;";
                 } else {
                     if (rename($path, $renamed)) {
                         $color = "color:green;";
                     } else {
                         $color = "color:red;";
                     }
                 }
             }
             echo "<span style=\"{$color}\">" . basename($path) . " -><br />" . basename($newName) . "</span><br /><br />";
         }
     }
     echo "</div>";
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:44,代码来源:mIncomingPrettifyGUI.class.php

示例10: lostPassword

 public function lostPassword($username)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     if ($username == "") {
         Red::errorC("User", "lostPasswordErrorUser");
     }
     $Lang = $this->loadLanguageClass("User")->getText();
     $ac = new anyC();
     $ac->setCollectionOf("User");
     $ac->addAssocV3("username", "=", $username);
     $ac->lCV3();
     $U = $ac->getNextEntry();
     if ($U == null) {
         try {
             $AL = new mphynxAltLogin();
             $AL->addAssocV3("username", "=", $username);
             $U = $AL->getNextEntry();
         } catch (Exception $e) {
             Red::errorC("User", "lostPasswordErrorUser");
         }
     }
     if ($U == null) {
         Red::errorC("User", "lostPasswordErrorUser");
     }
     $Admin = new anyC();
     $Admin->setCollectionOf("User");
     $Admin->addAssocV3("isAdmin", "=", "1");
     $Admin = $Admin->getNextEntry();
     if ($Admin == null) {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     if ($Admin->A("UserEmail") == "") {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     $mail = new htmlMimeMail5();
     $mail->setFrom("phynx@" . $_SERVER["HTTP_HOST"]);
     $mail->setSubject("[phynx] Password recovery for user {$username}");
     $mail->setText(wordwrap("Dear " . $Admin->A("name") . ",\n\nyou received this email because the user '{$username}' of the phynx framework at {$_SERVER['HTTP_HOST']} has lost his password and is requesting a new one.\n\nBest regards\n\tphynx", 80));
     if (!$mail->send(array($Admin->A("UserEmail")))) {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     Red::alertC("User", "lostPasswordOK");
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:50,代码来源:Users.class.php

示例11: useUser

 public function useUser($username = null)
 {
     $ac = new anyC();
     $ac->setCollectionOf("User");
     if ($username != null) {
         $ac->addAssocV3("username", "=", $username);
     }
     $ac->addAssocV3("isAdmin", "=", "0");
     $ac->setLimitV3("1");
     $u = $ac->getNextEntry();
     if ($u == null) {
         $this->errors[] = "100";
         return false;
     }
     return $this->login($u->A("username"), $u->A("SHApassword"), true);
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:16,代码来源:ExtConn.class.php

示例12: exists

 public function exists($returnElement = false)
 {
     $AC = new anyC();
     $AC->setCollectionOf($this->className);
     foreach ($this->setAttributes as $k) {
         if ($k == $this->className . "ID") {
             continue;
         }
         $AC->addAssocV3($k, isset($this->onExistsOperator[$k]) ? $this->onExistsOperator[$k] : "=", $this->attributes->{$k});
     }
     $AC->lCV3();
     if ($AC->numLoaded() == 0) {
         return false;
     } else {
         if ($returnElement) {
             return $AC->getNextEntry();
         }
         return $AC->getNextEntry()->getID();
     }
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:20,代码来源:Factory.class.php

示例13: SeiteParser

 public static function SeiteParser($w, $l, $p)
 {
     $Seite = new Seite($w);
     $Seite->loadMe();
     $aC = new anyC();
     $aC->setCollectionOf("Seite");
     $aC->setFieldsV3(array("IF(name = '', header, name) AS name"));
     $aC->addAssocV3("DomainID", "=", $p);
     $select = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\">";
     #$select .= NavigationGUI::getOption(-1, "Neue Seite erstellen", $w, "./images/i2/new.gif");
     $select .= NavigationGUI::getOption(0, "Keine Seite", $w, "./images/i2/stop.png", "margin-bottom:5px;");
     while ($s = $aC->getNextEntry()) {
         $select .= NavigationGUI::getOption($s->getID(), $s->A("name"), $w);
     }
     $label = $Seite->A("name") == "" ? $Seite->A("header") : $Seite->A("name");
     if ($Seite->getA() == null) {
         $label = "Seite unbekannt";
     }
     #if($w == -1) $label = "Neue Seite erstellen";
     if ($w == 0) {
         $label = "Keine Seite";
     }
     $select .= "\n\t\t</ul>";
     $html = "\n\t\t<input type=\"hidden\" value=\"{$w}\" name=\"SeiteID\" />\n\t\t\n\t\t<div onclick=\"if(\$('pageSelection').style.display == 'none') new Effect.BlindDown('pageSelection', { duration: 0.3 }); else new Effect.BlindUp('pageSelection', { duration: 0.3 });\"\n\t\t\tstyle=\"background-image:url(./images/i2/go-down.png);background-repeat:no-repeat;background-position:99% 2px;width:246px;padding:3px;border-bottom-style:dotted;border-bottom-width:1px;\" class=\"borderColor1 backgroundColor0\">\n\t\t\t<span id=\"selectedPage\">{$label}</span>\n\t\t</div>\n\t\t<div id=\"pageSelection\" class=\"backgroundColor0 borderColor1\" style=\"border-width:1px;border-style:solid;border-top-width:0px;position:absolute;display:none;width:250px;\">\n\t\t\t<div style=\"overflow:auto;height:150px;\">\n\t\t\t{$select}\n\t\t\t</div>\n\t\t</div>";
     return $html;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:26,代码来源:NavigationGUI.class.php

示例14: runUpdate

 public function runUpdate($XML)
 {
     $IDs = array();
     $XML->lCV3();
     while ($t = $XML->getNextEntry()) {
         $ac = new anyC();
         $ac->setCollectionOf("Patch");
         $ac->addAssocV3("PatchNummer", "=", $t->A("PatchNummer"));
         $P = $ac->getNextEntry();
         if ($P == null) {
             $IDs[] = $t->newMe();
         } else {
             $nP = new Patch($P->getID());
             $AS = $t->getA();
             unset($AS->PatchID);
             $nP->setA($AS);
             $nP->saveMe();
             $IDs[] = $P->getID();
         }
     }
     return $IDs;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:22,代码来源:mPatchGUI.class.php

示例15: registerSettings

 public function registerSettings()
 {
     $tab = new HTMLTable(2, "Telnet-Commands");
     $tab->maxHeight(500);
     $this->registerType($tab, "FHZ");
     $this->registerType($tab, "FS20");
     $this->registerType($tab, "FHT");
     $this->registerType($tab, "IT");
     $this->registerType($tab, "CUL_HM");
     $this->registerType($tab, "CUL_EM");
     $this->registerType($tab, "dummy");
     $oldServer = "";
     $T = null;
     $ac = new anyC();
     $ac->setCollectionOf("Fhem");
     $ac->addJoinV3("FhemServer", "FhemServerID", "=", "FhemServerID");
     $ac->addOrderV3("t1.FhemServerID");
     $ac->addAssocV3("FhemType", "=", "notify");
     $ac->addAssocV3("FhemServerType", "=", "0");
     $oldServer = "";
     while ($t = $ac->getNextEntry()) {
         try {
             if ($oldServer != $t->A("FhemServerID")) {
                 $T = new Telnet($t->A("FhemServerIP"), $t->A("FhemServerPort"));
             }
         } catch (NoServerConnectionException $e) {
             die("error:'The connection to the server with IP-address " . $t->A("FhemServerIP") . " could not be established!'");
         }
         #$tel = "define ".$t->getA()->FhemName." notify ".$t->getA()->FhemRunOn." ".str_replace("\n"," ",$t->getA()->FhemCommand);
         #$T->fireAndForget($tel);
         $tel = $t->getDefineCommand();
         foreach ($tel as $c) {
             $T->fireAndForget($c);
         }
         $tab->addRow(array($t->A("FhemServerName"), implode("<br />", $tel)));
         $oldServer = $t->A("FhemServerID");
     }
     $ac = new mFhemPresetGUI();
     $ac->addJoinV3("FhemServer", "FhemPresetServerID", "=", "FhemServerID");
     $ac->addJoinV3("FhemEvent", "FhemPresetID", "=", "FhemEventPresetID");
     $ac->addJoinV3("Fhem", "t3.FhemEventFhemID", "=", "FhemID");
     #sleep 0.5;;
     $ac->setFieldsV3(array("FhemEventAction", "FhemPresetRunOn", "FhemPresetName", "FhemServerIP", "FhemPresetNightOnly", "FhemServerName", "FhemServerPort", "t2.FhemServerID", "FhemName", "FhemEventFhemID"));
     $ac->addOrderV3("FhemPresetID");
     $ac->addOrderV3("FhemEventID");
     $ac->addAssocV3("FhemServerType", "=", "0");
     $tab->addRow(array("", ""));
     $tab->addRowColspan(1, 2);
     $command = "";
     $oldServer = "";
     while ($b = $ac->getNextEntry()) {
         try {
             if ($oldServer != $b->A("FhemServerID")) {
                 $T = new Telnet($b->A("FhemServerIP"), $b->A("FhemServerPort"));
             }
         } catch (NoServerConnectionException $e) {
             die("error:'The connection to the server with IP-address " . $t->A("FhemServerIP") . " could not be established!'");
         }
         if ($b->A("FhemEventFhemID") != "-1") {
             $command .= "set " . $b->A("FhemName") . " " . $b->A("FhemEventAction") . ";;";
         } else {
             $command .= $b->A("FhemEventAction") . ";;";
         }
         $next = $ac->getNextEntry();
         if ($next == null or $next->A("FhemPresetID") != $b->A("FhemPresetID")) {
             $runOn = null;
             if ($b->A("FhemPresetRunOn") != "") {
                 $runOn = $b->A("FhemPresetRunOn");
             }
             $d = "";
             if ($runOn == null) {
                 $d = "define " . $b->A("FhemPresetName") . " dummy";
             }
             $c = "define n" . $b->A("FhemPresetID") . " notify " . ($runOn == null ? $b->A("FhemPresetName") : $runOn) . " {fhem(\"" . str_replace("%", "%%", $command) . "\") " . ($b->A("FhemPresetNightOnly") == "1" ? "if(!isday())" : "") . "}";
             $tab->addRow(array($b->A("FhemPresetName") . "<br />" . $b->A("FhemServerName"), $d . "<br />" . $c));
             if ($runOn == null) {
                 $T->fireAndForget($d);
             }
             $T->fireAndForget($c);
             $command = "";
         }
         if ($next != null) {
             $ac->subPointer();
         }
     }
     /*$oldServer = "";
     		while($b = $ac->getNextEntry()){
     			try {
     				if($oldServer != $b->getA()->FhemServerID) $T = new Telnet($b->getA()->FhemServerIP, $b->getA()->FhemServerPort);
     			} catch(NoFhemServerConnectionException $e){
     				die("error:'The connection to the server with IP-address ".$t->getA()->FhemServerIP." could not be established!'");
     			}
     
     			$c = "define n".$b->getA()->FhemPresetID." notify ".$b->getA()->FhemPresetName." {fhem(\"".str_replace("%","%%",$b->getA()->action)."\") ".($b->getA()->FhemPresetNightOnly == "1" ? "if(!isday())" : "")."}";
     			$d = "define ".$b->getA()->FhemPresetName." dummy";
     			$tab->addRow(array($b->getA()->FhemPresetName."<br />".$b->getA()->FhemServerName,$d."<br />".$c));
     
     			$T->fireAndForget($d);
     			$T->fireAndForget($c);
     
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:FhemControlGUI.class.php


注:本文中的anyC::addAssocV3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。