/** * Liefert das Userprofil zur klein-Anzeige (neben Posts) * * @param $id ID des Users */ function getUserprofileForUserId($id) { $sql = "SELECT * FROM user where id = '" . $id . "' "; $res = $_SESSION['config']->DBCONNECT->executeQuery($sql); $retRow = mysql_fetch_array($res); $ft = new FontType(); $ft->setBold(true); $ft->setFontsize(3); $picLnk = new Link("includes/user/show_userprofil.php?showUserId=" . $id, getUserImageSourceByPicname($retRow['pic'], 80)); $picLnk->setPopup(true); $status = new Text("<b>Status:</b> " . $retRow['Status']); $status->setFilter(false); $posts = new Text("<b>Posts:</b> " . $retRow['Posts']); $posts->setFilter(false); $tbl = new Table(array("")); $r1 = $tbl->createRow(); $r1->setFonttype($ft); $r1->setAttribute(0, $retRow['Vorname'] . " " . $retRow['Nachname']); $tbl->addRow($r1); $r2 = $tbl->createRow(); $r2->setAttribute(0, $picLnk); $tbl->addRow($r2); $r3 = $tbl->createRow(); $r3->setAttribute(0, $status); $tbl->addRow($r3); $r4 = $tbl->createRow(); $r4->setAttribute(0, $posts); $tbl->addRow($r4); return $tbl; }
function Text($t, $s = 2, $b = false, $i = false, $u = false, $f = true) { $this->NAME = "Text"; $this->border = 0; $this->TEXT = $t; $this->setFILTER($f); $ftX = new FontType(); $ftX->setBold($b); $ftX->setItalic($i); $ftX->setUnderline($u); $ftX->setFontsize($s); $this->setFonttype($ftX); }
function getFonttype() { if ($this->FONTTYPE == null) { $this->FONTTYPE = new FontType(); } $type = $this->FONTTYPE->FONT; $size = $this->FONTTYPE->FONTSIZE; $bold = $this->FONTTYPE->BOLD; $italic = $this->FONTTYPE->ITALIC; $under = $this->FONTTYPE->getUnderline(); $color = $this->FONTTYPE->getColor(); $ft = new FontType($type, $size, $bold, $italic, $under); $ft->setColor($color); return $ft; }
function getSearchMask() { $ft = new FontType(); $ft->setFontsize(2); $table = new Table(array("")); $table->setFonttypes(array($ft)); $table->setHeadEnabled(false); $table->setDesignJN("J"); $r = $table->createRow(); $r->setAttribute(0, new Text("Geben Sie hier ihren Suchbegriff ein")); $table->addRow($r); $r = $table->createRow(); $r->setAttribute(0, new Textfield("SuchString")); $table->addRow($r); $hidden = new Hiddenfield($this->TABLENAME . "SEARCH", "doSearch"); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($hidden); $form->add($table); $form->show(); }
function getPageNavigation() { if ($this->getPageCount() <= 1) { return; } $maxPage = $this->getPageCount(); $label = new Text("Seite: "); $label->setFontsize(2); $label->show(); for ($i = 1; $i <= $maxPage; $i++) { $txt = new Text($i); //$txt = "<font color='" .$_SESSION['config']->COLORS['hover'] ."' >" .$txt ."</font>"; if ($this->CURRENT_PAGE == $i) { $ft = new FontType(); $ft->setBold(true); $ft->setColor($_SESSION['config']->COLORS['hover']); $txt->setFonttype($ft); } if ($this->LINKPREFIX != "" && substr($this->LINKPREFIX, strlen($this->LINKPREFIX) - 1, 1) != "&") { $this->LINKPREFIX = $this->LINKPREFIX . "&"; } $link = new Link($this->PARENT_PAGE . "?" . $this->LINKPREFIX . "changeBbPage=" . $i . "&Current_BB_Path=" . substr($this->PATH, strlen($_SERVER['DOCUMENT_ROOT'])), $txt, false); $link->show(); if ($i < $maxPage) { $label = new Text(", "); $label->setFontsize(2); $label->show(); } } }
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(); } } }
if (!isset($_REQUEST['showUserId']) || strlen($_REQUEST['showUserId']) <= 0) { $e = new Error("Fehlender Ãbergabewert", "Keine Eingabe in \$_REQUEST['showUserId'] gefunden"); } $currPath = dirname($_SERVER['SCRIPT_NAME']); $currPath = substr($currPath, 1); if (strlen($currPath) > 0) { $currPath = $currPath . "/"; } //Daten holen $userDBTable = new DbTable($_SESSION['config']->DBCONNECT, 'user', array("*"), "", "", "", "id=" . $_REQUEST['showUserId'] . " "); $userDBRow = $userDBTable->getRow(1); //Daten in Table stecken $userTable = new Table(array("", "")); $userTable->setWidth(400); $userTable->setAlign("left"); $ft = new FontType(); $ft->setFontsize(4); //User-Name $userRow = $userTable->createRow(); $userRow->setSpawnAll(true); $userRow->setAlign("center"); $user = new Text($userDBRow->getNamedAttribute("User")); $userRow->setAttribute(0, $user); $user->setFonttype($ft); $userTable->addRow($userRow); $userTable->addSpacer(0); //User-Avatar $userRow1 = $userTable->createRow(); $userRow1->setSpawnAll(true); $userRow1->setAlign("center"); $img = new Image($currPath . "pics/user/" . $userDBRow->getNamedAttribute("pic"));