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


PHP Button::image方法代码示例

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


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

示例1: icon

 public static function icon($data, Fhem $F, Button $B)
 {
     switch ($F->A("FhemHMModel")) {
         case "HM-Sec-RHS":
             if ($data->attributes()->state == "open") {
                 $B->image("warning");
             }
             if ($data->attributes()->state == "closed") {
                 $B->image("bestaetigung");
             }
             if ($data->attributes()->state == "tilted") {
                 $B->image("notice");
             }
             break;
     }
 }
开发者ID:nemiah,项目名称:fheME,代码行数:16,代码来源:FhemHM.class.php

示例2: process

 public function process(Fhem $F, $xml)
 {
     $state = $xml->attributes()->state;
     $stateText = "";
     $event = "\$j('#FhemControlID_" . $F->getID() . "').removeClass('highlight');";
     $FS = new Button("", "./images/i2/empty.png", "icon");
     $FS->style("float:left;margin-right:5px;width:32px;height:32px;");
     if ($state != "off" && $state != "aus") {
         $FS->image("./fheME/SieHabenPost/SieHabenPost.png");
         $stateText = "Sie haben Post!";
         $event = "\$j('#FhemControlID_" . $F->getID() . "').addClass('highlight');";
     }
     return "{$FS}<b>" . ($F->A("FhemAlias") == "" ? $F->A("FhemName") : $F->A("FhemAlias")) . "</b><br /><small style=\"color:grey;\">{$stateText}</small><div style=\"clear:both;\"></div>" . OnEvent::script($event);
 }
开发者ID:nemiah,项目名称:fheME,代码行数:14,代码来源:SieHabenPost.class.php

示例3: updateGUI

 public function updateGUI($ID = null)
 {
     $result = array();
     $S = new mFhemServerGUI();
     $S->addAssocV3("FhemServerType", "=", "0");
     while ($s = $S->getNextEntry()) {
         try {
             $x = simplexml_load_string($s->getListXML());
         } catch (NoServerConnectionException $e) {
             continue;
         }
         if (isset($x->dummy_LIST->dummy) and count($x->dummy_LIST->dummy) > 0) {
             foreach ($x->dummy_LIST->dummy as $k => $v) {
                 $F = new mFhemGUI();
                 $F->addAssocV3("FhemServerID", "=", $s->getID());
                 $F->addAssocV3("FhemName", "=", $v->attributes()->name);
                 $F = $F->getNextEntry();
                 if ($F == null) {
                     continue;
                 }
                 if ($ID and $F->getID() != $ID) {
                     continue;
                 }
                 $state = $v->attributes()->state;
                 #if($F->A("FhemModel") == "fs20irf") $state = "off";
                 #$state = strtolower(str_replace("dim", "", $state));
                 $FS = new Button("", "./fheME/Fhem/off.png", "icon");
                 $FS->style("float:left;margin-right:5px;");
                 if ($state != "off" && $state != "aus") {
                     $FS->image("./fheME/Fhem/on.png");
                 }
                 if (!is_numeric(str_replace("%", "", $state))) {
                     $state = "";
                 }
                 $return = "{$FS}<b>" . ($F->A("FhemAlias") == "" ? $F->A("FhemName") : $F->A("FhemAlias")) . "</b> <small style=\"color:grey;\">{$state}</small><div style=\"clear:both;\"></div>";
                 if ($F->A("FhemExtension") != "none" and $F->A("FhemExtension") != "") {
                     $c = $F->A("FhemExtension");
                     $c = new $c(-1);
                     $return = $c->process($F, $v);
                 }
                 $result[$F->getID()] = array("model" => $F->A("FhemModel"), "state" => $return);
             }
         }
         if (isset($x->FS20_LIST->FS20) and count($x->FS20_LIST->FS20) > 0) {
             foreach ($x->FS20_LIST->FS20 as $k => $v) {
                 $F = new mFhemGUI();
                 $F->addAssocV3("FhemServerID", "=", $s->getID());
                 $F->addAssocV3("FhemName", "=", $v->attributes()->name);
                 $F = $F->getNextEntry();
                 if ($F == null) {
                     continue;
                 }
                 if ($ID and $F->getID() != $ID) {
                     continue;
                 }
                 $state = $v->attributes()->state;
                 if ($F->A("FhemModel") == "fs20irf") {
                     $state = "off";
                 }
                 $state = strtolower(str_replace("dim", "", $state));
                 $FS = new Button("", "./fheME/Fhem/off.png", "icon");
                 $FS->style("float:left;margin-right:5px;");
                 if ($state != "off" && $state != "aus") {
                     $FS->image("./fheME/Fhem/on.png");
                 }
                 if (!is_numeric(str_replace("%", "", $state))) {
                     $state = "";
                 }
                 $result[$F->getID()] = array("model" => $F->A("FhemModel"), "state" => "{$FS}<b>" . ($F->A("FhemAlias") == "" ? $F->A("FhemName") : $F->A("FhemAlias")) . "</b> <small style=\"color:grey;\">{$state}</small><div style=\"clear:both;\"></div>");
             }
         }
         if (isset($x->IT_LIST->IT) and count($x->IT_LIST->IT) > 0) {
             foreach ($x->IT_LIST->IT as $k => $v) {
                 $F = new mFhemGUI();
                 $F->addAssocV3("FhemServerID", "=", $s->getID());
                 $F->addAssocV3("FhemName", "=", $v->attributes()->name);
                 $F = $F->getNextEntry();
                 if ($F == null) {
                     continue;
                 }
                 if ($ID and $F->getID() != $ID) {
                     continue;
                 }
                 $state = $v->attributes()->state;
                 $state = strtolower(str_replace("dim", "", $state));
                 $IT = new Button("", "./fheME/Fhem/off.png", "icon");
                 $IT->style("float:right;margin-right:-10px;margin-top:-13px;margin-left:3px;");
                 if ($state != "off" && $state != "aus") {
                     $IT->image("./fheME/Fhem/on.png");
                 }
                 $result[$F->getID()] = array("model" => $F->A("FhemITModel"), "state" => "{$IT}<b>" . ($F->A("FhemAlias") == "" ? $F->A("FhemName") : $F->A("FhemAlias")) . "</b> ");
             }
         }
         if (isset($x->CUL_HM_LIST->CUL_HM) and count($x->CUL_HM_LIST->CUL_HM) > 0) {
             foreach ($x->CUL_HM_LIST->CUL_HM as $k => $v) {
                 $F = new mFhemGUI();
                 $F->addAssocV3("FhemServerID", "=", $s->getID());
                 $F->addAssocV3("FhemName", "=", $v->attributes()->name);
                 $F = $F->getNextEntry();
                 if ($F == null) {
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:FhemControlGUI.class.php

示例4: showFeed

 public function showFeed()
 {
     $list = new HTMLList();
     $list->addListStyle("list-style-type:none;padding:5px;max-height:400px;overflow:auto;");
     $E = $this->parseFeed();
     $i = 0;
     foreach ($E as $item) {
         if ($this->A("RSSParserCount") > 0 and $this->A("RSSParserCount") <= $i) {
             break;
         }
         $B = new Button("", "empty", "icon");
         $B->style("float:left;margin-right:10px;margin-top:-5px;");
         if ($item->icon != null) {
             $B->image($item->icon);
         } else {
             $B = "";
         }
         $list->addItem($B . "<div id=\"RSSParserItemSF{$i}\" style=\"margin-top:33px;position:absolute;width:400px;display:none;border-width:1px;border-style:solid;padding:5px;border-radius:5px;\" onclick=\"\$j(this).toggle();\" class=\"backgroundColor0 borderColor1 RSSParserItemSF\"><small>" . $item->description . "</small></div>\n\t\t\t\t" . ($item->description != "" ? "<a href=\"#\" onclick=\"\$j('.RSSParserItemSF').hide(); \$j('#RSSParserItemSF{$i}').toggle();\" >" : "") . $item->title . ($item->description != "" ? "</a>" : "") . "<br /><small style=\"color:grey;\">" . Util::CLDateTimeParser($item->pubDate) . "</small>");
         $list->addItemStyle("clear:both;display:block;margin-left:0px;");
         $i++;
     }
     echo $list;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:23,代码来源:RSSParserGUI.class.php

示例5: getWindow

 public function getWindow($redo = false)
 {
     register_shutdown_function('BackupManagerGUIFatalErrorShutdownHandler');
     $F = new File(Util::getRootPath() . "system/Backup");
     if (!$F->A("FileIsWritable")) {
         $B = new Button("Achtung", "restrictions");
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $T = new HTMLTable(1);
         $T->addRow($B . "Es können keine Backups von Ihrer Datenbank angelegt werden, da das Verzeichnis /system/Backup nicht durch den Webserver beschreibbar ist.");
         $T->addRow("Machen Sie das Verzeichnis mit einem FTP-Programm beschreibbar. Klicken Sie dazu mit der rechten Maustaste auf das Verzeichnis auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 777 an, damit es durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.");
         $BRefresh = new Button("Aktualisieren", "refresh");
         $BRefresh->rmePCR("BackupManager", "", "getWindow", "", "Popup.displayNamed('BackupManagerGUI','Backup-Manager',transport);");
         $BRefresh->style("float:right;");
         $T->addRow($BRefresh);
         $T->addRow("");
         $T->addRowClass("backgroundColor0");
         $T->addRow($this->noBackupButton());
         die($T);
     }
     $html = "";
     if (!BackupManagerGUI::checkForTodaysBackup() or $redo) {
         $T = new HTMLTable(1);
         if ($redo) {
             unlink(BackupManagerGUI::getNewBackupName());
         }
         $BOK = $this->makeBackupOfToday();
         $F = new File(BackupManagerGUI::getNewBackupName());
         $F->loadMe();
         if ($BOK === basename(BackupManagerGUI::getNewBackupName()) and $F->A("FileSize") > 100) {
             $B = new Button("Backup abgeschlossen", "okCatch");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Das Backup wurde erfolgreich abgeschlossen!<br />Die Größe der Sicherungsdatei beträgt <strong>" . Util::formatByte($F->A("FileSize"), 2) . "</strong>");
             $T->addRowClass("backgroundColor0");
             try {
                 $ftpUpload = $this->FTPUpload(Util::getRootPath() . "system/Backup/{$BOK}");
                 if ($ftpUpload === true) {
                     $B = new Button("FTP-Upload erfolgreich", "okCatch");
                     $B->type("icon");
                     $B->style("float:left;margin-right:10px;");
                     $T->addRow(array($B . "Das Backup wurde erfolgreich auf den FTP-Server hochgeladen"));
                 }
                 $sftpUpload = $this->SFTPUpload(Util::getRootPath() . "system/Backup/{$BOK}");
                 if ($sftpUpload === true) {
                     $B = new Button("SFTP-Upload erfolgreich", "okCatch");
                     $B->type("icon");
                     $B->style("float:left;margin-right:10px;");
                     $T->addRow(array($B . "Das Backup wurde erfolgreich auf den SFTP-Server hochgeladen"));
                 }
             } catch (Exception $e) {
                 $B->image("warning");
                 $T->addRow(array($B . $e->getMessage()));
             }
             $html .= $T;
         } else {
             $B = new Button("Es ist ein Fehler aufgetreten", "stop");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Beim Erstellen des Backups ist ein Fehler aufgetreten: {$BOK}");
             $html .= $T;
         }
         $html .= OnEvent::script(OnEvent::frame("desktopLeft", "Desktop", "2"));
         #"<script type=\"text/javascript\">contentManager.reloadFrame('contentLeft');</script>";
     }
     $gesamt = 0;
     $data = $this->getBackupsList();
     $i = 0;
     $maxD = 5;
     if (count($data) < $maxD) {
         $maxD = count($data);
     }
     $TF = new HTMLTable(2, "Backups ({$maxD}/" . count($data) . ")");
     $TF->addColStyle(2, "text-align:right;");
     $TF->setColWidth(2, "80px");
     foreach ($data as $name => $size) {
         if ($i < 5) {
             if ($name == basename(BackupManagerGUI::getNewBackupName())) {
                 $name = "<span style=\"color:green;\">{$name}</span>";
             }
             $TF->addRow(array($name, Util::formatByte($size, 2)));
         }
         $i++;
         $gesamt += $size;
     }
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array("<b>Gesamt:</b>", "<b>" . Util::formatByte($gesamt, 2) . "</b>"));
     $TF->addCellStyle(1, "text-align:right");
     $TF->addRow(array("Diese Backups können als Admin-Benutzer im Installation-Plugin heruntergeladen und wiederhergestellt werden."));
     $TF->addRowColspan(1, 2);
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array($this->noBackupButton()));
     $TF->addRowColspan(1, 2);
     $BC = new Button("Fenster\nschließen", "bestaetigung");
     $BC->onclick(OnEvent::closePopup("", "BackupManagerGUI"));
     $BC->style("float:right;margin:10px;");
     $BD = new Button("Details\nanzeigen", "down");
     $BD->onclick("\$j('#BMMoreDetails').slideToggle();");
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:BackupManagerGUI.class.php


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