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


PHP anyC::setCollectionOf方法代码示例

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


在下文中一共展示了anyC::setCollectionOf方法的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: 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

示例3: 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

示例4: getLocations

 function getLocations()
 {
     $AC = new anyC();
     $AC->setCollectionOf("FhemLocation");
     $Locations = array();
     while ($L = $AC->getNextEntry()) {
         $Locations[] = $L->getID() . "::" . $L->A("FhemLocationName");
     }
     return $Locations;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:10,代码来源:ExtConnFhem.class.php

示例5: 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

示例6: 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

示例7: getAvailableCategories

 public function getAvailableCategories()
 {
     $AC = new anyC();
     $AC->setCollectionOf("Serie");
     $AC->addGroupV3("status");
     $status = array();
     while ($S = $AC->getNextEntry()) {
         $status[$S->A("status")] = $S->A("status");
     }
     return $status;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:11,代码来源:mSerieGUI.class.php

示例8: 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

示例9: 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

示例10: getHTML

 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Domain");
     if ($id != -1) {
         $Seiten = new SeitenGUI();
         $Seiten->addAssocV3("DomainID", "=", $this->getID());
         $Seiten->setFieldsV3(array("SeiteID", "IF(name = '', header , name) AS name"));
         $gui->selectWithCollection("startseite", $Seiten, "name");
     } else {
         $gui->setParser("startseite", "DomainGUI::startseiteParser");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "domainTemplate");
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"Domains");
     $gui->setShowAttributes(array("TemplateID", "url", "DomainDefaultSpracheID", "startseite", "title", "header", "umleitung", "permalinkPrefix", "horizontalNav"));
     if (Session::isPluginLoaded("mSprache")) {
         $mS = new anyC();
         $mS->setCollectionOf("Sprache");
         $gui->selectWithCollection("DomainDefaultSpracheID", $mS, "SpracheIdentifier", "keine Auswahl");
     } else {
         $gui->setType("DomainDefaultSpracheID", "hidden");
     }
     $gui->setLabel("DomainDefaultSpracheID", "Sprache");
     $gui->setLabel("url", "Domains");
     $gui->setLabel("title", "Titelzeile");
     $gui->setLabel("header", "Header");
     $gui->setLabel("permalinkPrefix", "Permalink-Präfix");
     $gui->setLabel("horizontalNav", "horizontale Navigation");
     $gui->setType("horizontalNav", "checkbox");
     $gui->setFieldDescription("horizontalNav", "Subkategorien in der Navigation werden nicht zwischen den Einträgen angezeigt sondern am Ende angehängt.");
     $gui->setFieldDescription("umleitung", "<b>www-Umleitung</b><br />Anfragen an Adressen ohne www-Subdomain werden auf die www-subdomain umgeleitet. Also es würde http://example.com an http://www.example.com umgeleitet. Nicht jedoch http://test.example.com<br /><br /><b>erster Eintrag</b><br />Alle Anfragen werden auf den ersten Eintrag der Liste umgeleitet.");
     $gui->setType("umleitung", "select");
     $gui->setOptions("umleitung", array("0", "1", "2"), array("keine", "www-Umleitung", "erster Eintrag"));
     $gui->setType("url", "textarea");
     $gui->setFieldDescription("url", "geben Sie eine Domain pro Zeile an oder * für eine beliebige Domain");
     $tab = new HTMLTable(1);
     $tab->addRow("Das Permalink-Präfix wird vor den Permalink geschrieben, wenn er für eine Seite eingetragen wurde.<br /><br />Wenn Sie also \"page-\" als Präfix angeben, wird der Permalink für die Startseite so aussehen (wenn der Permalink für die Startseite \"Startseite\" lautet) page-Startseite.<br /><br />Sie müssen diesen Permalink dann noch mit mod_rewrite umschreiben. Mit präfix \"page-\" dann zum Beispiel:<pre style=\"font-size:9px;\">RewriteEngine on\nRewriteRule ^page-([a-zA-Z0-9-_]*)\$ ?permalink=\$1</pre>");
     return $gui->getEditHTML() . $tab;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:44,代码来源:DomainGUI.class.php

示例11: 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

示例12: filterNew

 public function filterNew()
 {
     $this->loadFeed();
     $xml = RSSFilter::$feeds[$this->A("RSSFilterFeed")];
     $Adapter = $this->getFeedAdapter();
     $ac = new anyC();
     $ac->setCollectionOf("Serie");
     $Serien = array();
     while ($S = $ac->getNextEntry()) {
         $Serien[strtolower($S->A("name"))] = $S;
         $Serien[strtolower($S->A("altFeedName1"))] = $S;
     }
     $new = array();
     foreach ($xml->channel->item as $v) {
         $Epis = $Adapter->parseItem($v);
         if (!isset($Serien[strtolower($Epis->name)]) and $Epis->name != "") {
             $new[strtolower($Epis->name)] = $Epis;
         }
     }
     return $new;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:21,代码来源:RSSFilter.class.php

示例13: deleteMe

 public function deleteMe()
 {
     $AC = new anyC();
     $AC->setCollectionOf("Folge");
     $AC->addAssocV3("SerieID", "=", $this->getID());
     while ($F = $AC->getNextEntry()) {
         $F->deleteMe();
     }
     parent::deleteMe();
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:10,代码来源:Serie.class.php

示例14: 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

示例15: 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


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