本文整理汇总了PHP中anyC::lCV3方法的典型用法代码示例。如果您正苦于以下问题:PHP anyC::lCV3方法的具体用法?PHP anyC::lCV3怎么用?PHP anyC::lCV3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类anyC
的用法示例。
在下文中一共展示了anyC::lCV3方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
}
示例2: 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' && 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") == "" ? "<kein Name>" : $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;
}
示例3: 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 : "");
}
示例4: getHTML
public function getHTML($id)
{
$allowedUsers = Environment::getS("allowedUsers", null);
#$this->addAssocV3("UserType", "=", "0");
$this->addOrderV3("name");
if ($this->A == null) {
$this->lCV3($id);
}
$up = new anyC();
$up->setCollectionOf("User");
$up->addAssocV3("password", "!=", ";;;-1;;;");
$up->lCV3();
if ($up->numLoaded() > 0 and $id == -1) {
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>";
}
$gui = new HTMLGUIX($this);
$gui->screenHeight();
$gui->name("Benutzer");
#$gui->setCollectionOf($this->collectionOf,"Benutzer");
$gui->parser("isAdmin", "UsersGUI::isAdminParser");
$gui->colWidth("isAdmin", "20px");
$gui->attributes(array("name", "username", "isAdmin"));
/*$g = "";
if(strstr($_SERVER["SCRIPT_FILENAME"],"demo")) {
$UA = $_SESSION["S"]->getCurrentUser()->getA();
if($UA->name != "Installations-Benutzer"){
$g = "In der Demo können keine Benutzer geändert werden!";
$gui->setIsDisplayMode(true);
}
}*/
$TR = new HTMLTable(1);
if ($allowedUsers !== null and $id == -1) {
$B = new Button("", "notice", "icon");
$B->style("float:left;margin-right:10px;");
$TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
}
if ($allowedUsers === null) {
$B = $gui->addSideButton("Externe\nAuthentifizierung", "./plugins/Users/auth.png");
$B->popup("", "Externe Authentifizierung", "Users", "-1", "authenticationPopup");
}
$gui->prepend($TR);
$gui->customize($this->customizer);
try {
$AD = new LoginAD();
$AD->getUsers();
if ($AD->n() !== null) {
$B = $gui->addSideButton("ActiveDirectory-\nBenutzer", "users");
}
$B->popup("", "ActiveDirectory-Benutzer", "Users", "-1", "ldapUsersPopup");
} catch (Exception $e) {
}
return $gui->getBrowserHTML($id);
}
示例5: lCV3
public function lCV3($id = -1, $returnCollector = true)
{
$num = parent::lCV3($id, $returnCollector);
$c = array();
while ($E = $this->getNextEntry()) {
if ($E->A("FileIsDir") != 1) {
$c[] = $E;
}
}
$this->resetPointer();
if ($this->hideDirs) {
$this->collector = $c;
}
return $num;
}
示例6: getHTML
public function getHTML($id)
{
$allowedUsers = Environment::getS("allowedUsers", null);
$this->addOrderV3("name");
if ($this->A == null) {
$this->lCV3($id);
}
$up = new anyC();
$up->setCollectionOf("User");
$up->addAssocV3("password", "!=", ";;;-1;;;");
$up->lCV3();
if ($up->numLoaded() > 0 and $id == -1) {
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>";
}
$T = new HTMLTable(1, "Application Server");
$I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
$I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
if ($allowedUsers === null) {
$T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
}
$gui = new HTMLGUI();
$gui->setObject($this);
$gui->setName("Benutzer");
$gui->setCollectionOf($this->collectionOf, "Benutzer");
#$gui->setObject($this);
$gui->setParser("isAdmin", "UsersGUI::isAdminParser");
$gui->setColWidth("isAdmin", "20px");
#$gui->hideAttribute("password");
#$gui->hideAttribute("SHApassword");
#$gui->hideAttribute("language");
$gui->setShowAttributes(array("name", "username", "isAdmin"));
$g = "";
if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
$UA = $_SESSION["S"]->getCurrentUser()->getA();
if ($UA->name != "Installations-Benutzer") {
$g = "In der Demo können keine Benutzer geändert werden!";
$gui->setIsDisplayMode(true);
}
}
$TR = new HTMLTable(1);
if ($allowedUsers !== null and $id == -1) {
$B = new Button("", "notice", "icon");
$B->style("float:left;margin-right:10px;");
$TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
}
$gui->customize($this->customizer);
return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
}
示例7: 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");
}
示例8: 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();
}
}
示例9: update
public function update($echo = false)
{
$oldest = new anyC();
$oldest->setCollectionOf("Serie");
$oldest->addOrderV3("lastupdate", "ASC");
$oldest->addAssocV3("status", "=", "Continuing");
$oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 3);
$oldest->setLimitV3("2");
while ($S = $oldest->getNextEntry()) {
$this->download($S, $echo);
}
$oldest = new anyC();
$oldest->setCollectionOf("Serie");
$oldest->addOrderV3("lastupdate", "ASC");
$oldest->addAssocV3("status", "=", "Ended");
$oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 21);
$oldest->setLimitV3("1");
while ($S = $oldest->getNextEntry()) {
$this->download($S, $echo);
}
$oldest = new anyC();
$oldest->setCollectionOf("Serie");
$oldest->addOrderV3("lastupdate", "ASC");
$oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 3, "AND", "1");
$oldest->addAssocV3("status", "=", "Continuing", "AND", "1");
$oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 21, "OR", "2");
$oldest->addAssocV3("status", "=", "Ended", "AND", "2");
$oldest->lCV3();
return $oldest->numLoaded();
}