/** * Standard-Angezeige. * * ist ein Content definiert, wird dieser ebenfalls mit angegeben. */ function show() { echo "<a name='" . $this->NAME . "' "; if ($this->XPOS > 0 && $this->YPOS > 0) { echo " style=\" position:absolute; top:" . $this->YPOS . "px; left:" . $this->XPOS . "px; \" "; } if ($this->XPOS < 0 && $this->YPOS > 0) { echo " style=\" position:absolute; top:" . $this->YPOS . "px; right:" . $this->XPOS * -1 . "px; \" "; } if ($this->XPOS < 0 && $this->YPOS < 0) { echo " style=\" position:absolute; bottom:" . $this->YPOS * -1 . "px; right:" . $this->XPOS * -1 . "px; \" "; } if ($this->XPOS > 0 && $this->YPOS < 0) { echo " style=\" position:absolute; bottom:" . $this->YPOS * -1 . "px; left:" . $this->XPOS . "px; \" "; } echo $this->getToolTipTag() . ">"; if (get_class($this->TEXT) && method_exists($this->TEXT, "show")) { $this->TEXT->show(); } else { $t = new Text($this->TEXT); $t->setFilter(false); $t->show(); } echo "</a>"; }
function show() { $t = new Table(array("")); $t->setAlign($this->getAlign()); $r = $t->createRow(); $r->setHeader(true); $txt = new Text($this->TEXT); $txt->setFonttype($this->FONTTYPE); $txt->setFilter($this->getFilter()); $r->setAttribute(0, $txt); $t->addRow($r); $t->show(); }
function getTerminInfoForCalendarView($rowTermin) { $ret = new Text(""); if ($rowTermin['terminart'] == "angebot") { $res = $_SESSION['config']->DBCONNECT->executeQuery("SELECT * FROM stadt_angebot where terminserien_id = " . $rowTermin['id']); $rowAngebot = mysql_fetch_array($res); if ($rowAngebot["kategorie"] != 99 && $rowAngebot["aktivjn"] == 'J') { $txt = new Text($rowAngebot['name'] . "<hr>"); $txt->setFilter(false); $ret = new Link("?menuParent=Stadtplan&run=stadtplansuche&suchauswahlAnzeigen=" . $rowAngebot['id'] . "&suchauswahl=stadt_angebot", $txt); $ret->setToolTip("<b>" . $rowAngebot['name'] . "</b><br>" . $rowAngebot['text']); } } return $ret; }
function Error($title, $text, $backLink = '') { $t = "<font color='red' size='3' ><b>" . $text . "</b></font>"; if (strlen($backLink) > 0) { $t .= " <br><br><a target ='_top' href='" . $backLink . "'>ZurÃÂÃÂÃÂück</a>"; } $text = new Text($t); $text->setFilter(false); $title = array("FEHLER: " . $title); $tbl = new Table($title); $r = $tbl->createRow(); $r->setAttribute(0, $text); $tbl->addRow($r); $tbl->setWidth(500); $tbl->show(); exit; }
/** * zeigt die Checkboxs an */ function show() { $x = "<input id = '" . $this->NAME . "' type='checkbox' name='" . $this->NAME . "' value = '" . $this->WERT . "' " . $this->getToolTipTag() . " "; if ($this->isDisabled()) { $x .= " disabled "; } if ($this->isSelected()) { $x .= " checked "; } $x .= $this->getStyleString(); $x .= $this->getToolTipTag(); $x .= "> " . $this->TEXT . " "; $text = new Text($x); $text->setFilter(false); $text->show(); }
function getShowMask() { $tNames = $this->COLNAMES; if (count($this->LABELS) == count($this->COLNAMES)) { $tNames = $this->LABELS; } $table = new Table($tNames); $table->setAlignments($this->getAlignments()); $table->setBorder($this->BORDER); $table->setHeadEnabled($this->HEAD_ENABLED); $table->setBackgroundColorChange(true); if ($this->WIDTH > 0) { $table->setWidth($this->WIDTH); } if ($this->HEIGHT > 0) { $table->setHeight($this->HEIGHT); } if ($this->BORDER >= 0) { $table->setBorder($this->BORDER); } if ($this->PADDING >= 0) { $table->setPadding($this->PADDING); } else { $table->setPadding(0); } if ($this->SPACING >= 0) { $table->setSpacing($this->SPACING); } else { $table->setSpacing(0); } if ($this->XPOS > 0 && $this->YPOS > 0) { $table->setXPos($this->XPOS); $table->setYPos($this->YPOS); } //--------------------------------------------------- // ROWS in Table aufnehmen //--------------------------------------------------- $bgCtr = 1; for ($ir = 1; $ir <= count($this->ROWS); $ir++) { $r = $table->createRow(); for ($ia = 0; $ia < count($this->COLNAMES); $ia++) { $row = $this->ROWS[$ir]; $val = ""; $t = ""; if (!$this->isInvisibleCol($this->COLNAMES[$ia])) { if (strlen($row->getAttribute($ia)) > 0) { $val = getDbComboValue($this->TABLENAME, $this->COLNAMES[$ia], $row->getAttribute($ia)); } // Wenn DbCombo definiert wurde wird der passende Text zum Code der Spalte angezeigt if (strlen($val) > 0) { $t = $val; } else { $t = $row->getAttribute($ia); } if (strtolower($this->COLNAMES[$ia]) == "email") { $txt = $row->getAttribute($ia); $tmp = new Text($txt); $tmp->setFilter(false); $r->setAttribute($ia, new Link("mailto:" . $txt, $tmp)); } else { $r->setAttribute($ia, new Text($t)); } } else { $r->setAttribute($ia, " "); } } $table->addRow($r); } return $table; }
/** * Zeigt das DateTextfield an * Es wird eine Tabelle um das Feld gesetzt um eine * freie Positionierung so wie Tooltips oÃÂÃÂÃÂä zu ermÃÂÃÂÃÂöglichen. * (da der eigentliche Kalender ein Script ist) */ function show() { $tbl = new Table(array("")); $tbl->setWidth(50); $tbl->setAlign("left"); $dtText = "<script>DateInput('" . $this->NAME . "', true"; if (strlen($this->DATEFORMAT) > 7) { $dtText .= ", '" . $this->DATEFORMAT . "'"; if (strlen($this->VALUE) == strlen($this->DATEFORMAT)) { $dtText .= ", '" . $this->VALUE . "'"; } } $dtText .= ")</script>"; $dateTextField = new Text($dtText); $dateTextField->setFilter(false); $r = $tbl->createRow(); $r->setAttribute(0, $dateTextField); $tbl->addRow($r); $tbl->setToolTip($this->getTooltip()); $tbl->show(); }
function getFolderslist() { //alle Ordner holen $form = new Form($this->PARENT_PAGE); $hiddenPath = new HiddenField("Current_BB_Path", substr($this->PATH, strlen($_SERVER['DOCUMENT_ROOT']))); $form->add($hiddenPath); $folders = $this->FOLDER->getFolderArray(); $btnText = ""; if ($this->PATH != $this->ROOTPATH && strlen($this->PATH) > strlen($this->ROOTPATH)) { $p = $this->FOLDER->getParentFolderPath(); $btnBack = new Button("BB_Change_To_Parent_Folder", "ZurÃÂÃÂÃÂück zu: " . $this->FOLDER->getParentFolderName()); $form->add($btnBack); $spacer = new Text(" "); $spacer->setFilter(false); $form->add($spacer); } foreach ($folders as $dir) { $dirarray = explode("/", $dir); $btnText = $dirarray[count($dirarray) - 1]; $btn = new Button("BB_Change_Folder", $btnText); $form->add($btn); } return $form; }
$timeSelect->addRow($rT); // ------------------------- // Show // ------------------------- $tbl = new Table(array("", "")); $tbl->setColSizes(array(130)); $rTtl = $tbl->createRow(); $rTtl->setSpawnAll(true); $rTtl->setAttribute(0, $ttl); $tbl->addRow($rTtl); $tbl->addSpacer(0, 30); $rSelect = $tbl->createRow(); $rSelect->setAttribute(0, $txtSelect); $rSelect->setAttribute(1, $cboSensorSelect); $tbl->addRow($rSelect); $tbl->addSpacer(0, 10); $rTimeSelect = $tbl->createRow(); $rTimeSelect->setSpawnAll(true); $rTimeSelect->setAttribute(0, $timeSelect); $tbl->addRow($rTimeSelect); $tbl->addSpacer(0, 30); if (isset($_REQUEST['sensorSelectCob']) && strlen($_REQUEST['sensorSelectCob']) > 0) { $imgTxt = new Text("<img src='includes/pictures/sensorLogGraphs.inc.php?width=800&height=350&sensorId=" . $_REQUEST['sensorSelectCob'] . "&startTime=" . $_REQUEST['startTimeCob'] . "&endTime=" . $_REQUEST['endTimeCob'] . "'>"); $imgTxt->setFilter(false); $rGraph = $tbl->createRow(); $rGraph->setSpawnAll(true); $rGraph->setAttribute(0, $imgTxt); $tbl->addRow($rGraph); } $frmSelect->add($tbl); $frmSelect->show();
/** * Liefert den gesamten "Pfad" zum aktuellen Thread * @param $CurrentThreadtitle Name des aktuellen Themas */ function getFullParentStructure($CurrentThreadtitle) { $ret = new Div(); $thread = $CurrentThreadtitle; while (getParentThreadName($thread) != "" && getParentThreadName($thread) != null) { $thread = getParentThreadName($thread); $lnk = new Link("?changeCurrForumThread=" . $thread, $thread); $ret->add($lnk); $t = new Text(" - "); $t->setFilter(false); $ret->add($t); } $lnk = new Link("?changeCurrForumThread=" . $CurrentThreadtitle, $CurrentThreadtitle); $ret->add($lnk); return $ret; }
/** * Zeigt das gesamte DIV an */ function show() { echo "<div "; if ($this->XPOS > 0 || $this->YPOS > 0) { $tmp = ":absolute; "; if ($this->YPOS > 0) { $tmp .= " top:" . $this->YPOS . "px; "; } if ($this->XPOS > 0) { $tmp .= " left:" . $this->XPOS . "px; "; } $this->setStyle("position", $tmp); } $this->getToolTipTag(); $this->showStyles(); echo " > "; if ($this->KOPFTEXT_NEED) { /* * Bei berechtigung, Kopftext bearbeiten. */ if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { if (isset($_REQUEST['changeHeadInfo']) && strlen($_REQUEST['changeHeadInfo']) > 5) { $ktRl = substr($_REQUEST['changeHeadInfo'], 5); $dbtbl = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("text"), "", "", "", "runlink = '" . $ktRl . "' "); if ($dbtbl->getRowCount() == 0) { $dbtblInsert = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("runlink", "parent", "text"), "", "", "", "runlink = '" . $ktRl . "' "); $dbtblInsert->insertRowByArray(array($ktRl, null, "")); $dbtbl->refresh(); } if (isset($_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME]) && $_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME] == "Speichern") { $dbtbl->doUpdate(); } $frm = $dbtbl->getUpdateAllMask(); $frm->add(new Hiddenfield("changeHeadInfo", $_REQUEST['changeHeadInfo'])); $frm->show(); } else { $sp = new Spacer(5); $sp->show(); $txKtb = new Text("Kopftext bearbeiten<br>"); $txKtb->setFilter(false); $lnk = new Link("?changeHeadInfo=Cnge-" . $_SESSION['runLink'], $txKtb); $lnk->show(); } } $tx = new Text(getKopfText()); $tx->setFilter(false); $tx->show(); } if ($this->getObjectCount() > 0) { foreach ($this->OBJECTS as $obj) { $obj->show(); } } //-------------- include $this->FILE; //-------------- echo "</div>"; }
/** * Zeigt den Link an, welcher das Ziel als Popup ÃÂÃÂÃÂöffnet. * wird von der Methode show() aufgerufen wenn $this-POPUP == true */ private function showPopupLink() { echo "<a href='#' "; if (strlen($this->TARGET) > 0) { echo "target='" . $this->TARGET . "' "; } if ($this->XPOS > 0 || $this->YPOS > 0) { if ($this->XPOS > 0 && $this->YPOS > 0) { echo "style=\" position:absolute; top:" . $this->YPOS . "px; left:" . $this->XPOS . "px; \" "; } if ($this->XPOS < 0 && $this->YPOS > 0) { echo "style=\" position:absolute; top:" . $this->YPOS . "px; right:" . $this->XPOS * -1 . "px; \" "; } if ($this->XPOS < 0 && $this->YPOS < 0) { echo "style=\" position:absolute; bottom:" . $this->YPOS * -1 . "px; right:" . $this->XPOS * -1 . "px; \" "; } if ($this->XPOS > 0 && $this->YPOS < 0) { echo "style=\" position:absolute; bottom:" . $this->YPOS * -1 . "px; left:" . $this->XPOS . "px; \" "; } } else { $this->showStyles(); } if (isset($this->BORDER) && $this->BORDER >= 0) { echo " border='" . $this->BORDER . "' "; } echo $this->getClassTag(); $href = str_replace("?", "&", $this->HREF); echo $this->getToolTipTag() . " onclick=\"showPopup('popup.php?popup=" . $href . "'); return false; \" >"; if (get_class($this->TEXT) && method_exists($this->TEXT, "show")) { // $this->TEXT->setFilter(false); $this->TEXT->show(); } else { $t = new Text($this->TEXT); $t->setFilter(false); $t->show(); } echo "</a>"; }
function show() { //Wenn notwendig Eingabemaske, ansonsten Standard-Anzeige if (!$this->showInsertMaskIfNeeded()) { $rowsToShow = $this->getRowsToShow(); //Tabelle fÃÂÃÂÃÂür gesamte NEWS $tbl = new Table(array("News")); $tbl->setHeadEnabled(false); $tbl->setBorder(0); foreach ($rowsToShow as $row) { $tt = new Text($row['Text']); $tt->setFilter(false); $ta = new Text($row['Autor']); $tblxTitle = new Table(array("", "")); $tblxTitle->setColSizes(array("50")); $tblxTitle->setAlign("left"); $rxtitle = $tblxTitle->createRow(); $t0 = new Title(getFormatedDate($row['Datum'], "standard") . ":"); $t0->setWidth(20); $rxtitle->setAttribute(0, $t0); $t1 = new Title($row['Title']); $rxtitle->setAttribute(1, $t1); $rxtitle->setAlign("left"); $tblxTitle->addRow($rxtitle); //Tabelle fÃÂÃÂÃÂür den jeweiligen Eintrag $tblx = new Table(array("")); if (strlen($row['pic']) > 0) { $tblx = new Table(array("", "")); $tblx->setColSizes(array("180")); } $tblx->setBorder($this->CONFIG->GB_CONFIG['border']); $tblx->setWidth("100%"); //TEXT $rx = $tblx->createRow(); if (strlen($row['pic']) > 0 && !(isset($_REQUEST['removeNewsPicId']) && $_REQUEST['removeNewsPicId'] == $row['id'])) { $img = new Image($row['pic']); $img->setWidth(175); $rx->setAttribute(0, $img); $rx->setAttribute(1, $tt); } else { $rx->setAttribute(0, $tt); } $rx->setAlign("left"); $tblx->addRow($rx); $f = new FontType(); $rx->setFonttypes(array(0 => $f)); $f = new FontType(); $f->setFontsize(1); $f->setItalic(false); $rx->setFonttypes(array(0 => $f)); $r = $tbl->createRow(); $r->setAttribute(0, $tblxTitle); $tbl->addRow($r); $r1 = $tbl->createRow(); $r1->setAttribute(0, $tblx); $tbl->addRow($r1); $ytElem = new YouTubeElement($row['yt_video'], "news", "yt_video", $row['id']); $r1 = $tbl->createRow(); $r1->setAttribute(0, $ytElem); $tbl->addRow($r1); $tbl->addSpacer(0, 7); if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { $r2 = $tbl->createRow(); $xDv = new Div(); $xDv->setWidth(450); $xDv->setHeight(40); $txChngePic = new Text("Bild Hochladen/ÃÂÃÂÃÂÃÂndern<br>"); $txChngePic->setFilter(false); $newPicLink = new Link("?popupRunLink=imageUploaderPopup&targetPath=pics/news&DbInsertTable=news&DbInsertCol=pic&DbInsertId=" . $row['id'] . "&stayAlive=ok", $txChngePic); $txRemPic = new Text("Bild Entfernen<br>"); $txRemPic->setFilter(false); $removePicLink = new Link("?removeNewsPicId=" . $row['id'] . "", $txRemPic); $spTx = new Text(" "); $spTx->setFilter(false); $xDv->add($newPicLink); if (strlen($row['pic']) > 0) { if (isset($_REQUEST['removeNewsPicId']) && $_REQUEST['removeNewsPicId'] == $row['id']) { $sql = "UPDATE news SET pic = null WHERE id = " . $_REQUEST['removeNewsPicId']; $_SESSION['config']->DBCONNECT->executeQuery($sql); } else { $xDv->add($removePicLink); } } $newPicLink->setPopup(true); $r2->setAttribute(0, $xDv); $tbl->addRow($r2); } $tbl->addSpacer(0, 35); } if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { // Neuer Eintrag- BUTTON //-------------------------------- $insertButton = new Button('dbTableNew', 'News eintragen'); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($insertButton); $form->show(); } // Tabelle anzeigen //-------------------------------- $tbl->show(); if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user" && $tbl->getRowcount() > 2) { // Neuer Eintrag- BUTTON //-------------------------------- $insertButton = new Button('dbTableNew', 'News eintragen'); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($insertButton); $form->show(); } } }
function show() { if (isset($_REQUEST['saveNetworkSettingsMask']) && $_REQUEST['saveNetworkSettingsMask'] == $this->SAVE_BTN_LABEL) { $err = false; $errMsg = ""; if (!isset($_REQUEST['ip']) || strlen($_REQUEST['ip']) <= 0) { $err = true; $errMsg = "IP muss angegeben werden!"; } if (!isset($_REQUEST['mask']) || strlen($_REQUEST['mask']) <= 0) { $err = true; $errMsg = "Subnet-Mask muss angegeben werden!"; } if (!isset($_REQUEST['gate']) || strlen($_REQUEST['gate']) <= 0) { $err = true; $errMsg = "Gateway muss angegeben werden!"; } if (!isset($_REQUEST['dns']) || strlen($_REQUEST['dns']) <= 0) { $err = true; $errMsg = "DNS-Server muss angegeben werden!"; } if ($err) { $e = new Error("Ungültige Eingabe", $errMsg); } else { $this->setNetwork($_REQUEST['ip'], $_REQUEST['mask'], $_REQUEST['gate'], $_REQUEST['dns']); $tSaved = new Text("Einstellungen gespeichert!<br>"); $tSaved->setFilter(false); $ft = $tSaved->getFonttype(); $ft->setColor("red"); $ft->setFontsize(4); $tSaved->setFonttype($ft); $msk = $this->getNetworkSettingsMask(); $msk->add($tSaved); $msk->add(new Text("Einstellungen werden erst nach einem Neustart aktiv!")); $msk->show(); } } else { $msk = $this->getNetworkSettingsMask(isset($_REQUEST['ip']) ? $_REQUEST['ip'] : "0.0.0.0", isset($_REQUEST['mask']) ? $_REQUEST['mask'] : "0.0.0.0", isset($_REQUEST['gate']) ? $_REQUEST['gate'] : "0.0.0.0", isset($_REQUEST['dns']) ? $_REQUEST['dns'] : "0.0.0.0"); $msk->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(); }