function showMobile() { $dvSc = new Div(); $dvSc->setWidth("100%"); $title = new Title("Shortcuts", 0, "10em"); $spc = new Line(); $dvSc->add(new Spacer(20)); $dvSc->add($title); $dvSc->add($spc); foreach ($this->SHORTCUTS_DB->ROWS as $shortcutRow) { $this->SHORTCUTS_URL_COMMAND = "/?switchShortcut="; $this->SHORTCUTS_TOOLTIP = "<table width='120' cellspacing=0 cellpadding=0>"; $this->prepareShortcutSwitchLink($shortcutRow->getNamedAttribute("id")); if ($this->SHORTCUTS_URL_COMMAND != "/?switchShortcut=") { // aktiver Link mit konfigurierten Items $this->SHORTCUTS_URL_COMMAND = str_replace("_", "", $this->SHORTCUTS_URL_COMMAND); $this->SHORTCUTS_TOOLTIP .= "</table> "; //$txtShortcut = new Text($shortcutRow->getNamedAttribute("name"), 3, true); //$txtShortcut->setTooltip($this->SHORTCUTS_TOOLTIP); $spn = new Span($shortcutRow->getNamedAttribute("name"), $shortcutRow->getNamedAttribute("name")); $spn->setFontsize("12em"); $spn->add(new Text($this->SHORTCUTS_TOOLTIP, null, false, false, false, false)); $dvSc->add($spn); $dvSc->add(new Text("<a href='" . $this->SHORTCUTS_URL_COMMAND . "'>" . "<center><div align='center' style='display:table-cell; padding:2px 25px; width:100%;vertical-align:middle;background-color:green'>" . "<font size='12em' color='#deffde'><b>aktivieren</b></font>" . "</div></center>" . "</a>", 2, false, false, false, false)); $dvSc->add($spc); } else { // inaktiv (Keine konfigurierten Items) $txt = new Text($shortcutRow->getNamedAttribute("name"), 3, false); $txt->setTooltip("Noch keine Konfiguration hinterlegt"); $dvSc->add($txt); $dvSc->add($spc); } } $dvSc->show(); }
function postHandleControlEdit($dbTable) { // Neuen Eintrag anlegen if (isset($_REQUEST['InsertNewControl']) && $_REQUEST['InsertNewControl'] == "do" && isset($_REQUEST['X']) && isset($_REQUEST['Y'])) { if (!(isset($_REQUEST['Name']) && isset($_REQUEST['FunkId']) && isset($_REQUEST['Art']))) { $mask = $this->getInsertMask($_REQUEST['X'], $_REQUEST['Y'] - $_SESSION['additionalLayoutHeight']); $mask->show(); $dv = new Div(); $dv->setVAlign("middle"); $dv->setAlign("center"); $dv->setBorder(3); $dv->setStyle("border-color", "#ff2200"); $dv->setStyle("background-color", "#aacc00"); $dv->setXPos($_REQUEST['X']); $dv->setYPos($_REQUEST['Y']); $dv->setWidth($this->CONTROL_IMAGE_WIDTH); $dv->setHeight($this->CONTROL_IMAGE_HEIGHT); $dv->add(new Text("Neu", 3, true, false, false, false)); $dv->show(); } } // Neuen Sensor anlegen if (isset($_REQUEST['InsertNewSensorControl']) && $_REQUEST['InsertNewSensorControl'] == "do") { if (!(isset($_REQUEST['name']) && isset($_REQUEST['id']) && isset($_REQUEST['sensor_art']))) { $mask = $this->getInsertSensorMask($_REQUEST['X'], $_REQUEST['Y'] - $_SESSION['additionalLayoutHeight']); $mask->show(); $dv = new Div(); $dv->setVAlign("middle"); $dv->setAlign("center"); $dv->setBorder(3); $dv->setStyle("border-color", "#ff2200"); $dv->setStyle("background-color", "#aacc00"); $dv->setXPos($_REQUEST['X']); $dv->setYPos($_REQUEST['Y']); $dv->setWidth($this->SENSOR_IMAGE_WIDTH); $dv->setHeight($this->SENSOR_IMAGE_HEIGHT); $dv->add(new Text("Neu", 2, true, false, false, false)); $dv->show(); } } // Existierenden Eintrag bearbeiten if (isset($_REQUEST['editControl']) && strlen($_REQUEST['editControl']) > 0) { if (!(isset($_REQUEST['RowId']) && isset($_REQUEST['Name']) && isset($_REQUEST['FunkId']) && isset($_REQUEST['Art']))) { $mask = $this->getEditMask($_REQUEST['editControl']); $mask->show(); } } // Existierenden Eintrag bearbeiten if (isset($_REQUEST['editSensorControl']) && strlen($_REQUEST['editSensorControl']) > 0) { if (!(isset($_REQUEST['RowId']) && isset($_REQUEST['name']) && isset($_REQUEST['sensor_art']) && isset($_REQUEST['sensor_art']))) { $mask = $this->getEditSensorMask($_REQUEST['editSensorControl']); $mask->show(); } } }
function showLogContent() { $div = new Div(); $div->setWidth("100%"); $div->setHeight("250"); $div->setStyle("white-space", "nowrap"); $output = array(); $tmp = exec("tail -n " . $this->getLinesToShow() . " " . $this->getPath(), $output); foreach (array_reverse($output) as $out) { $tx = new Text($out . "<br>", 2, false, false, false, false); $div->add($tx); } $ln = new Line(); $ln->show(); $div->show(); $ln->show(); }
/** * show-Methode fÃÂÃÂÃÂür TYPE = horizontal */ function showHorizontalMenu() { $div = new Div(); $div->setHeight($this->getHeight()); $div->setWidth($this->getWidth()); if (strlen($this->getAlign()) > 0) { $div->setAlign($this->getAlign()); } $div->setXPos($this->XPOS); $div->setYPos($this->YPOS); $div->setBorder($this->BORDER); $userStatus = $this->CONFIG->CURRENTUSER->STATUS; $menuArray = $this->MENUTABLE->getMenuByStatus($userStatus); $spacer = $this->SPACER; $spacer->setFonttype($this->getFonttype()); $rowCtr = mysql_num_rows($menuArray); $entryCount = mysql_num_rows($menuArray); $ctr = 0; //prÃÂÃÂÃÂüfvariable zum Rows mitzÃÂÃÂÃÂählen while ($row = mysql_fetch_array($menuArray)) { if ($row['id'] > 0) { // Spacer ( | oder ÃÂÃÂÃÂübergebener Spacer ) $lnk = $row['link']; if (strlen($row['parent']) > 0 && !strpos($lnk, "menuParent")) { $lnk .= "&menuParent=" . $row['parent']; } if ($ctr != 0 && $ctr != $entryCount) { $lSpacer = new Link($lnk, $spacer, false, $row['target']); //$lSpacer->setToolTip($row['tooltip']); $div->add($lSpacer); } // Link $txt = new Text($row['text']); $txt->setFonttype($this->getFonttype()); if (ltrim($txt->getText()) == $_SESSION['MENU_PARENT'] || ltrim($txt->getText()) == $this->getLabelByRunlink($_SESSION['runLink'], $_SESSION['MENU_PARENT'])) { $txt->setText("<font color='" . $_SESSION['config']->COLORS['hover'] . "' >" . $txt->getText() . "</font>"); $txt->setFilter(false); } $l = new Link($lnk, $txt, false, $row['target']); $l->setStyleclass("menulink"); //$l->setToolTip($row['tooltip']); $div->add($l); } $ctr++; //prÃÂÃÂÃÂüfvariable zum Rows mitzÃÂÃÂÃÂählen } $div->show(); }