本文整理汇总了PHP中HTMLTable::addRowClass方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::addRowClass方法的具体用法?PHP HTMLTable::addRowClass怎么用?PHP HTMLTable::addRowClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTable
的用法示例。
在下文中一共展示了HTMLTable::addRowClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
}
示例2: getHTML
function getHTML($id)
{
#$p = mUserdata::getPluginSpecificData("mStatistik");
#if(!isset($p["pluginSpecificCanUseControlling"]))
# return;
$html = "";
#parent::getHTML($id);
$tab = new HTMLTable(1);
$tab->addRow("<div id=\"my_chartTodo\" style=\"height:200px;width:470px;\"></div>");
$tab->addRowClass("backgroundColor0");
$AC = $this->data();
$U = Users::getUsersArray(null, true);
$U[-1] = "Allgemein";
$T = new HTMLTable(6);
$T->addColStyle(2, "text-align:right;");
$T->addColStyle(3, "text-align:right;");
$T->addColStyle(4, "text-align:right;");
$T->addColStyle(5, "text-align:right;");
$T->addColStyle(6, "text-align:right;");
$T->addHeaderRow(array("Benutzer", "Gesamt", "Abgesch.", "Kalt", "Erst", "Folge"));
while ($A = $AC->n()) {
$T->addRow(array(isset($U[$A->A("TodoUserID")]) ? $U[$A->A("TodoUserID")] : "Benutzer ID " . $A->A("TodoUserID"), $A->A("gesamt"), $A->A("gesamtDM") . " (" . Util::CLNumberParserZ($A->A("gesamt") != 0 ? round($A->A("gesamtDM") / $A->A("gesamt") * 100, 2) : 0) . "%)", $A->A("gesamtKalt"), $A->A("gesamtErst"), $A->A("gesamtFolge")));
$T->addRowStyle("cursor:pointer;");
$T->addRowEvent("click", OnEvent::rme($this, "details", array($A->A("TodoUserID")), "function(t){ \$j('#contentScreenLeft').html(t.responseText); }"));
}
if ($AC->numLoaded() == 0) {
$T->addRow(array("Es liegen keine Daten vor"));
$T->addRowColspan(1, 4);
}
return "<p class=\"prettySubtitle\">Termine</p>" . $tab . $html . $T . OnEvent::script("\n\t\t\tvar plot = \$j.plot(\$j('#my_chartTodo'), " . $this->chart() . ", {\n\t\t\tseries: {\n\t\t\t\tpie: { show: true, innerRadius: 0.4 }\n\t\t\t}\n\t\t\t});" . OnEvent::rme($this, "getHeaderCenter", "", "function(transport){ \$j('#contentScreenCenterHeader').html(transport.responseText); }"));
}
示例3: getHTML
public function getHTML($id, $page)
{
$bps = $this->getMyBPSData();
$LangTab = new HTMLTable(1, "Language selection:");
$LangTab->addRow("German");
$LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:de');");
$LangTab->addRowStyle("cursor:pointer;");
if ($bps != -1 and $bps["lang"] == "de") {
$LangTab->addRowClass("backgroundColor1");
}
$LangTab->addRow("English");
$LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:en');");
$LangTab->addRowStyle("cursor:pointer;");
if ($bps != -1 and $bps["lang"] == "en") {
$LangTab->addRowClass("backgroundColor1");
}
if ($bps == -1) {
return $LangTab;
}
$T = new HTMLTable(1);
$T->setTableStyle("width:370px;float:left;");
$FeedSerien = array();
$i = 0;
$Series = array();
$RSS = new mRSSFilterGUI();
while ($R = $RSS->getNextEntry()) {
$new = $R->filterNew();
foreach ($new as $S => $v) {
if ($v->language != $bps["lang"]) {
continue;
}
$Series[$v->name] = "rmeP('NewSeries', '-1', 'showInfo', ['{$v->name}', '{$v->language}'], 'if(checkResponse(transport)) { \$(\\'Row{$i}\\').className = \\'backgroundColor1\\'; \$(\\'contentLeft\\').update(transport.responseText); }');";
}
}
asort($Series);
foreach ($Series as $name => $action) {
$T->addRow(array($name));
$T->addRowStyle("cursor:pointer;");
$T->addRowEvent("click", $action);
$T->setRowID("Row{$i}");
$i++;
}
return $LangTab . "<div style=\"margin-left:0px;height:500px;overflow:auto;\">" . $T . "</div>";
}
示例4: getConfigPopup
/**
* Popup zur Konfiguration eines Servers.
*/
public function getConfigPopup($echo = true)
{
// Button
$BCreate = new Button("Server\nhinzufügen", "new");
$BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
$htmlTableButton = new HTMLTable(1);
$htmlTableButton->addRow($BCreate);
// Liste der konfigurierten Server
$userId = $_SESSION["S"]->getCurrentUser()->getID();
$T = new HTMLTable(1, "xCal Server");
$BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
$BDeleteRaw->style("float: right;");
$serverList = anyC::get("xCal", "xCalUserID", $userId);
$counter = 0;
while ($S = $serverList->getNextEntry()) {
$BDelete = clone $BDeleteRaw;
$BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
$F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
$F->getTable()->setColWidth(1, 120);
$F->setValues($S);
$F->setLabel("xCalName", "Bezeichnung");
$F->setLabel("xCalUrl", "URL");
$F->setLabel("xCalServerActive", "Für den Import verwenden");
$F->setType("xCalServerActive", "checkbox");
$F->useRecentlyChanged();
$F->setSaveClass("xCal", $S->getID(), "''");
$display = "none";
if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
$display = "";
}
$div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span> <br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . " </small>\n\t\t\t\t</div>";
$T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
$T->addRowClass("backgroundColor0");
$T->addCellClass(1, "borderColor1");
$counter++;
}
if ($counter == 0) {
$T->addRow("Keine Server eingetragen!");
}
if ($echo == "" || $echo === true) {
echo $htmlTableButton . $T;
} else {
return $htmlTableButton . $T;
}
}
示例5: getHTML
public function getHTML($id)
{
// <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 ($_SESSION["S"]->isUserAdmin()) {
return parent::getHTML($id);
}
switch ($id) {
case "1":
$AC = anyC::get("JDownload");
$AC->addOrderV3("JDownloadDate", "DESC");
$AC->setLimitV3(19);
$T = new HTMLTable(2);
$T->weight("light");
$T->addColStyle(1, "padding:5px;padding-left:10px;");
$T->addColStyle(2, "color:grey;text-align:right;padding:5px;");
while ($D = $AC->getNextEntry()) {
$T->addRow(array($D->A("JDownloadRenameto"), Util::formatByte($D->A("JDownloadFilesize"), 2)));
if ($D->A("JDownloadRenamed") == 0) {
$T->addRowClass("error");
}
#$r .= OnEvent::script ("\$j('#BrowsermJDownload".$E->getID()."').css('background-color', '');");
$T->addRowStyle("cursor:pointer;");
$T->addRowEvent("click", "contentManager.loadPlugin('contentRight', 'mJDownload', '', " . $D->getID() . ");");
}
return "<p class=\"prettyTitle\">Downloads</p>" . $T;
break;
case "2":
break;
case "3":
return "";
break;
}
}
示例6: editInWindow
public function editInWindow($UDID)
{
$T = new HTMLTable(1);
$B = new Button("Desktop-Link\nlöschen", "trash");
$B->onclick("");
$B->style("float:right;");
$B->rmePCR("DesktopLink", "", "delete", $UDID, "if(checkResponse(transport)){ Popup.close('', 'DesktopLinkPopup'); DesktopLink.loadContent(true); }");
$T->addRow($B);
$T->addRowClass("backgroundColor0");
$UD = new Userdata($UDID);
$F = new HTMLForm("DesktopLinkEdit", array("order", "symbol", "name", "UDID"), "Bearbeiten:");
$F->setSaveRMEP("Desktop-Link speichern", "./images/i2/save.gif", "DesktopLink", "{$UDID}", "save", "if(checkResponse(transport)){ Popup.close(\\'\\', \\'DesktopLinkPopup\\'); DesktopLink.loadContent(true); }");
$v = explode(";", $UD->A("wert"));
$F->setValue("order", $v[0]);
$F->setValue("symbol", $v[1]);
$F->setValue("name", $v[2]);
$F->setValue("UDID", $UDID);
$F->setType("UDID", "hidden");
$F->setType("order", "hidden");
$F->setType("symbol", "hidden");
echo $T . $F;
}
示例7: EMailPopup
/**
* Method to display an E-Mail popup for easy E-Mail sending
*
* Requires a method named "getEMailData" in $dataClass which returns an array:
* array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
*
* Will call $dataClass($dataClassID)::sendEmail afterwards
*
* @param string $dataClass
* @param string $dataClassID
*/
public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null)
{
$c = new $dataClass($dataClassID);
$data = $c->getEMailData($callbackParameter);
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
$tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>");
if (count($data["recipients"]) == 1) {
$tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small><" . $data["recipients"][0][1] . "></small>");
} else {
$recipients = array();
foreach ($data["recipients"] as $ID => $Rec) {
$recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID);
}
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
$tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
$tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
$tab->addRowColspan(1, 2);
$tab->addRowClass("backgroundColor0");
if ($onSuccessFunction == null) {
$onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
}
$BAbort = new Button("Abbrechen", "stop");
$BAbort->onclick("Popup.close('Util', 'edit');");
$BAbort->style("margin-bottom:10px;margin-top:10px;");
$BGo = new Button("E-Mail\nsenden", "okCatch");
$BGo->style("float:right;margin-top:10px;");
$BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
#$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
$tab->addRow(array($BGo . $BAbort));
$tab->addRowColspan(1, 2);
#$tab->addRowClass("backgroundColor0");
echo $tab;
}
示例8: getEditHTML
public function getEditHTML()
{
if (BPS::getProperty($this->className . "GUI", "edit") == "ok") {
return $this->getEditTableHTML();
}
################################################################################
if ($this->name == null) {
$this->name = $this->className;
}
if ($this->attributes == null) {
$this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
}
$widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
if ($widths == null) {
$widths = array(700, 132, 218);
}
$tab = new HTMLTable(2);
$tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;");
$tab->setColWidth(1, "50%");
$tab->setColWidth(2, "50%");
$A = $this->object->getA();
$TSub = new HTMLTable(2);
$TSub->setColWidth(1, 120);
$TSub->setColClass(1, "");
$TSub->setColClass(2, "");
$TC = clone $TSub;
$row = array();
foreach ($this->attributes as $k => $v) {
if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
continue;
}
if (isset($this->parsers[$v])) {
$A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object);
}
if (isset($this->types[$v]) and $this->types[$v] == "select") {
if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) {
$A->{$v} = $this->options[$v][$A->{$v}];
}
}
if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
if ($k > 0) {
$row[] = $TC;
}
if ($this->forceNewRow[$v]) {
$row[] = "";
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
$row = array();
}
if (count($row) == 2) {
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
$row = array();
}
$TC = clone $TSub;
if (trim($this->spaces[$v]) != "") {
$TC->addRow(array($this->spaces[$v]));
$TC->addRowClass("backgroundColor2");
$TC->addRowColspan(1, 2);
}
}
if ($A->{$v} != "") {
$B = "";
if (isset($this->fieldButtons[$v])) {
$B = $this->fieldButtons[$v];
$B->style("float:right;");
}
$TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v}));
$TC->addRowStyle("vertical-align:top;");
}
/*
$label = isset($this->labels[$v]) ? $this->labels[$v] : $v;
$row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>";
$row[] = nl2br($A->$v);*/
/*if(count($row) == 4){
$tab->addRow($row);
$row = array();
}*/
}
$row[] = $TC;
if (count($row) == 1) {
$row[] = "";
}
if (count($row) == 2) {
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
}
$BE = new Button("Eintrag\nbearbeiten", "edit");
$BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit));
$BE->style("float:left;margin-left:10px;");
$BD = new Button("Eintrag\nlöschen", "trash");
$BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete));
$BD->style("float:left;margin-left:10px;");
//.........这里部分代码省略.........
示例9: loadDetails
public function loadDetails()
{
echo $this->getHTML($this->ID, "window");
return;
$this->setParser("TodoFromDay", "Util::nothingParser");
$this->setParser("TodoFromTime", "Util::nothingParser");
$this->setParser("TodoTillDay", "Util::nothingParser");
$this->setParser("TodoTillTime", "Util::nothingParser");
$this->loadMe();
$head = "<div id=\"TodoDetailsHandler{$this->ID}\" class=\"backgroundColor1 cMHeader\">Detailansicht ToDo \"" . $this->A->TodoName . "\"</div>";
try {
$T = new mTeilnehmerGUI();
$T->classID = $this->ID;
$T->className = "Todo";
$T->addAssocV3("TeilnehmerTodoID", "=", $this->ID);
$T->addJoinV3("User", "TeilnehmerUserID", "=", "UserID");
$T->addOrderV3("TeilnehmerTeamID");
$table = "\n\t\t\t<table style=\"width:100%;border:0px;\">\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col />\n\t\t\t\t</colgroup>";
$teilnehmerID = 0;
$teilnehmerStatus = -1;
$cu = $_SESSION["S"]->getCurrentUser()->getID();
while ($s = $T->getNextEntry()) {
if ($s->getA()->TeilnehmerUserID == $cu) {
$teilnehmerID = $s->getID();
$teilnehmerStatus = $s->getA()->TeilnehmerStatus;
}
$table .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"padding-left:0px;padding-top:0px;\">" . $s->getA()->name . "</td>\n\t\t\t\t</tr>";
}
$table .= "\n\t\t\t</table>";
} catch (ClassNotFoundException $e) {
$table = "";
}
$t = new HTMLTable(2, "Detailansicht ToDo \"" . $this->A->TodoName . "\"");
$t->addColStyle(1, "text-align:right;");
$t->addColStyle(1, "width:110px;");
#<input class=\"multiEditInput2\" onfocus=\"oldValue = this.value;\" onblur=\"if(oldValue != this.value) saveMultiEditInput('Posten','".$t->getID()."','preis');\" value=\"$ta->preis\" id=\"preisID".$t->getID()."\" type=\"text\" onkeyup=\"updateEKs('".$t->getID()."');\" onkeydown=\"if(event.keyCode == 13) saveMultiEditInput('Posten','".$t->getID()."','preis');\" />
if ($teilnehmerID != 0) {
$st = $this->getStatus();
$o = "";
foreach ($st as $k => $v) {
$o .= "<option " . ($k == $this->A->TodoStatus ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
}
$status = "<select id=\"TodoStatusID{$this->ID}\" onchange=\"saveMultiEditInput('Todo','" . $this->getID() . "','TodoStatus');\">{$o}</select>";
} else {
$status = $this->getStatus($this->A->TodoStatus);
}
$t->addRow(array("Priorität:", $this->getPriorities($this->A->TodoPriority)));
$t->addRow(array("Status:", $status));
if ($teilnehmerID != 0) {
$percent = "\n\t\t\t<select id=\"TodoPercentID{$this->ID}\" onchange=\"ToDo.onChange();\">";
for ($i = 0; $i <= 100; $i += 5) {
$percent .= "\n\t\t\t\t<option " . ($this->A->TodoPercent == $i ? "selected=\"selected\"" : "") . " value=\"{$i}\">{$i} %</option>";
}
$percent .= "\n\t\t\t</select>\n\t\t\t<input type=\"hidden\" id=\"TodoID\" value=\"{$this->ID}\" />";
/*<input type=\"text\" readonly=\"readonly\" id=\"TodoPercentID$this->ID\" value=\"{$this->A->TodoPercent}\" style=\"width:30px;float:right;text-align:right;margin-right:13px;\" />
<div id=\"prozentSlider$this->ID\" style=\"height:19px;width:4px;background-color:black;cursor:move;margin-bottom:-17px;\"></div>
<div id=\"prozentTrack$this->ID\" style=\"width:80%;height:15px;\" class=\"backgroundColor1\" />";
*/
} else {
$percent = $this->A->TodoPercent;
}
$t->addRow(array("Prozent:", $percent));
if ($this->A->TodoDescription != "") {
$t->addRow("");
$t->addRowClass("backgroundColor0");
$t->addRow(array("Beschreibung:", nl2br($this->A->TodoDescription)));
}
$t->addRow("");
$t->addRowClass("backgroundColor0");
$t->addRow(array("Beginn am:", Util::CLDateParserL($this->A->TodoFromDay)));
$t->addRow(array("Fällig bis:", Util::CLDateParserL($this->A->TodoTillDay)));
$t->addRow("");
$t->addRowClass("backgroundColor0");
echo $t->getHTML();
}
示例10: topButtons
private function topButtons($bps = null)
{
T::D($this->className);
$TT = "";
if (count($this->topButtons) > 0 and ($bps == null or !isset($bps["selectionMode"]))) {
$TT = new HTMLTable(1);
$TT->addTableClass("browserContainerSubHeight");
if ($this->displayMode == "CRMSubframeContainer") {
$buttons = "";
foreach ($this->topButtons as $B) {
$buttons .= $B;
}
$TT->addRow($buttons);
$TT->addRowClass("backgroundColor0");
} else {
foreach ($this->topButtons as $B) {
$TT->addRow($B . "");
}
}
}
T::D("");
return $TT;
}
示例11: EMailPopup
/**
* Method to display an E-Mail popup for easy E-Mail sending
*
* Requires a method named "getEMailData" in $dataClass which returns an array:
* array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
*
* Will call $dataClass($dataClassID)::sendEmail afterwards
*
* @param string $dataClass
* @param string $dataClassID
*/
public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false)
{
$c = new $dataClass($dataClassID);
$data = $c->getEMailData($callbackParameter);
$html = "";
if (isset($data["attachmentsAlways"])) {
/*$B = new Button("Anhänge", "export", "LPBig");
$B->style("margin:10px;float:right;");
$B->sidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'$dataClass'", "'$dataClassID'", "'$callbackParameter'"));
$html .= $B;*/
$html .= OnEvent::script(OnEvent::popupSidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'{$dataClass}'", "'{$dataClassID}'", "'{$callbackParameter}'")));
}
#$html .= "<p class=\"prettyTitle\">Neue E-Mail</p>";
#$html .= "<div style=\"clear:both;\"></div>";
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
$tab->addLV("Absender:", "{$data['fromName']}<br /><small style=\"color:grey;\"><{$data['fromAddress']}></small>");
if (is_array($data["recipients"])) {
if (count($data["recipients"]) == 1) {
$tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small style=\"color:grey;\"><" . $data["recipients"][0][1] . "></small>");
} else {
$recipients = array();
foreach ($data["recipients"] as $ID => $Rec) {
$recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID);
}
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
} else {
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
if (isset($data["bcc"]) and count($data["bcc"]) > 0) {
foreach ($data["bcc"] as $bcc) {
$tab->addLV("BCC:", $bcc);
}
}
$tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
$html .= $tab;
$html .= "<div style=\"width:94%;margin:auto;\"><textarea class=\"tinyMCEEditor\" id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>";
#$tab->addRow(array(""));
#$tab->addRowColspan(1, 2);
#$tab->addRowClass("backgroundColor0");
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
if ($onSuccessFunction == null) {
$onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
}
$BAbort = new Button("Abbrechen", "stop");
if ($onAbortFunction == null) {
$BAbort->onclick("Popup.close('Util', 'edit');");
} else {
$BAbort->onclick($onAbortFunction);
}
$BAbort->style("margin-bottom:10px;margin-top:10px;");
$optional = "var files = '';";
if (isset($data["attachmentsOptional"])) {
$optional .= "\$j('#UtilEmailFormAttachments input[type=checkbox]:checked').each(function(k, v){ files += \$j(v).data('value')+'##'; });";
}
$BGo = new Button("E-Mail\nsenden", "okCatch");
$BGo->style("float:right;margin-top:10px;");
$BGo->loading();
$BGo->doBefore("{$optional} %AFTER");
if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") {
$BGo->doBefore("{$optional} \$j('#EMailBody{$dataClassID}').val(tinyMCE.get('EMailBody{$dataClassID}').getContent()); %AFTER");
}
$BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$j('#EMailBody{$dataClassID}').val()", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'", "files"), $onSuccessFunction);
#$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
$tab->addRow(array($BGo . $BAbort));
$tab->addRowColspan(1, 2);
$tab->addRowClass("backgroundColor0");
$html .= $tab;
if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") {
echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t" . tinyMCEGUI::editorMail("EMailBody{$dataClassID}", null, "undo redo | pastetext | bold italic underline | fullscreen code") . "\n\t\t\t}, 100);");
}
if ($return) {
return $html;
} else {
echo $html;
}
}
示例12: getWindow
public function getWindow()
{
$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()) {
$T = new HTMLTable(1);
$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 des Backups beträgt " . Util::formatByte($F->A("FileSize"), 2));
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"));
}
} catch (Exception $e) {
$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 .= "<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);
echo $html . $TF;
}
示例13: checkAddressKlickTel
public function checkAddressKlickTel($data)
{
$KT = new klickTel(-1);
$Adresse = new Adresse($data["AdresseID"]);
Aspect::joinPoint("before", $this, __METHOD__, $data);
//call AFTER new Adresse!
try {
$result = $KT->checkAddress($data["AdresseID"]);
} catch (Exception $e) {
Aspect::joinPoint("onError", $this, __METHOD__, array($data, $e));
//call AFTER new Adresse!
die("<p>" . $e->getMessage() . "</p>");
}
$T = new HTMLTable(2, "Gefundene Adressen");
$T->useForSelection(false);
$T->setTableStyle("width:100%;");
$i = 0;
$found = null;
foreach ($result as $k => $A) {
$T->addRow(array($A->street . " " . $A->streetnumber, $A->zipcode . " " . $A->city));
$T->addRowEvent("click", "CustomerPage.rme('changeAddressKlickTel', {AdresseID: {$data['AdresseID']}, useNr: {$k}, GRLBMID:{$data['GRLBMID']}}, function(){ CustomerPage.closePopup(); CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); \$('#BCheckKT').css('color', 'green'); }); });");
$T->addRowClass("selectable");
$found = $A;
$i++;
}
echo "<p>" . $Adresse->getHTMLFormattedAddress() . "</p>";
if ($i == 1 and $Adresse->A("strasse") == $found->street and $Adresse->A("nr") == $found->streetnumber and $Adresse->A("plz") == $found->zipcode and $Adresse->A("ort") == $found->city) {
Aspect::joinPoint("onSuccess", $this, __METHOD__, array($data, $found));
//call AFTER new Adresse!
die("<p style=\"color:green;\">Diese Adresse wurde genau so in der klickTel Datenbank gefunden.</p>" . OnEvent::script("\$('#BCheckKT').css('color', 'green');"));
}
echo $T;
}
示例14: getBrowserHTML
function getBrowserHTML($lineWithId = -1)
{
$this->texts = $this->languageClass->getBrowserTexts();
$singularLanguageClass = $this->loadLanguageClass($this->singularClass);
$userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass);
$userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass);
$userHiddenFields = mUserdata::getHides($this->singularClass);
$defaultTarget = "contentRight";
if ($this->displaySide != "default") {
$defaultTarget = "content" . ucfirst($this->displaySide);
}
if ($this->singularClass == "none") {
echo "collectionOf is not set. See message log for further details.";
throw new CollectionOfNotSetException();
}
if ($this->name == "Noname") {
$_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that.");
}
/**
* ERROR-TABLE
*/
$errorTab = new HTMLTable(1);
if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) {
$errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>");
}
/**
* RETURN-BUTTON
*/
$returnTab = new HTMLTable(1);
if ($this->isSelection) {
$BReturn = new Button("Auswahl\nbeenden", "back");
$BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');");
#return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />";
$returnTab->addRow($BReturn);
}
/**
* DELETE-BUTTON
*/
if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) {
$this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>";
} elseif (!$userCanDelete) {
$this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />";
}
/**
* EDIT-BUTTON
*/
if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) {
$EB = new Button("", "./images/i2/edit.png");
$EB->type("icon");
$EB->className("editButton");
if ($this->JSOnEdit == null) {
$EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');");
} else {
$EB->onclick($this->JSOnEdit);
}
$this->newColsLeft["select"] = $EB;
}
$cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight);
$valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null);
$valuesTab->addTableClass("contentBrowser");
/*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right"))
$valuesTab->setColClass($cols, "backgroundColor0");
if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left")
$valuesTab->setColClass(1, "backgroundColor0");*/
/**
* QUICKSEARCH
*/
#$quickSearchRow = "";
if ($this->quickSearchPlugin != "" and $lineWithId == -1) {
list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField();
if ($this->displaySide == "left") {
$insertRow = array($quickSearchRow);
for ($i = 1; $i < $cols - 1; $i++) {
$insertRow[] = "";
}
$insertRow[] = $BSearchInfo;
$valuesTab->addRow($insertRow);
$valuesTab->addRowColspan(1, $cols - 1);
} else {
$valuesTab->addRow(array($BSearchInfo, $quickSearchRow));
$valuesTab->addRowColspan(2, $cols - 1);
}
$valuesTab->addRowClass("backgroundColorHeader");
}
if ($this->headerRow != null) {
$valuesTab->addHeaderRow($this->headerRow);
}
/**
* PAGE-BROWSER
*/
#$multiPageRow = "";
$separator = "";
$userDefinedEntriesPerPage = false;
$isMultiPageMode = false;
if (count($this->multiPageMode) > 0) {
$isMultiPageMode = true;
$this->multiPageMode[3] = $defaultTarget;
if ($this->multiPageMode[2] == 0) {
$userDefinedEntriesPerPage = true;
#$mU = new mUserdata();
//.........这里部分代码省略.........
示例15: getHTML
public function getHTML($id)
{
$bps = $this->getMyBPSData();
$B1 = new Button("Servers", "./fheME/Fhem/fhemServers.png");
$B1->style("float:right;");
$B1->onclick("contentManager.loadFrame('contentRight','mFhemServer'); contentManager.emptyFrame('contentLeft');");
$B2 = new Button("Devices", "./fheME/Fhem/fhem.png");
$B2->style("float:right;");
$B2->onclick("contentManager.loadFrame('contentRight','mFhem', -1, 0,'mFhemGUI;showDevices:true'); contentManager.emptyFrame('contentLeft');");
// $B3 = new Button("Rooms","gutschrift");
// $B3->style("float:right;");
// $B3->onclick("contentManager.loadFrame('contentRight','mGruppe');");
$B6 = new Button("Presets", "./fheME/Fhem/events.png");
$B6->style("float:right;");
$B6->onclick("contentManager.loadFrame('contentRight','mFhemPreset'); contentManager.emptyFrame('contentLeft');");
$BLoc = new Button("Locations", "./fheME/FhemLocation/FhemLocation.png");
$BLoc->style("float:right;");
$BLoc->onclick("contentManager.loadFrame('contentRight','mFhemLocation'); contentManager.emptyFrame('contentLeft');");
if (!Session::isPluginLoaded("mFhemLocation")) {
$BLoc = "";
}
// $B4 = new Button("Refresh","refresh");
// $B4->style("float:right;");
// $B4->onclick("Fhem.refreshControls();");
#$B5 = new Button("Timers","backup");
#$B5->style("float:right;");
#$B5->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;-'); contentManager.emptyFrame('contentLeft');");
$html = "\n\t\t<script type=\"text/javascript\">\n\t\t\tcontentManager.loadFrame('contentLeft','FhemControl');\n\t\t</script>";
if (isset($bps["noLeft"])) {
$html = "";
}
$t = new HTMLTable(1);
$t->setTableStyle("width:160px;float:right;margin-right:10px;");
#$t->addRow($B5);
#$t->addRowClass("backgroundColor0");
#$t->addRow("");
#$t->addRowClass("backgroundColor1");
// $t->addRow($B3);
// $t->addRowClass("backgroundColor0");
$t->addRow($B2);
$t->addRowClass("backgroundColor0");
$t->addRow($B6);
$t->addRowClass("backgroundColor0");
// $t->addRow($B4);
// $t->addRowClass("backgroundColor0");
$t->addRow($B1);
$t->addRowClass("backgroundColor0");
$t->addRow($BLoc);
$t->addRowClass("backgroundColor0");
if (!isset($bps["showDevices"]) and !isset($bps["selectionMode"])) {
return $html . $t;
}
if (isset($bps["selectionMode"])) {
$this->addAssocV3("FhemServerID", "=", $_SESSION["BPS"]->getProperty("mFhemSelection", "selectionServerID"));
$this->addAssocV3("FhemType", "!=", "FHZ");
}
#----------------------------------------------
$this->addOrderV3("FhemServerID");
$this->addOrderV3("FhemType");
$this->addOrderV3("FhemName");
$gui = new HTMLGUIX($this);
$gui->displayGroup("FhemServerID", "mFhemGUI::DGParser");
$B = $gui->addSideButton("Load devices\nfrom server", "refresh");
$B->popup("", "Load devices", "mFhem", "-1", "loadDevices");
$B = $gui->addSideButton("Register\nsettings", "./fheME/Fhem/fhem.png");
$B->rme("FhemControl", "", "registerSettings", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);");
$B = $gui->addSideButton("Reset\nServers", "empty");
$B->rme("FhemControl", "", "resetServers", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);");
#$this->lCV3($id);
$gui->attributes(array("FhemName", "FhemType"));
$gui->name("Device");
if ($bps != -1 and isset($bps["selectionMode"])) {
$t2 = "";
}
return $gui->getBrowserHTML($id);
}