Example #1
0
 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;
 }
Example #2
0
 /**
  * show-Methode für TYPE = button
  * 
  * @param $PIC  gibt die Hintergrundgrafik der Buttons an   
  */
 function showWithButtons($PIC, $HOVER = "")
 {
     $tbl = new Table(array(""));
     $tbl->setWidth($this->getWidth() + 5);
     $tbl->setXPos($this->getXPos());
     $tbl->setYPos($this->getYPos());
     $tbl->setBorder($this->getBorder());
     $tbl->setFonttypes(array($this->getFonttype()));
     $userStatus = $this->CONFIG->CURRENTUSER->STATUS;
     $menuresult = $this->MENUTABLE->getMenuByStatus($userStatus);
     $txt = array();
     $r = array();
     while ($row = mysql_fetch_array($menuresult)) {
         if ($row['id'] > 0) {
             $rcnt = count($txt);
             $txt[$rcnt] = new Text($row['text']);
             $txt[$rcnt]->setFonttype($this->getFonttype());
             $ftx = $txt[$rcnt]->getFonttype();
             if ($row['text'] == $_SESSION['MENU_PARENT'] || $row['text'] == $this->getLabelByRunlink($_SESSION['runLink'], $_SESSION['MENU_PARENT'])) {
                 $ftx->setColor($_SESSION['config']->COLORS['hover']);
                 $ftx->setBold(true);
             } else {
                 $ftx->setBold(false);
             }
             $txt[$rcnt]->setFonttype($ftx);
             $btn = new MenuButton($row['link'], $txt[$rcnt], $PIC, $row['target'], $this->COLOR);
             $btn->setHoverPic($HOVER);
             $btn->setToolTip($row['tooltip']);
             $r[$rcnt] = $tbl->createRow();
             $r[$rcnt]->setAttribute(0, $btn);
             $tbl->addRow($r[$rcnt]);
         }
     }
     $tbl->show();
 }